Screw parted, use sfdisk

This commit is contained in:
Christian Schlüter 2018-07-14 21:57:03 +02:00
parent 9adfac6964
commit d4874ba3df
No known key found for this signature in database
GPG Key ID: 4955EB2D53B5CBD2
1 changed files with 5 additions and 1 deletions

View File

@ -4,6 +4,10 @@ roottmp=$(lsblk -l -o MAJ:MIN,MOUNTPOINT | grep '/$')
rootpart=/dev/block/${roottmp% /}
rootdev=${rootpart%:*}:0
printf "y\n-1s\n" | parted $rootdev resizepart 2
sfdisk -f $rootdev -N 2 <<EOF
,+
EOF
partprobe
resize2fs $rootpart