Tiny Core Base > TCB Q&A Forum

resizing partitions on piCore 7.0

(1/1)

bobl:
I want to reduce the size of the package partition mmcblk0p2 in my case but that requires mmcblk0p2 to be unmounted. Doing that though kills ssh. so best I put the resize2fs command into a startup script that runs before mmcblk0p2 gets mounted.  Where should that go?

bmarkus:
Depending on available RAM and installed TCZ packages the easiest way is to copy all used extensions to RAM. Than you can safely umount mmcblk2 and do what you want.

bobl:
do you have a magic incantation for that

bobl:
I managed to do it in the shutdown script by changing the script to

umount /dev/mmcblk0p2
/resize2fs /dev/mmcblk0p2 <size>
umount -afr

...


and copying resize2fs into the root directory, the beauty is that once executed the scripts are wiped clean across the reboot because / is in ram.

After the reboot I reduced the partition size to match in fdisk.

Navigation

[0] Message Index

Go to full version