Install custom iso using a kickstart file in uefi

Hi. I have created a kickstart file to customise an installation. I create the corresponding ISO.
In the kickstart file I detect if in BIOS or UEFI, the options for BIOS I have them controlled but not for UEFI.

Results when applying it in different environments:
Virtual server with BIOS: Ok
Physical server with BIOS: Ok

The problem is that I don’t know what to put in the kickstart file to make it work also in UEFI:
I have tried this but it fails me:
bootloader --location=none --efi

Is there anything else I need to do in the %post section?
I’m using Rocky Linux 8.6

Thank you very much

Every installation does save the made choices as kickstart file in /root/. If you do one interactive install on UEFI, you will get a working example in that file.

I do usually use incomplete kickstart file, so that the installer fills in the blanks if it can. (Else it will ask interactively.) I do also run Ansible playbooks after install and those handle the legacy/EFI differences.

Legacy and EFI do use different bootloader (on both ISO and PXE). One can therefore have two kickstart files; one for each mode. (They can obviously include identical choices from common third file.)

The only supported Rocky 8 is the 8.7 currently.

If you are wanting to use a single kickstart to handle both UEFI and BIOS, you can take a look at how we do this in our own images: kickstarts/Rocky-8-GenericCloud-Base.ks at r8 - kickstarts - Rocky Enterprise Software Foundation Git Service

Good afternoon, thank you very much for the answers. I have added to my kickstart file the part I needed of the one you told me about and in a virtual machine with BIOS and another with UEFI and it has worked correctly. Tomorrow I will try it on a physical server. It has helped me a lot, thanks again.

On the physical server I get the error: “started cancel waiting for multipath siblings of sda”. I have consulted in another thread because I think the problem appeared but I don’t know how they solved it.

Hi. Kickstart fails on boot