NixOS installation succeeds but there's no boot option

I’ve downloaded nixos-gnome-23.05.1875.8df7a67abaf-x86_64-linux.iso from the official NixOS download page, flashed a USB drive with Etcher, booted into the live USB, selected the default installation option in the menu, connected to my Wi-Fi, went through the installation process, selected “Erase disk” on the partitioning screen, and then finished the installation successfully.
However, after removing my USB drive and rebooting the computer there’s only 3 boot options in the firmware interface:

  1. UEFI: PXE IP6 Realtek PCIe GBE Family Controller
  2. UEFI: PXE IP4 Realtek PCIe GBE Family Controller
  3. UEFI OS (PO: WDC WD10SPZX-00Z10T0)

Booting into any of these just throws me back into the firmware interface. I have repeated the installation process 2 times with the same result.

Check the EFI partition to see if grub or systemd-boot were installed. If you installed NixOS with the graphical installer, then try the manual (commandline) installer.

Is Secure Boot enabled?

I went and followed this manual installation guide and got the installation to work.

I’m having the same issue, with both the graphical and command-line installations.

The /boot partition seems to have systemd-boot installed but notably /boot/loader/entries is empty

Also have the same problem.

Finaly, I found a solution for my install. Even if I have UEFI devices and it works very well with Arch and Debian, I have deactivated UFI boot and I have activated the Legacy mode in my BIOS. After a last reinstall, I was able to boot.

After this initial frustration, I must say that I have a lot of fun with strange but fascinating distro. I have tried a lot of install and uninstall of lot of software. I know that with any other distros I tried, the install would break down. I’m flabergasted. This distro is indesctructible!!!

There’s a good chance completely disabling legacy bios support would make the uefi install succeed (in all these cases).

The NixOS installer has both an MBR and a UEFI boot loader. Therefore your motherboard may detect that the USB has an MBR, and immediately go “oh, this must be a legacy drive then, lemme boot it in legacy mode’” without checking for an efi partition.

At that point the installer can’t access the firmware for an EFI install, so it installs an MBR, and finally your motherboard doesn’t offer the legacy boot option when it’s not scanning removable media, resulting in the vanished installation.

I think other distros have given up on MBR on their default installation media, so other distros, while not supporting legacy systems, have this particular problem less often.

To double check if you booted the installer correctly, check if /sys/firmware/efi exists. If it does not, fiddle with your boot options until it does, or get a refund for your laptop because its firmware is crap.

:slight_smile: Note that software still often leaves crap lying around, which may cause hiccups if you reinstall it. For full indestructibility, you can experiment with setups like this - can be quite a chore to get working, though.

1 Like

I have the same issue. I am trying to install NixOS on a HP Thin Client T620. I have disabled legacy support and am using uefi.
Installer works and finishes the installation. After restart there is no boot option. It seems to work when I use BIOS.

Installer seems to work fine at first though. It creates an EFI Partition and a Linux one opposed to the single partition it creates in legacy mode. It mounts /dev/sda1 and 2 to /tmp/calamares-root- and /boot. What I did notice though is that the boot folder is completely empty.

1 Like

@relief-melone Did you get this figured out? I am having similar trouble with NixOS able to boot into the installer after I change to OtherOS from windows EFI mode, but it will then install and not boot. Sometimes it will shows multiple EFI partitions in my bios boot loader as well. But even when it shows correct partitions, trying to boot takes me immediately back to the BIOS firmware screen.

I’ve tried disabling legacy boot, disabling secure boot and UEFI, but nothing works.

I am on an old ASUS z97-A motherboard with i7-4790k and AMD 5600 GPU

Is the boot partition also empty in your case?

Is that something I can check inside the installation media?

Yeah, just mount the boot drive the installer created and look inside it.

@catskinner sorry for the late reply. For my HP-T620 the solution was the following

  • Enable Legacy boot and disable secure boot in the secitury boot options
  • Disable the EFI boot section in the boot order
  • Install NixOS - You should notice a difference as the legacy installer splash screen differs from the efi one (at least for the 23.11 version which was the one used at the time I had the issue)

After that installation worked for me and NixOS booted in the end.

For the successor HP-T630 that I also have booting with efi worked so it seems there are some devices which already have an efi boot option but are still somehow incompatible with NixOS booting over EFI.

Maybe someone with more expertise has an idea what the root cause of this is. But at least in my case the process described in the beginning did solve my issue