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.
thanks!!
This link provides complex partition for using in kickstart http://www.dark.ca/2009/08/03/complex-partitioning-in-kickstart/
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.