image-specs/rpi3-resizerootfs
2018-07-11 06:49:42 +02:00

10 lines
195 B
Bash
Executable File

#!/bin/sh
roottmp=$(lsblk -l -o MAJ:MIN,MOUNTPOINT | grep '/$')
rootpart=/dev/block/${roottmp% /}
rootdev=${rootpart%:*}:0
printf "y\n-1s\n" | parted $rootdev resizepart 2
resize2fs $rootpart