#!/bin/sh
roottmp=$(lsblk -l -o MAJ:MIN,MOUNTPOINT | grep '/$')
rootpart=/dev/block/${roottmp% /}
rootdev=${rootpart%:*}:0
sfdisk -f $rootdev -N 2 <<EOF
,+
EOF
partprobe
resize2fs $rootpart