Resizing partition on SD card after OpenWrt install

Hi,
I have a banana bpi r3
Install image from here:

There is only a snapshot image available, as no openwrt image runs on it yet. (as far as I know)
The image is in a format called: ARM64 OpenWrt FIT (Flattened Image Tree)
I wish to just run it from the micro SD card, so no need to install it onto the flash of the device.
As it is a FIT image, it is not squashfs or anything like that. How do I resize the root partition to fill the whole SD card?
I also cannot mount the partitions of the openwrt sd card on a Linux box.
How do I adjust this so I can use the entire SD card disk space?

If you download the SD card image using the firmware selector and inspect it using binwalk you'll see that it is indeed a squashfs based image.

binwalk openwrt-mediatek-filogic-bananapi_bpi-r3-sdcard.img                                                                                  1

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
17920         0x4600          Mediatek Boot Header Version 1
18952         0x4A08          Mediatek File Info File Type: ARM-Bootloader EMMC-Boot-Region Signature Type: PHASH Load Address: 0x200D00 File Length: 198536 Maximum Size: 200072 Content Offset: 0x300 Signature Lenght: 32 Jump Offset: 768 POST_BUILD_DONE
[...snip...]
72663040      0x454C000       Squashfs filesystem, little endian, version 4.0, compression:xz, size: 5103654 bytes, 1159 inodes, blocksize: 262144 bytes, created: 2023-04-08 13:52:56

And with that you can follow Expand the filesystem (SD Card) from the documentation.

If that still leaves you curious search the forum for that topic (squashfs expand), it comes up quite a lot.

1 Like

But, when the system is running:

/dev/root on /rom type squashfs (ro,relatime,errors=continue)
...
/dev/mmcblk0p66 on /overlay type f2fs (rw,lazytime,noatime,background_gc=on,discard,no_heap,user_xattr,inline_xattr,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=reuse,checkpoint_merge,fsync_mode=posix,discard_unit=block)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work,xino=off)

So, surely expanding the read only squashfs is not going to be helpful.
Surely, I need to expand the overlay f2fs filesystem in order to install more apps?
or make a new image that instead boots to a root f2fs filesystem, or ext4 filesystem.

Have a read through Cannot resize my root partition on my BPI R3 in the Banana forum.