[CentOS] kickstart partitioning and cylinder boundary

Erez Zarum erezzarum at gmail.com
Tue Mar 6 08:33:41 EST 2012


As I understand anaconda uses parted to partition (starting from
centos 6), using this as example (kickstart configuration file):
clearpart --all --drives=sda --initlabel
part /boot --asprimary --size=200 --fstype=ext2 --ondisk=sda
part swap --asprimary --size=16384 --fstype=swap --ondisk=sda
part / --asprimary --size=512000 --fstype=ext4 --ondisk=sda
part /scratch --asprimary --size=1 --grow --fstype=ext4 --ondisk=sda

 I can see no problems in parted:
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: Adaptec OS (scsi)
Disk /dev/sda: 1999GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  211MB   210MB   primary  ext2            boot
 2      211MB   537GB   537GB   primary  ext4
 3      537GB   554GB   17.2GB  primary  linux-swap(v1)
 4      554GB   1999GB  1445GB  primary  ext4

Yet, fdisk –l report:

Disk /dev/sda: 1999.3 GB, 1999307276288 bytes
255 heads, 63 sectors/track, 243068 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0006e122

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              26       65297   524288000   83  Linux
/dev/sda3           65297       67386    16777216   82  Linux swap / Solaris
/dev/sda4           67386      243069  1411177472   83  Linux

As you can see, /dev/sda1 End at 26 and /dev/sda2 Start at 26.

But, fdisk –lu report otherwise:

Disk /dev/sda: 1999.3 GB, 1999307276288 bytes
255 heads, 63 sectors/track, 243068 cylinders, total 3904897024 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: 0x0006e122

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      411647      204800   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2          411648  1048987647   524288000   83  Linux
/dev/sda3      1048987648  1082542079    16777216   82  Linux swap / Solaris
/dev/sda4      1082542080  3904897023  1411177472   83  Linux

I assume I can ignore it and it’s a bug on fdisk?
This does not happen on 5.7.


More information about the CentOS mailing list