Possible to convert squashfs root to ext4 (RPi 4)?

I see now that uploading my own image accidentally built with TARGET_ROOTFS_SQUASHFS=y has converted my uSD primary OW partition from ext4 to squashfs.

Is there an easy way to convert it back to ext4 from another Linux machine?

Background: I lost ssh access to the live image due to a misconfiguration. I need to fix that in order to get it working so I don't think I can just flash a new image since I have no ssh access.

If it were ext4, I would just mount the partition on my workstation and edit files directly but since it's squashfs, it is readonly and I do not know how to mount it read-write.

Thanks for advice!

EDIT: I was able to connect a USB keyboard and monitor to the "broken" installation, fix the misconfiguration, and then upload an ext4 image I built so problem solved. I am interested to know if my original question has an answer though.

Squashfs doesn't support RW, so OpenWrt uses rootfs_data/extroot to provide RW.
An easy conversion method is to reflash the proper image while saving settings.

1 Like

I didn't think so (no rw) based on googling. I guess if I didn't have physical access, I could just mount readonly, tar up, then nuke it and place the settings back one-by-one. I need to be more diligent about generating backups in luci. Thanks for the reply.

1 Like