Implement sdcard resizing.
This commit is contained in:
parent
35569c10a2
commit
d94cca5318
|
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
# This should resize the sdcard to its full capacity.
|
||||
|
||||
[ -f /etc/part-expanded ] && exit 0
|
||||
|
||||
cat <<EOF | fdisk /dev/mmcblk0
|
||||
d
|
||||
2
|
||||
n
|
||||
p
|
||||
2
|
||||
|
||||
|
||||
Y
|
||||
w
|
||||
EOF
|
||||
|
||||
partprobe
|
||||
|
||||
mount /dev/mmcblk0p2 /mnt
|
||||
btrfs fi re max /mnt
|
||||
umount /mnt
|
||||
|
||||
echo yes > /etc/part-expanded
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
# rc.local for base images
|
||||
|
||||
[ -f /etc/ssh/ssh_host_rsa_key.pub ] || ssh-keygen -A
|
||||
[ -f /etc/part-expand.sh ] || /etc/part-expand.sh
|
||||
|
||||
netdata
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue