[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Kickstart Partitioning: Define partition order


We use the snipplet shown to create partitioning using kickstart on hundreds of development workstations and for development VMware virtual machines.

# Disk Partitioning
# Dynamically because it depends on disk device names
%include /tmp/partitions.ks

set $(list-harddrives)
let numd=$#/2
cat >/tmp/partitions.ks <<==EOF==
ignoredisk --only-use=${disk0}
bootloader --location=mbr
clearpart --all --drives=${disk0} --initlabel
partition /boot/efi -- --asprimary --fstype=vfat --label EFI  --size=200
partition /boot     -- --asprimary --fstype=ext4 --label BOOT --size=500
partition swap      -- --asprimary --fstype=swap --label SWAP --recommended
partition /         -- --asprimary --fstype=ext4 --label ROOT --size=4096 --grow

After kickstarting the order of the created partitions differs from the order given in the kickstart file. It is:

  1. /dev/sda1 /boot/efi
  2. /dev/sda2 /boot
  3. /dev/sda3 /
  4. /dev/sda4 swap

On workstations this is no problem having swap at the end of the disk. But in the VMware virtual machines it causes problems when one has to resize the root partition. An option would be LVM and just add another virtual disk but we would like to use traditional ext4 partitioning because LVM is not supported by gparted and resizing with gparted is easier. Another option would be to create a VM template and use swap as a separate vmdk disk file.

My question is: How can I give the order I want the partitions in kickstart? The option --onpart works only if there is already a partitioning layout.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]