$ nix-build -A boot

The boot derivation creates a disk image with a FAT16 file system. It contains the kernel, the initrd, and the syslinux configuration.

It can be put in place in the complete, formatted raw disk image with dd.


The reason a FAT16 parition is used instead of an EXT4 partition (either the same as the toplevel, or a dedicated boot partition), is that I didn’t manage to build a bootable EXT4 partition without using a root account (with sudo) and mounting the image (with losetup and mount).

The only way I could find to install a bootloader without root and mount was to use syslinux on a FAT16 parition.