about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/installer
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-09-28 15:30:15 +0000
committerAlyssa Ross <hi@alyssa.is>2019-09-28 22:14:42 +0000
commit80e4dc93ce4bb109cd00a98f0b39151f09de9d9b (patch)
tree64aa611a6a199dc0f40fc56d050d99e125e5c830 /nixpkgs/nixos/modules/installer
parentbfa679f5a8e9beff6008ea0e9d5eabfa68018e20 (diff)
parent2436c27541b2f52deea3a4c1691216a02152e729 (diff)
downloadnixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.gz
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.bz2
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.lz
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.xz
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.tar.zst
nixlib-80e4dc93ce4bb109cd00a98f0b39151f09de9d9b.zip
Merge commit '2436c27541b2f52deea3a4c1691216a02152e729'
Diffstat (limited to 'nixpkgs/nixos/modules/installer')
-rw-r--r--nixpkgs/nixos/modules/installer/cd-dvd/sd-image.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixpkgs/nixos/modules/installer/cd-dvd/sd-image.nix b/nixpkgs/nixos/modules/installer/cd-dvd/sd-image.nix
index 0a0150441554..a2a8e8ef7522 100644
--- a/nixpkgs/nixos/modules/installer/cd-dvd/sd-image.nix
+++ b/nixpkgs/nixos/modules/installer/cd-dvd/sd-image.nix
@@ -174,8 +174,10 @@ in
     boot.postBootCommands = ''
       # On the first boot do some maintenance tasks
       if [ -f /nix-path-registration ]; then
+        set -euo pipefail
+        set -x
         # Figure out device names for the boot device and root filesystem.
-        rootPart=$(readlink -f /dev/disk/by-label/NIXOS_SD)
+        rootPart=$(${pkgs.utillinux}/bin/findmnt -n -o SOURCE /)
         bootDevice=$(lsblk -npo PKNAME $rootPart)
 
         # Resize the root partition and the filesystem to fit the disk