adding uefi to kickstart CentOS 7

I am trying to add an efi partition to my working kickstart file.

bootloader --driveorder=sda --append="rhgb quiet biosdevname=0
clearpart --all --initlabel
part / --ondisk=sda --fstype xfs --size=20000 --asprimary
part swap --ondisk=sda --size=4000 --asprimary
part /boot/efi --ondisk=sda --fstype efi --size=1000 --asprimary
part /home --ondisk=sda --fstype xfs --size=1 --asprimary --grow

the line with /boot/efi is the only new item other then "removing"
--location=mbr from the bootloader line. The install is not working. It
stops on the Installation part with selections 1-8.
I see no errors on screen - but the selection for "Install source" has a
"!" and "error setting up install source" is there. when I goto another
console and run fdisk -l /dev/sda nothing shows so my partitions are not
getting setup.

What did I miss to setup efi ?



Re: adding uefi to kickstart CentOS 7

By Chris Adams at 07/09/2019 - 11:11

Once upon a time, Jerry Geis <jerry. ... at gmail dot com> said:
Rather than try to set the EFI partition, I just put "reqpart" in and
let the installer decide when it needs it (and how to do it). I still
have "--location=mbr" in the bootloader line and it seems to just do the
right thing.

One other thing - you don't have a /boot - not sure if the installer
still requires that or not.

Here's an example from a KS I just used on an EFI system (I use LVM so
it's somewhat different):

clearpart --initlabel --drives=sda
bootloader --location=mbr --boot-drive=sda
part /boot --ondisk=sda --asprimary --size=1024 --fstype=xfs
part pv.1 --ondisk=sda --size=3600 --grow
volgroup centos pv.1
logvol / --vgname=centos --name=root --fstype=xfs --size=1536 --grow
logvol swap --vgname=centos --name=swap --size=2048

Re: adding uefi to kickstart CentOS 7

By Stephen John Smoogen at 07/09/2019 - 11:07

Can you try it with a smaller size? all of ours seem to have --size=477

We keep the --location=mbr on our efi systems.