Hi all,
I am trying to install NixOs from USB drive via the graphical installer. It seem to install fine, but fails only when it comes to the bootloader. Here is what I have done so far:
- I checked that system is using UEFI
- I disabled Secure boot state in UEFI settings
- I disabled CSM in UEFI settings
- I checked if there are other boot partitions present. There are none.
- I looked inside the desired boot partition and there is are 1. EFI/BOOT/BOOTX64.EFI 2. EFI/Linux/ which is empty and 3. EFI/systemd/systemd-bootx64.efi
- Here are the logs.
I also did some variations with the CSM / secure boot settings without success. As far as I see NixOs is build and ready, because the installation is failing fast. Only the boot loader cannot be installed. My mainboard is a ASUS Z97-AR.
Any help is very welcome.
Here is the relevant error in that log:
Failed to write 'LoaderSystemToken' EFI variable: Invalid argument"
That’s rather surprising, and indicates buggy firmware. Regardless, you can fix this by setting boot.loader.systemd-boot.graceful = true;
to make the error non-fatal, or by setting boot.loader.efi.canTouchEfiVariables = false;
to avoid it altogether. Though disabling canToucheEfiVariables
will prevent adding NixOS to the UEFI boot order, relying on the firmware to boot the fallback $ESP/EFI/BOOT/BOOTX64.EFI
loader that NixOS will try to manage, and some firmwares won’t do this if there’s any other OS to boot.
3 Likes
Thank you for your explanation and suggestions. I try to flash my firmware to the most current version that hopefully is less buggy.
A more basic question arises from this: How do I add this lines as I use the graphical installer via USB till now. Where do the configuration files live (USB/RAM/…) and how do I start the rebuild with them. I am only used to nixos-rebuild switch
after the installation was successful and the system is ready for tweaking. I searched a little bit and found some instruction via chroot
. It’s not clear to me how this works and if it is necessary.
Thanks for guidance in advance.