From a6c0cc19adb81daeebbb3bb13f8848d69ed096b4 Mon Sep 17 00:00:00 2001 From: Francisco Jose R M Date: Sat, 20 Jun 2020 11:28:24 +0000 Subject: [PATCH] Update rpi-resizerootfs mmcblk0p1 versus sda1 --- rpi-resizerootfs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rpi-resizerootfs b/rpi-resizerootfs index 217c20c..124f342 100755 --- a/rpi-resizerootfs +++ b/rpi-resizerootfs @@ -1,9 +1,7 @@ #!/bin/sh -roottmp=$(lsblk -l -o NAME,MOUNTPOINT | grep '/$') -rootpart=/dev/${roottmp%% */} -rootdev=${rootpart%2} -rootdev=${rootdev%p} +rootpart="$(findmnt -n -o SOURCE /)" +rootdev="/dev/$(lsblk -no pkname "$rootpart")" flock $rootdev sfdisk -f $rootdev -N 2 <