I'm using openwrt-19.07.7-x86-64-combined-squashfs.img.gz on an APU4 with a 4GB sdcard
I've been trying to follow the instructions here , to resize the squashfs image and use the rest of my sdcard.
I've successfully found the offset using losetup:
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC /dev/loop0 0 3014656 0 0 /mmcblk0p2 0 512
And successfully resized the squashfs partion with cfdisk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 253.1M 0 loop /overlay mmcblk0 179:0 0 3.7G 0 disk ├─mmcblk0p1 179:1 0 16M 0 part /boot └─mmcblk0p2 179:2 0 3.7G 0 part /rom
However, attempts to loop mount the underlying f2fs partition are not working:
root@OpenWrt:/# losetup -d -o 3014656 /dev/loop0 /dev/mmcblk0p2 losetup: -o: failed to use device: No such device
I also tried using gparted to resize and it doesn't seem to recognize the squashfs file system type.