While using openwrt on microsd device it is required that you manually resize overlay partition after flashing the device. That is annoying. Here is automated script, which can be part of openwrt.
How it works:
resize partition using sfdisk (parted changes partuuid which breaks sysupgrade)
run partprobe so firstboot will create propery sized (full size) overlay f2fs/ext4 partition
The script "doesn't work" if the amount of data in the roofs is > 1GB (4GB using 3rd party ASU server) anyway, since you won't be able to generate a rootfs large enough to accommodate everything currently stored.
That's why I asked about the local image builder.
If you have one, you won't be needing the script in the 1st place, then you simply build an image with the rootfs matching the size of your SD card.
Problem isn't the resizing, problem is the rootfs getting written as an image.
Whatever you have currently stored, that's not Openwrt, needs to be transferred from the current rootfs to the new image during build, or it's lost.
Having a large rootfs able to store non-Openwrt stuff isn't wise. But if you don't store non-Openwrt stuff on it, you probably don't need to extend the rootfs to fill the drive/mem card, simply create an additional partition.
Btw, there's a (still open ?) PR for making the rootfs ~400MB for x86 and SBCs.
You understood he was telling us "Can you not see this simple script will make OpenWrt up to grade school level. Here is a simple, flawed, script you beginners should use" and you were politely(?) walking them out. You were going in their direction anyway???
I really need to look at the category:
I just jump into all and would never post in here.
Script works just fine with 2 or 3 parittions. Default image has 2 partition and it will resize second partition to the max whcih will give you all space avaiable. If you prepare microsd card manually after initial flashing and add 3-rd partition, this script does not erase it and does resize second parition to its maximum size possible. Even better, sysupgrade also keep it 3-rd parition. Should be part of openwrt.