Kickstart Partitioning: Define partition order

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

 



Hi,

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

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


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.

Regards,
Bernd




_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux