Auto Extend root partition on Rasberry pi 5 after attended-sysupgrade

I use snapshot version of Openwrt on Raspberry Pi 5. I often upgrade using attended-sysupgrade and after every upgrade had to manually extend the root partition to consume rest of the 30GB space. So wrote few scripts and now after every upgrade and couple of restarts (all automatic) my root partition is extended.. no manual intervention whatsoever. Maybe it might help someone else..

Follow the steps https://github.com/nishikant/openwrt

Thanks

https://openwrt.org/docs/guide-user/advanced/expand_root didn't work?

No.. it corrupted the partition.. so had to follow steps mentioned https://github.com/rahulelex/resize-storage-on-openwrt-raspberry-pi and based on that wrote the scripts..

1 Like

Wish I'd known before upgrading. My fault for not making a backup, I know. Still ...