Disk partition shrinks from ~60GiB to ~100MiB after firmware upgrade

Hello,

I have a Nanopi R3S LTS 2GB RAM and a 64GB SD card. When I first installed OpenWrt on the SD card, only about 100MiB were available for use, and with the instructions from an AI (I'm a beginner) I managed to resize the partition with WSL...

But now I'm in the same situation after I installed the latest firmware upgrade... Does anyone know how I can:

  1. conveniently resize the partition
  2. stop this from happening in the future
        "kernel": "6.12.87",
        "hostname": "nanopi",
        "system": "ARMv8 Processor rev 0",
        "model": "FriendlyElec NanoPi R3S",
        "board_name": "friendlyarm,nanopi-r3s",
        "rootfs_type": "ext4",
        "release": {
                "distribution": "OpenWrt",
                "version": "25.12.4",
                "firmware_url": "https://downloads.openwrt.org/",
                "revision": "r32933-4ccb782af7",
                "target": "rockchip/armv8",
                "description": "OpenWrt 25.12.4 r32933-4ccb782af7",
                "builddate": "1778712129"

Thank you

Hi.
This is the expected behavior, as flashing the newer firmware reset the partition table.
Assuming you want to use the extra space available to store data, resizing the partition may not be the right answer. Better use it by creating an extra partition.

For context: these single board computers with SD cards or x86 are special cases for OpenWrt.
All other supported devices use a fixed size storage and sometimes require special layout.

So in the case of SBC with SD card or x86 with HDD or SSD you could set the partion size before flashing.
Have a look at the attended sysupgrade (ASU) or owut. Both tools will make the flashing and resizing easier.

Edit. Fix auto correct, sorry...

To see details on what @_bernd is talking about, see https://openwrt.org/docs/guide-user/installation/sysupgrade.owut#expanding_root_file_system

Could you be more specific please? I installed owut but don't know what to do...

Pardon me but what is missing from @efahl post?

I just read the article, I can't resize it to more than 1024MiB??? Why do they prohibit that?

See the FAQ at the bottom of that page, I think the first Q.

Because free lunches don't exist.