forked from mirrors/nixpkgs
iso-image: Hide rEFInd from menu in known non-working situations
Looks like GRUB has issues loading EFI binaries from (cd0), which is what would be used in e.g. qemu with OVMF with `-cdrom`. Apparently also what is used with AArch64 + U-Boot USB.
This commit is contained in:
parent
9413da26fd
commit
cb5c4fcd3c
|
@ -365,11 +365,13 @@ let
|
||||||
}
|
}
|
||||||
|
|
||||||
${lib.optionalString (refindBinary != null) ''
|
${lib.optionalString (refindBinary != null) ''
|
||||||
menuentry 'rEFInd' --class refind {
|
# GRUB apparently cannot do "chainloader" operations on "CD".
|
||||||
# UUID is hard-coded in the derivation.
|
if [ "\$root" != "cd0" ]; then
|
||||||
search --set=root --no-floppy --fs-uuid 1234-5678
|
menuentry 'rEFInd' --class refind {
|
||||||
chainloader (\$root)/EFI/boot/${refindBinary}
|
# \$root defaults to the drive the EFI is found on.
|
||||||
}
|
chainloader (\$root)/EFI/boot/${refindBinary}
|
||||||
|
}
|
||||||
|
fi
|
||||||
''}
|
''}
|
||||||
menuentry 'Firmware Setup' --class settings {
|
menuentry 'Firmware Setup' --class settings {
|
||||||
fwsetup
|
fwsetup
|
||||||
|
|
Loading…
Reference in a new issue