nix-community / nixos-images

Automatically build (netboot) images for NixOS [maintainer=@Mic92]
MIT License
187 stars 35 forks source link
nix-community-buildbot

nixos-images

Automatically weekly updated images for NixOS. This project is intended to extend the images created by hydra.nixos.org. We are currently creating the images listed below:

Kexec tarballs

These images are used for unattended remote installation in nixos-anywhere.

Kexec is a mechanism in Linux to load a new kernel from a running Linux to replace the current kernel. This is useful for booting the Nixos installer from existing Linux distributions, such as server provider that do not offer a NixOS option. After running kexec, the NixOS installer exists only in memory. At the time of writing, this requires secure boot off in BIOS settings and at least 1GB of physical RAM (swap does not count) in the system. If not enough RAM is available, the initrd cannot be loaded. Because the NixOS runs only in RAM, users can reformat all the system's discs to prepare for a new NixOS installation.

It can be booted as follows by running these commands as root:

curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root
/root/kexec/run

The kexec installer comes with the following features:

The actual kexec happens with a slight delay (6s). This allows for easier integration into automated nixos installation scripts, since you can cleanly disconnect from the running machine before the kexec takes place. The tarball is also designed to be run from NixOS, which can be useful for new installations

Iso installer images

This image allows to boot a NixOS installer off a USB-Stick. This installer has been optimized for remote installation i.e. with nixos-anywhere and clan notably:

Screenshot of the installer

Netboot images

You can boot the netboot image using this ipxe script. It consists of the kernel image and initrd.