From eac933beb8a7e02f1d45f5cd24fd09919ec97713 Mon Sep 17 00:00:00 2001 From: Drew Bonasera Date: Sat, 3 Feb 2018 17:38:31 -0500 Subject: [PATCH] Add `-a minimal` to parted call to fix errors with some images --- pishrink.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pishrink.sh b/pishrink.sh index cc5a671..9e57e6b 100755 --- a/pishrink.sh +++ b/pishrink.sh @@ -169,7 +169,7 @@ sleep 1 losetup -d "$loopback" partnewsize=$(($minsize * $blocksize)) newpartend=$(($partstart + $partnewsize)) -parted -s "$img" rm $partnum >/dev/null +parted -s -a minimal "$img" rm $partnum >/dev/null parted -s "$img" unit B mkpart primary $partstart $newpartend >/dev/null #Truncate the file