Nixos-anywhere

From NixOS Wiki
Revision as of 07:37, 4 September 2024 by M3vtfbp (talk | contribs) (Created page with "[https://github.com/nix-community/nixos-anywhere nixos-anywhere] is a tool for installing NixOS to a remote machine. It uses kexec to boot into a temporary ram based NixOS system. From there, it can erase and repartition an entire disk, and install NixOS. More information can be found on the official documents. https://github.com/nix-community/nixos-anywhere =Installing MBR= The official documents recommend installing a GPT partition table, and installing an msdos part...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

nixos-anywhere is a tool for installing NixOS to a remote machine. It uses kexec to boot into a temporary ram based NixOS system. From there, it can erase and repartition an entire disk, and install NixOS.

More information can be found on the official documents. https://github.com/nix-community/nixos-anywhere

Installing MBR

The official documents recommend installing a GPT partition table, and installing an msdos partition table is not well supported, and there are no examples. This is unfortunate, as many VPS do not use UEFI boot and are not over 4TB for the root partition. Additionally, on a VPS with limited disk space, it can be an unnecessary waste to create a separate partition for /boot. With an msdos partition table, a bootable system can be made with only 1 partition.

Fortunately, it is possible to install an msdos partition table in spite of the lack of support. Below is a simple example for installing a Btrfs root filesystem as the only WIP