Kickstarting Ubuntu 14.04: How to create an “EFI boot partition” from the ks.cfg

anacondabootkickstartubuntu-14.04uefi

I am PXE booting a server that has two 4Gb drives configured in RAID-1 in order to kickstart an instance of Ubuntu Server 14.04. I am PXE booting in EFI mode, and the install runs fine until I get this error on partitioning:

The partition table format in use on your disks normally requires you
to create a separate partition for boot loader code. This partition
should be marked for use as an "EFI boot partition" and should be at
least 35MB in size. Note that this is not the same as a partition
mounted on /boot.

I have read this thread and this article which suggests adding this in my ks.cfg:

part /boot/efi --fstype=efi --grow --maxsize=200 --size=20
part /boot --fstype=ext4 --size=512

But the error is still shown. If I respond 'no', i.e. continue without this partition the server boots and works fine, but I want the installation to be able to run unattended, so I don't want this response step in there.

I have also tried syntax similar to the biosboot lines:

part efiboot  --fstype efi --size 200

and

part efi --fstype efi

but nothing works.

Can you help / tell me what the correct syntax is please? Thanks!

Here is my entire partitioning config:

part /            --fstype ext4 --size 2048  --asprimary
part /boot        --fstype ext4 --size 512
part /boot/efi    --fstype efi  --size 256
part /opt         --fstype ext4 --size 8192
part /var         --fstype ext4 --size 8192
part /media/video --fstype ext4 --size 65536 --grow
part swap                       --size 8192

Best Answer

Do not use kickstart with debian based distributions. Kickstart will be converted to preseed, so its better to use preseed (http://en.wikipedia.org/wiki/Preseed) directly.

As recommended start with an example preseed: https://help.ubuntu.com/14.04/installation-guide/example-preseed.txt

Then boot with preseed url and DEBCONF_DEBUG=5 into the installer. Every time the installer asks a question, you will see the config option logged on console 4. Then you can use this name to set the correct value.

For partitioning you can see an example in the linked example-preseed.txt, you will need to adapt it for your EFI partition.