Bootloader: Difference between revisions

imported>Samueldr
m Updates new generation section, there is a possibly useless recommendation of re-installing the bootloader.
imported>Samueldr
m Adds a section about recalcitrant UEFI implementations.
Line 46: Line 46:


If for some reason it is impossible to boot the existing generations, follow the steps in [[#Re-installing the bootloader]] to re-generate the menu entries, then boot in your system to add the missing configuration. The next generations should work as expected in your bootloader.
If for some reason it is impossible to boot the existing generations, follow the steps in [[#Re-installing the bootloader]] to re-generate the menu entries, then boot in your system to add the missing configuration. The next generations should work as expected in your bootloader.
=== Wrangling recalcitrant UEFI implementations ===
Some UEFI implementations are ''just bad™''. Some symptoms include:
* Losing bootloader configuration choices either randomly, or on disk disconnection.
* Not being able to manually edit the bootloader configuration.
* Not being able to save the bootloader configuration.
* Not being able to boot arbitrary bootloader configuration.
For those problematic EFI setup, or for a portable NixOS setup, it is possible to make use of the default path of the OS loader.
* For an x86_64 computer, this path is <tt>/EFI/BOOT/BOOTX64.EFI</tt>. Try this one first.
* For extremely problematic EFI implementations, an alternative path can be used, the default ''Windows'' bootloader location: <tt>/EFI/Microsoft/Boot/bootmgfw.efi</tt>.<ref>https://github.com/NixOS/nixpkgs/pull/35528</ref>
As a recommendation, you can either copy the default NixOS bootloader (which will be in the <tt>/EFI/NixOS-boot/</tt> folder) or install an secondary bootloader like [[rEFInd]]. A copied NixOS bootloader will not be updated by the NixOS configuration. Using a secondary bootloader will add an intermediary step during the boot process, which can be customized to be as short as wanted, but should allow selecting EFI programs, even on different disks.
Alternatively, when using grub, using the <code>boot.loader.grub.efiInstallAsRemovable</code> option will install the bootloader at the default <tt>/EFI/BOOT/BOOTX64.EFI</tt> location.


<hr />
<hr />