anaelorlinski / OpenWrt-NanoPi-R2S-R4S-Builds

OpenWRT Builds for NanoPi R2S & R4S from official Openwrt source code with minimal set of patches
MIT License
170 stars 57 forks source link

Expand root partition #26

Closed mandgeo closed 2 years ago

mandgeo commented 2 years ago

Is it safe to expand root partition? I'm afraid about the update process. *** R4S/4GB/full/ext4

anaelorlinski commented 2 years ago

I cannot guarantee it works but I would say expanding ext4 is pretty common task. I would recommend to backup the card in any case if you already have a complex setup. That's the power of those devices you can switch SD cards easily.

You need first to expand the partition size and then can expand the filesystem. https://openwrt.org/docs/guide-user/installation/openwrt_x86#resizing_filesystem

For ext4 you can either follow the procedure or do it offline on a desktop system with a GUI utility. For squashfs it is more complicated to do it offline but I integrated all the tools in the image to do it, and you can find the instructions in https://github.com/anaelorlinski/OpenWrt-NanoPi-R2S-R4S-Builds/blob/main/docs/resize-f2fs.md