installed nixos 24.11 to my machine. while trying to do nixos-rebuild switch the error
“failled to install bootloader” apper. Here is a log
sudo nixos-rebuild switch
[sudo] password for user:
building Nix…
building the system configuration…
efiSysMountPoint = ‘/boot’ is not a mounted partition. Is the path configured correctly?
Traceback (most recent call last):
File “/nix/store/jqj71r0jr6x6jc4009i1ah09rnrvmz5g-systemd-boot/bin/systemd-boot”, line 435, in
main()
File “/nix/store/jqj71r0jr6x6jc4009i1ah09rnrvmz5g-systemd-boot/bin/systemd-boot”, line 415, in main
run([CHECK_MOUNTPOINTS])
File “/nix/store/jqj71r0jr6x6jc4009i1ah09rnrvmz5g-systemd-boot/bin/systemd-boot”, line 58, in run
return subprocess.run(cmd, check=True, text=True, stdout=stdout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/nix/store/zv1kaq7f1q20x62kbjv6pfjygw5jmwl6-python3-3.12.7/lib/python3.12/subprocess.py”, line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘[’/nix/store/rp6yhapgwv5yad023117digxawm4la1n-check-mountpoints’]’ returned non-zero exit status 1.
Failed to install bootloader
warning: error(s) occurred while switching to the new configuration
I tried system.build.installBootLoader = “${pkgs.coreutils}/bin/true”;
but no luck
Here’s a relevant line from the logs you provided:
efiSysMountPoint = ‘/boot’ is not a mounted partition. Is the path configured correctly?
It says that your /boot
isn’t mounted [correctly].
ok so I have to mount it? The system is read-only
What do you mean by “the system is read-only?” It shouldn’t be.
/nix/store
is read-only yes, there’s no reason to touch anything there. What @thefossguy said was to mount whatever EFI system partition (ESP) under /boot
Or you must change your configuration to point at wherever your ESP is actually located at.
About /nix/store Is there a way to edit a package conf file on nix without learning entire nix language? Few packages use conf files say nano.conf and if you want to edit, well, I assume you need to paste that to configuration.nix or compile it yourself.
About ESP. Is it normal that I can boot and type from my machine tho the /boot not mounted.
I managed to mount /nix/store with /boot partition
building Nix…
building the system configuration…
File system “/boot” is not a FAT EFI System Partition (ESP) file system.
systemd-boot not installed in ESP.
No default/fallback boot loader installed in ESP.
Traceback (most recent call last):
File “/nix/store/jqj71r0jr6x6jc4009i1ah09rnrvmz5g-systemd-boot/bin/systemd-boot”, line 435, in
main()
File “/nix/store/jqj71r0jr6x6jc4009i1ah09rnrvmz5g-systemd-boot/bin/systemd-boot”, line 418, in main
install_bootloader(args)
File “/nix/store/jqj71r0jr6x6jc4009i1ah09rnrvmz5g-systemd-boot/bin/systemd-boot”, line 342, in install_bootloader
raise Exception(“could not find any previously installed systemd-boot”)
Exception: could not find any previously installed systemd-boot
Failed to install bootloader
warning: error(s) occurred while switching to the new configuration
Same issue
did I mounted it properly?