iso-image: Provide the right rEFInd binary
This commit is contained in:
parent
189507a35d
commit
9413da26fd
@ -162,12 +162,14 @@ let
|
|||||||
isolinuxCfg = concatStringsSep "\n"
|
isolinuxCfg = concatStringsSep "\n"
|
||||||
([ baseIsolinuxCfg ] ++ optional config.boot.loader.grub.memtest86.enable isolinuxMemtest86Entry);
|
([ baseIsolinuxCfg ] ++ optional config.boot.loader.grub.memtest86.enable isolinuxMemtest86Entry);
|
||||||
|
|
||||||
|
refindBinary = if targetArch == "x64" || targetArch == "aa64" then "refind_${targetArch}.efi" else null;
|
||||||
|
|
||||||
# Setup instructions for rEFInd.
|
# Setup instructions for rEFInd.
|
||||||
refind =
|
refind =
|
||||||
if targetArch == "x64" then
|
if refindBinary != null then
|
||||||
''
|
''
|
||||||
# Adds rEFInd to the ISO.
|
# Adds rEFInd to the ISO.
|
||||||
cp -v ${pkgs.refind}/share/refind/refind_x64.efi $out/EFI/boot/
|
cp -v ${pkgs.refind}/share/refind/${refindBinary} $out/EFI/boot/
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
"# No refind for ${targetArch}"
|
"# No refind for ${targetArch}"
|
||||||
@ -362,11 +364,13 @@ let
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
${lib.optionalString (refindBinary != null) ''
|
||||||
menuentry 'rEFInd' --class refind {
|
menuentry 'rEFInd' --class refind {
|
||||||
# UUID is hard-coded in the derivation.
|
# UUID is hard-coded in the derivation.
|
||||||
search --set=root --no-floppy --fs-uuid 1234-5678
|
search --set=root --no-floppy --fs-uuid 1234-5678
|
||||||
chainloader (\$root)/EFI/boot/refind_x64.efi
|
chainloader (\$root)/EFI/boot/${refindBinary}
|
||||||
}
|
}
|
||||||
|
''}
|
||||||
menuentry 'Firmware Setup' --class settings {
|
menuentry 'Firmware Setup' --class settings {
|
||||||
fwsetup
|
fwsetup
|
||||||
clear
|
clear
|
||||||
|
Loading…
x
Reference in New Issue
Block a user