X86 upgrade issue (APU2)

Dear openwrt friends,

Special case where I'd appreciate your help :slight_smile:

HW and goal: Openwrt 22.03.0 to be upgraded to 22.03.3.
I had the splendid idea of using a 512GB mSATA drive in my APU2 router, resulting in
/dev/sda1 -> boot (16 MB)
/dev/sda2 -> rootfs (1024 MB)
/dev/sda3 -> partition for data (around 510 GB, maybe < 100 GB used till now)
and I use Openwrt Image Builder to generate images including all packages needed.

And in this case in wanted MBR and /dev/sda3 to be untouched, so I could access the data partition after upgrade. So I followed the tutorial here (extract ...boot.img (via VM) and use ...rootfs.img).

The easiest way was to use TinyCore (USB boot) on APU2 and then dd if=boot.img of=/dev/sda1 as well as dd if=rootfs.img of=/dev/sda2.

Result (no success yet)

  • It boots and hangs after 3.3 seconds
  • to check I mounted /dev/sda2 -> /mnt/rootfs, and saw there was no /etc/config/network, so I restored the backup for all, config, firewall, and so on, to make sure it has a meaningful setup.
    • still no luck, hangs always at 3.3 seconds, telling
    • "clocksource: Switched to clocksource tsc"

Did anyone observe the same behaviour or what do I need to do to be successful ?

Many thanks in advance !


Just copy the new kernel binary to /boot on /dev/sda1, then dd the ext4 to sda2, but your config will always be wiped, going this way.

Don't forget to adapt grub, unless you overwrite the old kernel bin.

Not sure if the blkid for the rootfs will stay the same, what's why I use root=/dev/sda2 in grub, instead of blkid.

I followed this guide on my APU4 but with modifications as I wanted to make a third partition on my 120GB SSD. https://teklager.se/en/knowledge-base/openwrt-installation-instructions/

I used the combined-ext4 binary and dd it to disk using a live usb (debian) connected to serial port of the APU. I upgraded to the latest coreboot BIOS also from 3mdeb and it worked like a breeze.

I used fdisk to create the last partition, and I did not create it directly after sda2 but with some 10% of the sectors (i have way too much space anyways :slight_smile: ) in case a next upgrade is bigger than before.

After that I ran resize2fs /dev/sda2 as stated in the guide.
Then I used opkg update && opkg install commands with all my packages.

The reason I could not use Attended Sysupgrade was that I came from 19.07 and it was not supported until 21.xx I think. It will be very interesting to see if I can upgrade next time without doing a complete full installation. :smiley:

Is there a reason you did not chose the combined-ext4 image?

If you don't mind having two openwrt partitions, this will work Sysupgrade help for x86_64 - #14 by frollic

Hi frollic,

Sorry for my late reply. I managed to build two partitions for boot (both work which is really cool) and a data partition.
However, with upgrading I'm still unsuccessful, but I think I'm close. Many thanks for the great hint !

cheers blinton