Because of underlying storage, I need the partitions created by the RHEL/CentOS installer to begin on a multiple of 8 sectors. By default the part command during kickstart (see this page for kickstart reference) offsets them by 63 sectors:

[root@bs-simon ~]# fdisk -lu /dev/sda

Disk /dev/sda: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders, total 167772160 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      160649       80293+  83  Linux
/dev/sda2          160650   166738634    83288992+  83  Linux
/dev/sda3       166738635   167766794      514080   82  Linux swap / Solaris

part does offer --start to specify the starting cylinder, but can someone suggest a way to get part to start on a sector that is a multiple of 8? Or do I just need to give up and partition the disk manually first?

btw, this is to get the linux filesystem blocks to align with underlying VMware VMFS datastore blocks, which align with NetApp LUN blocks.


  • 1
    Sector 63 IS a multiple of 8, when you consider that the counting starts at 0. – JeffG Mar 10 '11 at 2:57
  • dupe? serverfault.com/questions/34729/… – JakeRobinson Mar 10 '11 at 2:59
  • Not a dupe, this is about customizing the kickstart process, not using fdisk directly. – JeffG Mar 10 '11 at 3:01
  • @JeffG, I'm told by NetApp that this number needs to be divisible by 8 "the default start sector of 63 is misaligned" – carillonator Mar 10 '11 at 3:28

This link provides complex partition for using in kickstart http://www.dark.ca/2009/08/03/complex-partitioning-in-kickstart/

| improve this answer | |

use the %pre section of your kickstart file to calculate at write out a partition table. Use the %include command in the kickstart file to read what was generated during %pre.

Example 1.6.1 on this page http://linux.web.cern.ch/linux/scientific4/docs/rhel-sag-en-4/s1-kickstart2-preinstallconfig.html shows an example of writing the partition scheme during %pre which is calculated at the beginning of the install process and subsequently used via %include.

| improve this answer | |
  • actually this just generates the part commands to be used in the kickstart, which doesn't work for me since it only takes cylinder numbers for start and end – carillonator Mar 10 '11 at 4:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.