APU2 upgrading with wireless

I just went through my first experience upgrading my APU2 and have some questions about best practices for upgrading.

I initially expanded the filesystem using the Resizing the partition and filesystem sections in https://openwrt.org/docs/guide-user/installation/openwrt_x86

This was a little nerve wracking to be honest and it isn't clear from the documentation if this can be done on a live system. I did not do it on the live system and took the SD card out and did the file expansion elsewhere.

I saw there was an upgrade and did a sysupgrade trying to make sure I preserved all the settings. However, I was disappointed that it blew away the existing partitions and reinstalled everything essentially from scratch. This is particularly annoying since I had to reinstall the wireless infrastructure.

I've normally done upgrades in the past on embedded routers with extroot installed and don't recall losing all my extra packages and configs. I'm guessing the extra packages I installed were on the extroot and so didn't disappear when I sysupgraded.

Since the base partition for the x86 build is pitifully small and the SD card it's currently installed on is 16G, would the extroot get blown away if it's an additional partition on the SD card during the next sysupgrade?

Other options I have for extroot is an SSD or a file on the SSD. That would require some research on my part though.

The other option I see is to build my own "firmware" upgrade with all the packages I want and a sufficiently large root file system.

I'm hoping for some guidance on this from other x86 users who have a similar setup.

A normal sysupgrade shouldn't touch the existing partitioning, runtime installed packages will be lost though (and they need to be, as they won't be compatible between different versions); it makes sense to use imagebuilder, attended sysupgrade or building from source to include the necessary packages into your sysupgrade image (that way your sysupgrade contains all packages, the configurations are retained and you're back in service within ~30s).


# gdisk -l /dev/sda
[…]
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
[…]
Number  Start (sector)    End (sector)  Size       Code  Name
   1             512           66047   32.0 MiB    8300  
   2           66048         1950207   920.0 MiB   8300  
   3         1950208       976773134   464.8 GiB   8300  Linux filesystem
 128              34             511   239.0 KiB   EF02

User data in /dev/sda3 remains untouched.

Ah, so putting extroot in the /dev/mmcblk0 partition 3 should be safe. I'll experiment there.