I've got a x86_64 efi mini PC running 22.03 with an image built by the firmware selector. OpenWRT is running on a NVMe SSD drive, I installed it on that NVMe drive from a USB-stick. I now want to upgrade to the new 22.03.1 service release.
I've tried upgrade via luci-app-attendedsysupgrade
, also tried the same on CLI with auc
. Didn't work. I then requested a new build from the firmware selector for the 22.03.1 release, download the *.img.gz, unzipped it and then ran sysupgrade -i -v --test openwrt-22.03.1-6e69c7720449-x86-64-generic-ext4-combined-efi.img
. I get the same result here as I see in the log output with the attended sys upgrade:
Fri Oct 14 11:10:33 CEST 2022 upgrade: Image metadata not present
Fri Oct 14 11:10:33 CEST 2022 upgrade: Unable to determine upgrade device
Image check failed.
I've traced the origin of this message back to /lib/upgrade/platform.sh
, there's a function platform_check_image()
. There's a reference to 2 other functions: export_bootdevice()
and export_partdevice
. This is probably where it goes wrong, but I don't know what exactly. If I source /lib/upgrade/common.sh
and then run the export_bootdevice()
function, I get an error:
root@TopTon:/lib/upgrade# . /lib/upgrade/common.sh
root@TopTon:/lib/upgrade# export_bootdevice
-ash: cmdline_get_var: not found
This latest error cmdline_get_var: not found
is the result of a local variable inside export_bootdevice()
:
export_bootdevice() {
local cmdline uuid blockdev uevent line class
local MAJOR MINOR DEVNAME DEVTYPE
local rootpart="$(cmdline_get_var root)"
...
What do I need to fix? I basically want to upgrade from 22.03 to 22.03.1 and since this is my first x86 device for OpenWRT I wanted to get familiar with sysupgrade paths I have. The options presented are great; attended via luci, attended via CLI or download from the firmware selector, but they all seem to fail on the same check.