Hi,<br><br>We use the snipplet shown to create partitioning using kickstart on hundreds of development workstations and for development VMware virtual machines. <br><br><br><span style="font-family:courier new,monospace"># Disk Partitioning<br>
# Dynamically because it depends on disk device names<br>%include /tmp/partitions.ks<br><br>%pre<br>PATH="/bin:/sbin:/usr/bin:/usr/sbin"<br>set $(list-harddrives)<br>let numd=$#/2<br>disk0=$1<br>cat >/tmp/partitions.ks <<==EOF==<br>
zerombr<br>ignoredisk --only-use=${disk0}<br>bootloader --location=mbr <br>clearpart --all --drives=${disk0} --initlabel<br>partition /boot/efi --ondisk=${disk0} --asprimary --fstype=vfat --label EFI  --size=200<br>partition /boot     --ondisk=${disk0} --asprimary --fstype=ext4 --label BOOT --size=500<br>
partition swap      --ondisk=${disk0} --asprimary --fstype=swap --label SWAP --recommended <br>partition /         --ondisk=${disk0} --asprimary --fstype=ext4 --label ROOT --size=4096 --grow<br>==EOF==<br>%end<br></span><br>
<br>After kickstarting the order of the created partitions differs from the order given in the kickstart file. It is:<br><br><ol><li>/dev/sda1 /boot/efi</li><li>/dev/sda2 /boot</li><li>/dev/sda3 /</li><li>/dev/sda4 swap</li>
</ol><br>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.<br>
<br>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.<br><br>Regards,<br>Bernd<br><br><br><br><br>