boot.loader.grub.memtest86.enable = true;
creates this entry in grub.cfg
:
menuentry "Memtest86+" {
linux ($drive1)/boot/memtest.bin
}
But what is the proper way of getting memtest.bin into that location?
The docs actually provide an example of installing memtest.bin using extraFiles
like I have below, but that puts it in /boot/efi/memtest.bin
, not /boot/memtest.bin
Is this a bug, or am I missing something? Does boot.loader.grub.memtest86.enable
need to be fixed to use linux ($drive1)/boot/efi/memtest.bin
?
boot.loader.grub = {
enable = true;
extraEntriesBeforeNixOS = false;
default = "saved"; # remember last booted entry
devices = [ "nodev" ]; # wiki says it is ignored with EFI, but we need to set it to some value
efiSupport = true;
efiInstallAsRemovable = true; # helpful for portability?
useOSProber = true; # generate grub entry for existing OS (I had Windows on another disk with an MBR bootloader, so before this would work I had to convert that disk to GPT partition table and EFI boot loader, using Microsoft mbr2gpt - see https://answers.microsoft.com/en-us/windows/forum/all/convert-an-existing-windows-10-installation-from/aa8c2de3-460b-4a8c-b30b-641405f800d7)
splashImage = null; # see https://discourse.nixos.org/t/how-to-apply-the-breeze-grub-theme/4341/6
#theme = "${pkgs.kdePackages.breeze-grub}/grub/themes/breeze"; # not good
memtest86.enable = true; # package needs to be installed separately
extraFiles = { "memtest.bin" = "${pkgs.memtest86plus}/memtest.bin"; };
extraEntries = ''
menuentry "Reboot" --class reboot {
reboot
}
menuentry "Reboot to UEFI setup (~Bios)" --class bios {
fwsetup
}
menuentry "Poweroff" --class shutdown {
halt
}
'';
Thanks.