Util-Linux package development
 help / color / mirror / Atom feed
* sfdisk: trying to create aligned partitions: fail
@ 2011-08-17  6:13 Giulio
  2011-08-17  7:56 ` Karel Zak
  0 siblings, 1 reply; 5+ messages in thread
From: Giulio @ 2011-08-17  6:13 UTC (permalink / raw)
  To: util-linux

Linux 2.6.18-238.12.1.el5
sfdisk from util-linux 2.20-rc1
fdisk (util-linux 2.20-rc1)
200GB VMware SCSI disk

It seems it's not immediately possible to create aligned partitions (ie:
starting at 1MB/2048 sectors) with sfdisk.

1) 1st try, using MBs as unit of measure:

dd if=/dev/zero of=/dev/sda bs=1 count=512
sfdisk -L -uM /dev/sda <<-EOF
1,1001,83
,,83
;
;
EOF

Results (starts at sector 1 instead of 1MB):
$ fdisk -lu /dev/sda
 
Disk /dev/sda: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders, total 419430400 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/sda1               1     2056319     1028159+  83  Linux
/dev/sda2         2056320   419425019   208684350   83  Linux


2) 2nd try, using sectors as unit of measure:

dd if=/dev/zero of=/dev/sda bs=1 count=512
sfdisk -L -uS /dev/sda <<-EOF
2048,2050048,83
,,83
;
;
EOF

Results (wrong 2nd partition created):
$ fdisk -lu /dev/sda
 
Disk /dev/sda: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders, total 419430400 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/sda1            2048     2052095     1025024   83  Linux
/dev/sda2               1        2047        1023+  83  Linux
/dev/sda3         2052096   419430399   208689152   83  Linux
 
Partition table entries are not in disk order


===

Is there some option to enable alignment?

Thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-17 13:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17  6:13 sfdisk: trying to create aligned partitions: fail Giulio
2011-08-17  7:56 ` Karel Zak
2011-08-17  9:31   ` Giulio
2011-08-17 12:44     ` Karel Zak
2011-08-17 13:46       ` Giulio Orsero

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox