Bookworm has broken the previous way I used to limit the SD card expansion. I wish to have a 4GB parition at the end, I used to do:
```
`sudo vi /media/michael/rootfs/lib/raspi-config/init_resize.sh`
Change the line:
TARGET_END=$(($ROOT_DEV_SIZE - 1 ))
to:
# Keep the last 4GB for DATA (used to be 2GB, but computer would go black every now and then
# Note the size is specified in blocks
# https://github.com/openenergymonitor/Em ... /issues/67
TARGET_END=$(($ROOT_DEV_SIZE - 7341056 - 1 ))
```
But it no longer works with bookworm.
There are posts like this: "Attempt to stop SD card from expanding during first boot (bookworm)" which prevent expanding all together. I wish to have it expand, but no use all of.
Found a few topic of people struggling with this issue, but have not come across a clear none hacky way to do it.
Any way you recommend to make it expand but leave a 4GB partition?
I see there is a utility in `raspi-config` but it cant set the partition size, only expand to use all.
```
`sudo vi /media/michael/rootfs/lib/raspi-config/init_resize.sh`
Change the line:
TARGET_END=$(($ROOT_DEV_SIZE - 1 ))
to:
# Keep the last 4GB for DATA (used to be 2GB, but computer would go black every now and then
# Note the size is specified in blocks
# https://github.com/openenergymonitor/Em ... /issues/67
TARGET_END=$(($ROOT_DEV_SIZE - 7341056 - 1 ))
```
But it no longer works with bookworm.
There are posts like this: "Attempt to stop SD card from expanding during first boot (bookworm)" which prevent expanding all together. I wish to have it expand, but no use all of.
Found a few topic of people struggling with this issue, but have not come across a clear none hacky way to do it.
Any way you recommend to make it expand but leave a 4GB partition?
I see there is a utility in `raspi-config` but it cant set the partition size, only expand to use all.
Statistics: Posted by run_the_race — Thu Jan 02, 2025 3:38 pm — Replies 5 — Views 114