On Wed, Aug 17, 2011 at 14:44, Karel Zak <kzak@xxxxxxxxxx> wrote: > On Wed, Aug 17, 2011 at 11:31:56AM +0200, Giulio wrote: >> I know sfdisk won't automatically align partitions and didn't expect it to >> do it, my email was about sfdisk behaving in an unexpected way: >> - not respecting 1MB as start of partition when I ask for it >> - creating partitions out of order when using sectors > > Try --in-order command line option, the option is undocumented in old > versions ;-( With "--in-order" the issue with partitions out of order (the case in which I was using -uS) is solved. However, there still is an isse when using -uM I was trying with a 200GB VMware disk and when I used -uM and 1 as start of 1st partition sfdisk would create a partition starting at sector 1 (not MB 1). I see you used a 100MB disk, so I tried different sizes until I found when the error appears, unfortunately I'm not able to fine grain sizes in VMware more than the following: == command used DEV=$1 dd if=/dev/zero of=/dev/$DEV bs=1 count=512 sfdisk --in-order -L -uM /dev/$DEV <<-EOF 1,10,83 ,,83 ; ; EOF == ========== with a 1062MB, OK: Disk /dev/sdc: 1062 MB, 1062207488 bytes 64 heads, 32 sectors/track, 1013 cylinders, total 2074624 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdc1 2048 22527 10240 83 Linux <==== start sector 2048 /dev/sdc2 22528 2074623 1026048 83 Linux ========== ========== with a 1073MB, NOT-OK: Disk /dev/sdb: 1073 MB, 1073741824 bytes 255 heads, 63 sectors/track, 130 cylinders, total 2097152 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 32129 16064+ 83 Linux <===== start sector 1 /dev/sdb2 32130 2088449 1028160 83 Linux ========== Thanks -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html