mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 11:36:04 +01:00
Merge pull request #92 from nevesenin/master
Fix "resizing" wrong partition when having two disks
This commit is contained in:
commit
3e8100d5e9
1 changed files with 1 additions and 1 deletions
|
|
@ -248,7 +248,7 @@ in
|
||||||
# Figure out device names for the boot device and root filesystem.
|
# Figure out device names for the boot device and root filesystem.
|
||||||
rootPart=$(${pkgs.util-linux}/bin/findmnt -n -o SOURCE /)
|
rootPart=$(${pkgs.util-linux}/bin/findmnt -n -o SOURCE /)
|
||||||
bootDevice=$(lsblk -npo PKNAME $rootPart)
|
bootDevice=$(lsblk -npo PKNAME $rootPart)
|
||||||
partNum=$(lsblk -npo MAJ:MIN $rootPart | ${pkgs.gawk}/bin/awk -F: '{print $2}')
|
partNum=$(lsblk -npo PARTN $rootPart)
|
||||||
|
|
||||||
# Resize the root partition and the filesystem to fit the disk
|
# Resize the root partition and the filesystem to fit the disk
|
||||||
echo ",+," | sfdisk -N$partNum --no-reread $bootDevice
|
echo ",+," | sfdisk -N$partNum --no-reread $bootDevice
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue