image-specs/rpi3-resizerootfs

14 lines
194 B
Plaintext
Raw Normal View History

#!/bin/sh
2017-10-08 20:18:48 +00:00
roottmp=$(lsblk -l -o MAJ:MIN,MOUNTPOINT | grep '/$')
rootpart=/dev/block/${roottmp% /}
rootdev=${rootpart%:*}:0
2017-10-08 20:18:48 +00:00
2018-07-14 19:57:03 +00:00
sfdisk -f $rootdev -N 2 <<EOF
,+
EOF
partprobe
2017-10-08 20:18:48 +00:00
resize2fs $rootpart