From c30870f266d19e305d4163184ff4d812be022fec Mon Sep 17 00:00:00 2001 From: David Arnold Date: Thu, 12 Aug 2021 20:45:47 -0500 Subject: [PATCH 1/4] imp: bootstrap docs --- doc/start/bootstrapping.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/start/bootstrapping.md b/doc/start/bootstrapping.md index 873af32..80fbd61 100644 --- a/doc/start/bootstrapping.md +++ b/doc/start/bootstrapping.md @@ -21,6 +21,9 @@ partition to `/mnt/boot`: $ mount /dev/disk/by-label/nixos /mnt $ mkdir -p /mnt/boot && mount /dev/disk/by-label/boot /mnt/boot # UEFI only $ swapon /dev/$your_swap_partition +# add some extra space to the store, it's running on a tmpfs on your RAM +$ mkdir -p /mnt/tmpstore/{work,store} +$ mount -t overlay overlay -olowerdir=/nix/store,upperdir=/mnt/tmpstore/store,workdir=/mnt/tmpstore/work /nix/store ``` ## Install @@ -30,12 +33,9 @@ from the time the iso was built: ```console $ cd /iso/devos -$ nix develop -$ flk install NixOS --impure # use same host as above +$ nixos-install --flake .#NixOS # use same host as above ``` - - ## Notes of interest ### Remote access to the live installer From 32bddf6403895f104bb72d4ba7e113a61bafef70 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Thu, 12 Aug 2021 20:48:30 -0500 Subject: [PATCH 2/4] fix: docs bootsrtap - swap disk by label (easied copy/paste) --- doc/start/bootstrapping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/start/bootstrapping.md b/doc/start/bootstrapping.md index 80fbd61..09cb34f 100644 --- a/doc/start/bootstrapping.md +++ b/doc/start/bootstrapping.md @@ -20,7 +20,7 @@ partition to `/mnt/boot`: ```console $ mount /dev/disk/by-label/nixos /mnt $ mkdir -p /mnt/boot && mount /dev/disk/by-label/boot /mnt/boot # UEFI only -$ swapon /dev/$your_swap_partition +$ swapon /dev/disk/by-label/swap # add some extra space to the store, it's running on a tmpfs on your RAM $ mkdir -p /mnt/tmpstore/{work,store} $ mount -t overlay overlay -olowerdir=/nix/store,upperdir=/mnt/tmpstore/store,workdir=/mnt/tmpstore/work /nix/store From c46d923876420cdfe0fc805dc70221a214e6d20e Mon Sep 17 00:00:00 2001 From: David Arnold Date: Thu, 12 Aug 2021 20:51:18 -0500 Subject: [PATCH 3/4] fix: iso docs w.r.t. bud burn and bootstrap.nix --- doc/start/iso.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/start/iso.md b/doc/start/iso.md index 8f5c6ab..76af1c6 100644 --- a/doc/start/iso.md +++ b/doc/start/iso.md @@ -1,11 +1,9 @@ # ISO -Making and writing an installable iso for `hosts/NixOS.nix` is as simple as: +Making and writing an installable iso for `hosts/bootstrap.nix` is as simple as: ```sh -bud build NixOS bootstrapIso - -dd bs=4M if=result/iso/*.iso of=/dev/$your_installation_device \ - status=progress oflag=sync +bud build bootstrap bootstrapIso +sudo -E $(which bud) burn ``` This works for any host. From 079adc4474231d5582fee5574bc5bcc6f133e5ac Mon Sep 17 00:00:00 2001 From: David Arnold Date: Thu, 12 Aug 2021 20:57:22 -0500 Subject: [PATCH 4/4] fix: more docs w.r.t. bootstrap iso --- doc/start/bootstrapping.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/start/bootstrapping.md b/doc/start/bootstrapping.md index 09cb34f..f4c5190 100644 --- a/doc/start/bootstrapping.md +++ b/doc/start/bootstrapping.md @@ -21,19 +21,22 @@ partition to `/mnt/boot`: $ mount /dev/disk/by-label/nixos /mnt $ mkdir -p /mnt/boot && mount /dev/disk/by-label/boot /mnt/boot # UEFI only $ swapon /dev/disk/by-label/swap -# add some extra space to the store, it's running on a tmpfs on your RAM +``` + +Add some extra space to the store. In the iso, it's running on a tmpfs +off your RAM: +```console $ mkdir -p /mnt/tmpstore/{work,store} $ mount -t overlay overlay -olowerdir=/nix/store,upperdir=/mnt/tmpstore/store,workdir=/mnt/tmpstore/work /nix/store ``` ## Install -Install using the `flk` wrapper baked into the iso off of a copy of devos -from the time the iso was built: +Install off of a copy of devos from the time the iso was built: ```console $ cd /iso/devos -$ nixos-install --flake .#NixOS # use same host as above +$ nixos-install --flake .#NixOS ``` ## Notes of interest @@ -42,7 +45,7 @@ $ nixos-install --flake .#NixOS # use same host as above The iso live installer comes preconfigured with a network configuration which announces it's hostname via [MulticastDNS][mDNS] as `hostname.local`, -that is `NixOS.local` in the [iso example](./iso). +that is `bootstrap.local` in the [iso example](./iso). In the rare case that [MulticastDNS][mDNS] is not availabe or turned off in your network, there is a static link-local IPv6 address configured to @@ -66,7 +69,7 @@ You can then ssh into the live installer through one of the following options: ```console -ssh root@NixOS.local +ssh root@bootstrap.local ssh root@fe80::47%eno1 # where eno1 is your network interface on which you are linked to the target ```