Whenever I build a new FCOS with “my” adapted coreos-assembler (with the changed grub.cfg), it creates an iso image which is installable on BIOS and EFI systems, but the grub2 stuff only works for BIOS systems, because grub.cfg and grubenv is located in /boot/grub2 instead of /boot/efi/EFI/fedora…and also the symlinks are missing… This results in not executing the grub code at boot time (because it is not found in efi context)…
Now to the question: Can someone give me a hint how to make the image build in a way, that grub files are located correctly in the efi directory? Do I have to change something in coreos-assembler or in config repo or somewhere else?
It is about the 1st one, which is located and customized in coreos-assembler src directory. The problem is that after cosa build metal (and iso image), and an bare metal (or VM installation), the grub.cfg is in /boot/grub2 and not in /boot/efi/EFI/fedora…
I see some harcoded stuff in create_disk.sh (coreos-assembler/src) on line 343:
local vendordir=“${target_efi}/EFI/${vendor_id}”
mkdir -p “${vendordir}”
cat > ${vendordir}/grub.cfg << ‘EOF’
search --label boot --set prefix
set prefix=($prefix)
configfile $prefix/grub2/grub.cfg
boot
EOF
which creates me the grub.cfg loading the one in /boot/grub2…
…but when I compare with a Fedora IoT installation, the “master” grub.cfg should be in /boot/efi/EFI/fedora and also its grubenv blockfile (which is symlinked from /boot/grub2)…
I guess it gets too “hacky” when i edit the create_disk.sh script;-)