Expanding root partition and filesystem script not working

Hello. I am trying to expand root partition on a squashfs OpenWrt 25.12.2 image running on NanoPi R6S. I followed the steps here to no avail: https://openwrt.org/docs/guide-user/advanced/expand_root#automated_post_2512

Literally nothing gets printed in the terminal after I follow the steps. I’m not even sure if expanding the root partition is the right choice, but OpenWrt only gave me ~100mb and I can barely fit a handful of apk packages. Ideally, I would like to increase the root partition size to at least 500mb, and create a separate /srv partition for data (for Docker services and such).

Also no idea why the first partition is ext2 below:

root@OpenWrt:~# parted -l -s
Error: /dev/mmcblk1boot0: unrecognised disk label
Model: Generic SD/MMC Storage Card (sd/mmc)
Disk /dev/mmcblk1boot0: 4194kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Error: /dev/mmcblk1boot1: unrecognised disk label
Model: Generic SD/MMC Storage Card (sd/mmc)
Disk /dev/mmcblk1boot1: 4194kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Model: MMC hC8aP> (sd/mmc)
Disk /dev/mmcblk1: 62.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      33.6MB  50.3MB  16.8MB  primary  ext2         boot
 2      67.1MB  62.5GB  62.5GB  primary

Any help is appreciated.

Easiest way is to build an image with the rootfs partition size increased. This has the added benefit that it lives across upgrades, and doesn't force you to redo all the partition hacking every time.

That sounds promising. I’ve never built a custom OpenWrt image before, so I want to clarify: should I use OpenWrt firmware selector or the Image Builder?

The Firmware Selector doesn't support changing rootfs partition size, so if you want to do it the painful way, you'd use an imagebuilder.

But, you could use either owut (CLI) or LuCI Attended Sysupgrade (gui) as those are the on-device tools that support the settings discussed on that wiki page...

$ apk update
$ apk add owut
$ uci set attendedsysupgrade.owut.rootfs_size=1024
$ uci commit
$ owut upgrade
# ~2 minutes later system reboots with 1024 MB rootfs partition
2 Likes

Sorry for the delayed answer, but this was exactly what I was looking for, thank you. After changing the rootfs_size with UCI, I ran owut upgrade -S 1024 for good measure and it worked perfectly.