I'm starting this topic because I had a hard time finding this answer to my question about how to resize a squashfs file system on a microSD card (in this case, for a Banana Pi R2-Pro).
This worked for me:
https://openwrt.org/docs/guide-user/advanced/expand_root
It had worked. Now not so much.
You mean the script isn't producing any error messages at all ?
Correct. Didn't work with squashfs. No error messages.
Mucking around revealed that the partition was resized, but the filesystem was not. Attempts to manually resize it didn't work; superblock issues.
Just retried with a fresh ext4 image. That did work.
Made another attempt at using the script with a SquashFS image. No bueno (didn't work).
Again, the script properly resized the partition but not the filesystem. No errors reported by the script.
I was able to resize it manually by booting the board off a different device (microSD in this case) and using the tools onboard to fsck and resize.
losetup -o XXYYZZ /dev/loop0 /dev/mmcblk1p2
fsck.f2fs /dev/loop0
resizefs /dev/loop0
Where XXYYZZ is the offset reported earlier by running losetup on /dev/loop0 when OpenWrt was running off it.
Then I did this for SquashFS:
I recently answered a question about this and thought that the answer I gave could be expanded ever-so-slightly to become a more general guide. So here goes...
This HOWTO is intended for users who have some experience in general computing and system administration but are relatively new to OpenWrt. It is loosely based on the relevant sections of the official OpenWrt on x86 Hardware page:
https://openwrt.org/docs/guide-user/installation/openwrt_x86
The Root Cause
The origins of OpenWrt lie far…
Ieo
May 5, 2024, 10:33pm
6
slh
May 6, 2024, 4:07am
7
ext4 (journalling or not) can be resized, you can even grow it online (shrinking only offline).
1 Like