How to resize root partition after sysupgrade (x86)

please remove, issue solved.

(cannot delete)

Rather than deleting the post, why not keep the original question and post the solution so others can benefit?

2 Likes

I had topic template created, but found an answer in the mean time. Then I accidentally posted it.
Basically, the answer is "only by booting from USB and using external utility"

Every time x86 OpenWRT is upgraded via sysupgrade from official image , the partition will revert to 256MB and you need to manually resize it by "external" means :frowning: This is due to how it is compiled, OpenWRT being primarily made for embedded devices. So if you have nice 32GB SSD, be prepared to fish it out and whip out bootable USB...

3 Likes

It seems like you should be able to install cgdisk and resize the partition from within openwrt. But maybe I'm dreaming

... and still lose all that extra data on that partition. It's easier and better to just create an additional partition for leftover space, it will remain untouched by sysupgrade (at least with MBR, it will take a bit of fiddling with GPT.)

Actually, sysupgrade retained all my config. Sure, I needed to reinstall/reload packages (it reverted back to stock), but as soon as I loaded them they started working as usual (VPN, Adblock etc.)

I would still like to enlarge root, as certain things (adblock lists, SQLLite databases etc.) usually install on root partition by default.

1 Like

That's not what I meant. sysupgrade will not install packages for you (by design), and keep your settings (mostly). But if you enlarge your root partition, and you save any data there, the data will be gone after a sysupgrade. That won't matter much if all you keep there is temporary data, or data regarding your installation. But if you want to keep files there it's thoroughly unadvisable.

Again, generally my recommendation would be to keep the default partitions as they are, create an additional partition and mount it into the system (if you choose so, you can even mount it as "extroot" root overlay, just like an external USB stick).

1 Like

That seems like a good idea

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.