r/openwrt•
Legogris

Suggested sysupgrade flow for ext3 systems

I am running a PCEngines APU (x86_64), with OpenWRT installed on the internal m-SATA SSD on an ext4 file system.

After realizing what a bad idea it was to treat this like other Linux server distros (package upgrades via opkg install), I have a hard time figuring out a smooth way to reflash - specifically due to the image sizes.

In make menuconfig, I can choose the size of the root partition, but the corresponding image will be of that size as well - obviously way too large to fit in /tmp, memory or on the root filesystem. How do the rest of you deal with this? Seems like images would have to be incrementally smaller each time..

I could of course do resize2fs after every upgrade, but that is error-prone and a a bit annoying. Bringing down my router to boot from USB and reinstall from there is also not ideal. I feel like I'm missing something obvious here, but I don't see anything in the wiki.

I do see CONFIG_TARGET_ROOTFS_PARTNAME (Override the root partition on the final device. If left empty, it will be mounted by PARTUUID which makes the kernel find the appropriate disk automatically) in the menu config, but I don't get exactly what that does and if it's relevant.

Ideally I'd like the sysupgrade to not touch my partition table or filesystem sizes, without needing the image to be the full size of the target fs.

​

EDIT: Title says ext3 but I obviously mean ext4.

Posted Jan 24, 2020, 2:58 AM UTC · edited

67
Loading comments…