I have UEFI and GPT disk. When i installed nixos, the installer forced me to mount /boot on my EFI partition. And GRUB installs linux kernels to /boot. When i used arch i made the following: i mounted my EFI patrition on /EFI and installed GRUB there. but my /boot folder was not mouned to EFI or any other partition. There way only GRUB physically installed on EFI partition and all kernel images where stored on my main partition. This way i could install kernels without worrying that space on EFI partition may ran out and i will have to move partitions around. Right now i have it configured the conventional way on my NixOs where /boot is mounted on EFI and both GRUB and kernel images are stored on EFI partition. Is there any way to configure NIxos the way i did in arch?
I have already moved partitions around once to expand EFI. And now i made an upgrade and now switch-rebuild fails because i have no space on EFI to put a new kernel image. I know i can move partitions around but i don’t want to do so. I want my kernels and initrmfss to be stored on main partition. How do i do it? My current GRUB config:
boot.loader.grub ={ enable = true; efiSupport = true; device = "nodev"; useOSProber = true; }; boot.loader.efi.canTouchEfiVariables = true;
You can just change where the ESP is mounted to another path and set boot.loader.efi.efiSysMountPoint
to that path and it’ll do what you want. Remount the partition where you like and rerun nixos-generate-config
to rewrite hardware-configuration.nix
to use the new mountpoint, and then manually set efiSysMountPoint
in your configuration.nix
. In fact, when /boot
isn’t a separate partition at all, grub won’t even copy the kernels there; it’ll just find them in /nix/store
.
1 Like