2

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
2
  • i have a working ks cfg for UEFI.Size is different part /boot/efi --fstype efi --size 256 part /boot --fstype ext4 --size 500
    – ananthan
    Jan 8, 2015 at 10:42
  • Thanks ananthan, I've just tried that but had the same error output. I've added my config to the post, does the order matter? Is it because we're mounting the efi bit at /boot?
    – Daniel
    Jan 8, 2015 at 11:06

4 Answers 4

0

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.

1

I know this is an old question, but many other people could have similar problems as I had.

I had previosly a working kickstart, but I couldn't adjust it to work with UEFI ready machines, and kickstart/preseed can be tricky (a lot of documentation on the web, but most of that doesn't works as expected due to different versions of ubuntu/debian, kickstart by Red Hat vs Ubuntu Kickstart emulation, etc... etc...).

I tried to create the partitions in kickstart way (no success), and convert all file to preseed is not an option for me now (I'll do it in a future version), so, after millions and milions of tests, here is my working configuration (on 16.04):

preseed --owner d-i partman-auto/method string regular

preseed --owner d-i partman-auto/expert_recipe 'string gpt-boot-root :: 256 256 256 fat32 $primary{ $iflabel{ gpt } $iflabel{ gpt } $reusemethod{ } method{ efi } format{ } mountpoint{ /boot/efi } . 512 512 512 ext4 $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /boot } . 4000 10000 -1 ext4 $primary{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } .'

preseed --owner d-i partman-auto/choose_recipe select gpt-boot-root

Notes:

1) This configuration creates /boot (256MB), /boot/efi (512MB) and / (rest of the disk). I choose not create swap because I did it later with swap file on /. Remember to use "preseed --owner d-i partman-basicfilesystems/no_swap boolean false" if you don't want swap on separed partition (new versions of ubuntu doesn't need it anymore)

2) Note that it have single quotation marks before "string" and at the end of line.

3) All sintax must be in one line. I read somewhere that kickstart doesn't support the backslash syntax as preseed does, so all expert recipe must be in the same line.

2
  • Thanks! You saved my day, I'll write few additions that I used to your configuration in my answer
    – POMATu
    Feb 19, 2019 at 13:08
  • You're wellcome. I forgot to mention the other lines (finish partition and write changes... etc..) but you already did it ;) Feb 20, 2019 at 17:44
0

I believe the line you will need to add to your preseed file to answer "no" to that particular question is:

d-i partman-partitioning/no_bootable_gpt_biosgrub boolean false
0

So, I was messing with "part" kickstart options for so long without any success, and I realized that many redhat options are not supported. And if you make just 1 simple mistake in 1 option then Ubuntu installer switches to Guided partitioning. Moreover it fails to do Guided partitioning in this case: it can't install grub on MBR partitions at the end of installation and can't proceed to installation cause it can't detect EFI boot partition that it proposed in Guided partitioning screen.

I used @Anderson Zardo answer but I had to add several lines to preseeding so partman won't prompt user to "Finish partitioning and write changes to disk" and also included some possible caveats.

Following kickstart partitioning configuration works on both EFI and MBR configurations, it detects everything automatically and even creates /swapfile with recommended size an activates it for installed system.

#System bootloader configuration
zerombr
bootloader --location=mbr
clearpart --all --initlabel

# preseeding partman partition information
preseed --owner d-i partman-auto/method string regular
preseed --owner d-i partman-auto/expert_recipe 'string gpt-boot-root :: 256 256 256 fat32 $primary{ $iflabel{ gpt } $iflabel{ gpt } $reusemethod{ } method{ efi } format{ } mountpoint{ /boot/efi } . 512 512 512 ext4 $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /boot } . 4000 10000 -1 ext4 $primary{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } .'

# preseeding partman additional options for automation
preseed --owner d-i partman-auto/choose_recipe select gpt-boot-root
preseed --owner d-i partman-basicfilesystems/no_swap boolean false
preseed --owner d-i partman/choose_partition select finish
preseed --owner d-i partman-md/confirm boolean true
preseed --owner d-i partman-partitioning/confirm_write_new_label boolean true    
preseed --owner d-i partman-lvm/confirm_nooverwrite boolean true

As a result EFI system is partitioned to GPT

# fdisk -l
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: EE83EBC4-881D-4157-A627-AC46A14AE694

Device       Start      End  Sectors  Size Type
/dev/sda1     2048   499711   497664  243M EFI System
/dev/sda2   499712  1499135   999424  488M Linux filesystem
/dev/sda3  1499136 20969471 19470336  9.3G Linux filesystem
# swapon -s
Filename                Type        Size    Used    Priority
/swapfile                               file        448816  0   -2

Non-EFI system partitioned to MBR

# fdisk -l
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xaf7c9c63

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1  *      2048   999423   997376  487M 83 Linux
/dev/sda2       999424 20969471 19970048  9.5G 83 Linux
# swapon -s    
Filename                Type        Size    Used    Priority
/swapfile                               file        460496  0   -2

And I noticed that it installs grub during EFI install. I don't know why that's needed but it seems that grub is just not used and everything works fine. Hope I saved much time for anybody.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .