I've tried to stop the SD card from expanding during the first boot using latest bookworm image. I want to add in new custom partition myself after first boot. Before I plug in my sd card to Pi, I mounted the sd card to another Pi to edit the content of the sd card. What I tried so far
Hopefully someone will point me to the correct direction. I just need to disable the sd card expansion on first boot.
Thank you.
- Remove the part "init=/usr/lib/raspberrypi-sys-mods/firstboot" in cmdline.txt
- Comment out "do_resize" code in the file "/usr/share/initramfs-tools/scripts/local-premount/firstboot" with a # in front
- Comment out "resize2fs $ROOT_DEV &&" code in the file "/etc/init.d/resize2fs_once" with a # in front
Hopefully someone will point me to the correct direction. I just need to disable the sd card expansion on first boot.
Thank you.
Statistics: Posted by rasp14 — Mon Mar 04, 2024 2:06 am