Submarine
Guide (NixOS)

Install NixOS with Submarine

Note: While ARM images could technically be built aswell, they are not considered ready and therefore are not supported.

Prepare an image

  1. Either dowmload a raw-x64cros image from CI (opens in a new tab) or follow the build instructions (opens in a new tab)

  2. Write the image to an external media using dd.

  3. Reminder: to boot Submarine from external media, you first need to run the following commands as root.

sudo enable_dev_usb_boot
  1. Reboot, and on the Developer Mode screen, press Ctrl+U to boot from external media.

Partitioning

  1. After booting the image, establish network connection with NetworkManager (nmtui or nmcli).

  2. When partitioning the drive, the first partition should be a 16MB partition (64MB on aarch64) for Submarine. You do not need to create a EFI system partition (ESP) as Submarine does not use UEFI.

  3. Set the necessary flags for the Submarine partition with cgpt add -i <partition number> -t kernel -P 15 -T 1 -S 1 /dev/sdX, substituting <partition number> for the number of the Submarine partition and /dev/sdX for the block device of your internal drive.

  4. Get Submarine by running the following command.

nix build github:ninelore/flake#submarine
  1. Write the Submarine .kpart found in result/share/submarine/ to the Submarine partition created earlier using dd.

Installing

Proceed to install NixOS like you would from the official minimal ISO. Here is a quick tl;dr:

  1. Mount your filesystem to /mnt, do not mount the Submarine partition.

  2. Run nixos-generate-config --root /mnt to generate a basic NixOS configuration in /mnt/etc/nixos/.

  3. Configure your system by editing /mnt/etc/nixos/configuration.nix or bring your existing configuration.

  4. Once your configuration is ready, run nixos-install.

Postinstall

After you've finished installing, reboot and press Ctrl+D to boot from internal disk. If you did everything right, you should be looking at the Submarine boot menu. Select the number that corresponds to your new NixOS Generation to boot into NixOS.

For audio fixes for running Linux on Chromebooks, take a look at the NixOS Modules provided in ninelore's flake (opens in a new tab).

Note

Fyra Labs is not affiliated with the developers of NixOS, this guide is unofficial.