Skip to content

Commit

Permalink
sdImage: use findmnt to get root device when resizing (#58059)
Browse files Browse the repository at this point in the history
sdImage: use findmnt to get root device when resizing
  • Loading branch information
infinisil authored Sep 20, 2019
2 parents d484f2b + bd7bcb5 commit f47ef8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nixos/modules/installer/cd-dvd/sd-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f47ef8f

Please sign in to comment.