Raspi-image-spec/rpi3-resizerootfs

10 lines
183 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
parted -s $rootdev resizepart 2 100%
2017-10-08 21:18:48 +01:00
resize2fs $rootpart