[opensuse] auto partitioning a disk
Hi, If I've a disk I want to partition automatically, I've been using something like: sfdisk -uM << EOF ,2048,S ,,L EOF Which works fine. However if the drive was used for something else and has partitions n such already on it then the script doesn't work properly. So I was using dd if=/dev/zero of=$DEVICE count=1024 to mash anything that was there before. This works too, however if I'm running a HostRAID card it breaks the RAID mirror! I was wondering if there's a more eloquent way of using the whole disk regardless of what used to be on it without manual intervention? cheers Matthew -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2007-07-06 at 18:08 +0100, Matthew Stringer wrote:
Hi,
If I've a disk I want to partition automatically, I've been using something like:
sfdisk -uM << EOF ,2048,S ,,L EOF
Which works fine.
However if the drive was used for something else and has partitions n such already on it then the script doesn't work properly.
We use sfdisk in KIWI, and it seems to work fine even when a partition already exists. We do pass the --force option, though, so you maybe you should try that? James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
James Willcox
-
Matthew Stringer