mirror of
https://salsa.debian.org/raspi-team/image-specs
synced 2026-05-30 06:38:09 +02:00
rootfs subdirectory
This commit is contained in:
24
rootfs/usr/sbin/rpi-resizerootfs
Executable file
24
rootfs/usr/sbin/rpi-resizerootfs
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
|
||||
roottmp=$(lsblk -l -o NAME,MOUNTPOINT | grep '/$')
|
||||
rootpart=/dev/${roottmp%% */}
|
||||
rootdev=${rootpart%2}
|
||||
rootdev=${rootdev%p}
|
||||
|
||||
flock $rootdev sfdisk -f $rootdev -N 2 <<EOF
|
||||
,+
|
||||
EOF
|
||||
|
||||
sleep 5
|
||||
|
||||
udevadm settle
|
||||
|
||||
sleep 5
|
||||
|
||||
flock $rootdev partprobe $rootdev
|
||||
|
||||
mount -o remount,rw $rootpart
|
||||
|
||||
resize2fs $rootpart
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user