NixOS on ARM/UEFI: Difference between revisions
imported>Samueldr m more |
imported>Samueldr m 👀 |
||
| Line 33: | Line 33: | ||
Believe me or not, it's more likely that you can, if your SBC is well supported by mainline ''U-Boot''. ''U-Boot'' provides enough UEFI to comply with EBBR, which in turn is enough to allow us to boot the <tt>AArch64</tt> UEFI NixOS iso, and with almost no differences compared to the <tt>x86_64</tt> guide, simply follow the installation instruction to boot into an installed system. | Believe me or not, it's more likely that you can, if your SBC is well supported by mainline ''U-Boot''. ''U-Boot'' provides enough UEFI to comply with EBBR, which in turn is enough to allow us to boot the <tt>AArch64</tt> UEFI NixOS iso, and with almost no differences compared to the <tt>x86_64</tt> guide, simply follow the installation instruction to boot into an installed system. | ||
=== Getting an Initial Boot Firmware === | === Getting an ''Initial Boot Firmware'' === | ||
{{expansion|for now, left as an exercise to the reader... More will be coming soon.}} | {{expansion|for now, left as an exercise to the reader... More will be coming soon.}} | ||
=== Installing === | |||
Following [https://nixos.org/manual/nixos/stable/index.html#sec-installation the usual installation steps for UEFI] is almost enough. Here's what you need to be mindful about. | |||
==== Shared Firmware Storage ==== | |||
{{note|This will make more sense when ''Getting an Initial Boot Firmware'' is finished...}} | |||
If your ''Initial Boot Firmware'' lives on the target installation storage, e.g. written to an SD card and you install to the same SD card, you will need need to make sure that: | |||
* You are not overwriting the firmware, if it is not protected by a partition. | |||
* The partition table is not rewritten from scratch / zero. | |||
* To not delete required existing firmware partitions. | |||
{{note|If your ''Initial Boot Firmware'' is not protected by a partition, consider choosing an alternative ''Initial Boot Firmware'' installation method or distribution that protects it.}} | |||
Otherwise, you can do as you would usually, create an ESP partition, FAT32, to be mounted at <code>/boot/</code>, your preferred rootfs partition, swap if desired, etc. | |||
==== Bootloader configuration ==== | |||
Know if your ''Initial Boot Firmware'''s UEFI implementation has writable EFI vars. This is not true for all UEFI implementations on ARM, but is something to be mindful about. If it does not, {{Nixos:option|boot.loader.efi.canTouchEfiVariables}} has to be set to '''<code>false</code>'''. | |||
{{tip|Just like on <tt>x86_64</tt> [[REFInd|rEFInd]] installed to the fallback location (<code>/EFI/BOOT/BOOTAA64.EFI</code>) may be helpful.}} | |||
{{note|TBD: does systemd-boot work? I only have tested grub for the time being...}} | |||