Skip to content

Instantly share code, notes, and snippets.

@jonwitts
Last active November 27, 2020 18:36
Show Gist options
  • Save jonwitts/36739cc90a3a6b6ae38893994b8c6d8d to your computer and use it in GitHub Desktop.
Save jonwitts/36739cc90a3a6b6ae38893994b8c6d8d to your computer and use it in GitHub Desktop.
Re-enable automatic rootfs partition resizing for a Raspberry Pi image
sudo cp /boot/cmdline.txt /boot/cmdline.txt.orig
#add init=/usr/lib/raspi-config/init_resize.sh to end of cmdline.txt
##sudo wget -qO /boot/cmdline.txt https://github.com/RPi-Distro/pi-gen/raw/dev/stage1/00-boot-files/files/cmdline.txt
##wget -qO - https://github.com/RPi-Distro/pi-gen/raw/dev/stage2/01-sys-tweaks/00-patches/07-resize-init.diff | sudo patch -p3 -d /boot
sudo wget -qO /etc/init.d/resize2fs_once https://github.com/RPi-Distro/pi-gen/raw/dev/stage2/01-sys-tweaks/files/resize2fs_once
sudo chmod +x /etc/init.d/resize2fs_once
sudo systemctl enable resize2fs_once
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment