I have been trying to do something similar using the kickstart %pre script to partition the disk.
In the %pre script, I have to create 3 primary partitions with the rest of the disk as an extended partition containing several logical partitions:
%pre
# clear the MBR and partition table
dd if=/dev/zero of=${targetDisk} bs=512 count=1
# setup partition table on disk
parted -s ${targetDisk} mklabel msdos
parted -s ${targetDisk} mkpart primary 1049k 106M
parted -s ${targetDisk} mkpart primary 106M 4401M
parted -s ${targetDisk} mkpart primary 4401M 6548M
parted -s ${targetDisk} mkpart extended 6548M 160G
parted -s ${targetDisk} mkpart logical 6550M 38.8G
parted -s ${targetDisk} mkpart logical 38.8G 54.9G
sleep 2
# wait for all devices to be identified by the kernel
while [ -z $(ls ${targetDisk}15) ]
do
echo "waiting for kernel to recognize partitions"
hdparm -z ${targetDisk}
sleep 1
done
Then in the partition section of the kickstart file:
# declare the partition configuration created in the %pre script
part /boot --fstype ext2 --onpart=/dev/sda1
part / --fstype ext3 --onpart=/dev/sda2
part /var --fstype ext3 --onpart=/dev/sda3
part swap --fstype ext3 --onpart=/dev/sda5
part /home --fstype ext3 --onpart=/dev/sda6
I have a total of 15 partitions. The wait and reload partitions at the end was needed to solve an issue where sometimes during the kickstart install not all of the disk /dev/sda## special device files were created causing the install to fail.