NixOS on ARM/Installation: Difference between revisions

From NixOS Wiki
mNo edit summary
m Write notes about the expected page structure
Line 1: Line 1:
{{ARM/breadcrumb}}
{{ARM/breadcrumb}}
{{outdated|This page needs a cleanup; it was migrated from an organically evolving article from about three wikis ago. The information may still be accurate though.}}
{{outdated|This page needs a cleanup; it was migrated from an organically evolving article from about three wikis ago. The information may still be accurate though.}}<!--
Plan for now:


- Describe both main options
    - UEFI
        - Shortly describe that UEFI is the WIP next preferred path forward
        - link to UEFI page and point out caveats
    - SD image
        - Used only for U-Boot and distributions of U-Boot.
        - Previous and current "will probably just work" method.
        - Describe caveats of using an existing SD image.
The guide on this page will describe only the SD image installation method.
It will also hint that it is possible to boot the SD image and install to another media.
Though when this is done, it is important to be mindful about the platform firmware.
This section will describe how to burn the whole image
and then that it might be required to write a platform firmware to it.
This is the important part, and will have to refer back to device pages.
Troubleshooting should refer back to the troubleshooting section on the main page. (Which may end-up broken out if it gets bit.)
These instructions are generic, and means the same for any U-Boot system.
-->
== Installation ==
== Installation ==



Revision as of 01:23, 8 April 2024

Installation

Getting the installer

UEFI iso

Note: On Raspberry Pi devices, the NixOS ISO are not compatible due to hardware limitations rather than issues with the NixOS installer itself. As a result, it is recommended to use the SD card images files (.img) instead for a successful installation experience.

Continue to the UEFI page.

SD card images (SBCs and similar platforms)

For AArch64 it is possible to download images from Hydra.

On the page click on the latest successful build to get a download link under build products.

If the image has the extension .zst, it will need to be decompressed before writing to installation device. Use nix-shell -p zstd --run "unzstd <img-name>.img.zst" to decompress the image.

Installation steps

The .img files can be directly written to a microSD/SD card (minimal recommended size: 4 GB) using dd, once uncompressed from the ZSTD container. The SD card needs to be unmounted first.

Once the NixOS image file is downloaded, run the following command to install the image onto the SD Card, replace /dev/mmcblk0 with the path to the SD card (use dmesg to find it out).

sudo dd if=nixos-sd-image-23.05pre482417.9c7cc804254-aarch64-linux.img of=/dev/mmcblk0

This should be enough to get you started, you may now boot your device for the first time.

The base images are configured to boot up with a serial TTY ( RX/TX UART ) @ 115200 Baud. That way you not necessarily have to have a HDMI Display and keyboard.

Note: For some platforms, manually editing and adding kernel command-line arguments to /boot/extlinux/extlinux.conf may be needed for serial to work, and is "as" supported as would be editing the command-line manually during boot.

Continue with NixOS_on_ARM/Initial_Configuration.