Fix resizerootfs
This commit is contained in:
parent
d4874ba3df
commit
4341e7353d
|
@ -4,10 +4,20 @@ roottmp=$(lsblk -l -o MAJ:MIN,MOUNTPOINT | grep '/$')
|
|||
rootpart=/dev/block/${roottmp% /}
|
||||
rootdev=${rootpart%:*}:0
|
||||
|
||||
sfdisk -f $rootdev -N 2 <<EOF
|
||||
flock $rootdev sfdisk -f $rootdev -N 2 <<EOF
|
||||
,+
|
||||
EOF
|
||||
|
||||
partprobe
|
||||
sleep 5
|
||||
|
||||
udevadm settle
|
||||
|
||||
sleep 5
|
||||
|
||||
flock $rootdev partprobe $rootdev
|
||||
|
||||
mount -o remount,rw $rootpart
|
||||
|
||||
resize2fs $rootpart
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -5,6 +5,7 @@ DefaultDependencies=no
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
TimeoutSec=600
|
||||
ExecStart=/usr/sbin/rpi3-resizerootfs
|
||||
ExecStart=/bin/systemctl --no-reload disable %n
|
||||
|
||||
|
|
Loading…
Reference in New Issue