Hello all,
I’m having trouble with grub2 when running sudo nixos-rebuild switch, getting these errors:
building Nix...
building the system configuration...
updating GRUB 2 menu...
lsblk: /dev/mapper/no*[0-9]: not a block device
lsblk: /dev/mapper/raid*[0-9]: not a block device
lsblk: /dev/mapper/disks*[0-9]: not a block device
Found Windows Boot Manager on /dev/nvme0n1p3@/EFI/Microsoft/Boot/bootmgfw.efi
installing the GRUB 2 boot loader on /dev/disk/by-label/boot...
Installing for i386-pc platform.
/nix/store/5mvk29ha0y7rv20da3rk739w736s9gza-grub-2.04/sbin/grub-install: warning: File system `fat' doesn't support embedding.
/nix/store/5mvk29ha0y7rv20da3rk739w736s9gza-grub-2.04/sbin/grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/nix/store/5mvk29ha0y7rv20da3rk739w736s9gza-grub-2.04/sbin/grub-install: error: will not proceed with blocklists.
/nix/store/0yhyyya13q6aw83km9lq23zc6i95bkcf-install-grub.pl: installation of GRUB on /dev/disk/by-label/boot failed
I have a different hdd with windows installed in my pc, which shows up on the grub menu, more strange however is that I’m only able to select 14 generations in the grub menu.
these are all the settings I have in my configuration.nix:
Then first decide whether you want to use grub or systemd-boot, remove the configuration for the manager you do not want to use.
I have no experience using grub in a EFI boot system, though boot.loader.grub.device needs to point to a device not a partition. On my legacy boot system it is /dev/sda, I am not sure if this is the same on an EFI system, though there is still a comment left in that config that says # or "nodev" for efi only on the line that I set the device.
On my other system, which is EFI with systemd-boot, actual boot loader config consists of two lines:
Though I have to be honest, I have no clue why I have the canTouchEfiVariables in there… I think it was suggested somewhere, but I do not remember the exact details… I am not really an EFI expert and this system is actually the first that I installed with EFI boot.
YES, it worked like a charm! Got hung up on some xorg problems but that was not because of this. Everything boot related works perfectly now, thank you so much.