Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 3e8100d

Browse files
authored
Merge pull request #92 from nevesenin/master
Fix "resizing" wrong partition when having two disks
2 parents 3bfda6a + cb52699 commit 3e8100d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sd-image/sd-image.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ in
248248
# Figure out device names for the boot device and root filesystem.
249249
rootPart=$(${pkgs.util-linux}/bin/findmnt -n -o SOURCE /)
250250
bootDevice=$(lsblk -npo PKNAME $rootPart)
251-
partNum=$(lsblk -npo MAJ:MIN $rootPart | ${pkgs.gawk}/bin/awk -F: '{print $2}')
251+
partNum=$(lsblk -npo PARTN $rootPart)
252252
253253
# Resize the root partition and the filesystem to fit the disk
254254
echo ",+," | sfdisk -N$partNum --no-reread $bootDevice

0 commit comments

Comments
 (0)