Skip to content

Commit

Permalink
Resize partition at boot (fixes #41)
Browse files Browse the repository at this point in the history
  • Loading branch information
pguyot committed Dec 15, 2019
1 parent fce9135 commit 94b028e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ GPU_MEM=16
LC_ALL=C

# Replace /boot/cmdline.txt since it contains root device mapping to a PARTUUID that
# changed during parted resize. We try to disable the autoresize here as well.
# changed during parted resize.
echo "Replace /boot/cmdline.txt"
echo "dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet" > "/boot/cmdline.txt"
echo "dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet init=/usr/lib/raspi-config/init_resize.sh" > "/boot/cmdline.txt"
cat "/boot/cmdline.txt"

# Resize partition on first boot.
# https://www.raspberrypi.org/forums/viewtopic.php?p=1503766#p1503766
wget -O /etc/init.d/resize2fs_once https://github.com/RPi-Distro/pi-gen/blob/master/stage2/01-sys-tweaks/files/resize2fs_once

# Replace /etc/fstab since the non existing PARTUUID has to be changed here as well.
echo "Replace /etc/fstab"
echo "proc /proc proc defaults 0 0" > "/etc/fstab"
Expand Down

0 comments on commit 94b028e

Please sign in to comment.