NixOS on ARM/Installation: Difference between revisions
m Splitting this too |
m removed mention of a specific nixos version in the command. |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{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.}} | {{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.}}<!-- | |||
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. | |||
Finally, "first boot". This will include hints about configuring `console=` by manually editing `extlinux.conf` for e.g. serial on Rockchip systems. | |||
--> | |||
== Installation == | == Installation == | ||
Line 15: | Line 42: | ||
For <code>AArch64</code> it is possible to download images from Hydra. | For <code>AArch64</code> it is possible to download images from Hydra. | ||
* [https://hydra.nixos.org/job/nixos/release- | * [https://hydra.nixos.org/job/nixos/release-24.05/nixos.sd_image.aarch64-linux 24.05] | ||
* [https://hydra.nixos.org/job/nixos/trunk-combined/nixos.sd_image.aarch64-linux unstable (LTS kernel)] | * [https://hydra.nixos.org/job/nixos/trunk-combined/nixos.sd_image.aarch64-linux unstable (LTS kernel)] | ||
* [https://hydra.nixos.org/job/nixos/trunk-combined/nixos.sd_image_new_kernel_no_zfs.aarch64-linux unstable (Latest kernel)] | * [https://hydra.nixos.org/job/nixos/trunk-combined/nixos.sd_image_new_kernel_no_zfs.aarch64-linux unstable (Latest kernel)] | ||
On the page click on the latest successful build to get a download link under build products. | On the page click on the latest successful build to get a download link under build products. | ||
=== Installation steps === | === Installation steps === | ||
Line 27: | Line 52: | ||
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. | 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 <code>/dev/mmcblk0</code> with the path to the SD card (use <code>dmesg</code> to find it out). | Once the NixOS image file is downloaded, run the following command to install the image onto the SD Card, replace <code>/dev/mmcblk0</code> with the path to the SD card (use <code>dmesg</code> to find it out) and image.img with the path to the image. | ||
<code> | <code> | ||
sudo dd if= | sudo dd if=image.img of=/dev/mmcblk0 | ||
</code> | </code> | ||
Line 36: | Line 61: | ||
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. | 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: If the image has the extension <code>.zst</code>, it will need to be decompressed before writing to installation device. Use | |||
<code>nix-shell -p zstd --run "zstdcat image.img.zst | dd of=/dev/mmcblk0 status=progress"</code> | |||
to decompress the image on-the-fly. | |||
{{note| For some platforms, manually editing and adding kernel command-line arguments to <code>/boot/extlinux/extlinux.conf</code> may be needed for serial to work, and is "as" supported as would be editing the command-line manually during boot.}} | {{note| For some platforms, manually editing and adding kernel command-line arguments to <code>/boot/extlinux/extlinux.conf</code> 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]]. | Continue with [[NixOS_on_ARM/Initial_Configuration]]. |
Latest revision as of 19:18, 1 August 2024
Installation
Getting the installer
UEFI iso
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.
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) and image.img with the path to the image.
sudo dd if=image.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: If the image has the extension .zst
, it will need to be decompressed before writing to installation device. Use
nix-shell -p zstd --run "zstdcat image.img.zst | dd of=/dev/mmcblk0 status=progress"
to decompress the image on-the-fly.
Continue with NixOS_on_ARM/Initial_Configuration.