Raspi-image-spec/rpi3-resizerootfs

10 lines
195 B
Plaintext
Raw Normal View History

#!/bin/sh
2017-10-08 21:18:48 +01:00
roottmp=$(lsblk -l -o MAJ:MIN,MOUNTPOINT | grep '/$')
rootpart=/dev/block/${roottmp% /}
rootdev=${rootpart%:*}:0
2017-10-08 21:18:48 +01:00
2018-07-11 05:49:42 +01:00
printf "y\n-1s\n" | parted $rootdev resizepart 2
2017-10-08 21:18:48 +01:00
resize2fs $rootpart