Upgrade error on generic x64

First, sorry this may be a duplicate with the sysupdate official thread, but I wanted to isolate the issue in its own thread since the answer there was that the image is corrupted somehow, but this happens every time I try to upgrade. Basically I am trying to upgrade to latest firmware, but both from UI and command line, but it fails and I do not know what's wrong, it is saying the image has no metadata. Here is the output of the command line:

root@OpenWrt:~# owut upgrade --verbose
owut - OpenWrt Upgrade Tool 2026.01.13~2526d84b-r1 (/usr/bin/owut)
ASU-Server     https://sysupgrade.openwrt.org
Upstream       https://downloads.openwrt.org
Target         x86/64
Profile        generic
Package-arch   x86_64
Root-FS-type   ext4
Sys-type       combined-efi
Version-from   25.12.1 r32768-b21cfa8f8c (kernel 6.12.74)
Version-to     25.12.2 r32802-f505120278 (kernel 6.12.74)
Build-commit   https://git.openwrt.org/?p=openwrt/openwrt.git;a=shortlog;h=f505120278
Build-FS-type  ext4
Build-at       2026-03-25T20:09:53Z (~7 days ago)
Image-prefix   openwrt-25.12.2-x86-64-generic
Image-URL      https://downloads.openwrt.org/releases/25.12.2/targets/x86/64
Image-file     openwrt-25.12.2-x86-64-generic-ext4-combined-efi.img.gz
Installed      294 packages
Top-level      166 packages
Default         44 packages
User-installed 123 packages (top-level only)

Package version changes:
  base-files                      1696~b21cfa8f8c                             1699~f505120278
  kmod-ovpn-dco-v2                6.12.74.0.2.20250801-r1                     6.12.74.0.2.20251017-r1
2 packages are out-of-date

Default package analysis:
  Default                         Provided-by
  nftables                        nftables-json

There are currently package build failures for 25.12.2 x86_64:
  Feed: packages
    domoticz                      Wed Apr  1 09:13:07 2026 - not installed
    pigeonhole                    Wed Apr  1 09:23:26 2026 - not installed
    python-constantly             Wed Apr  1 09:02:16 2026 - not installed
    python-flask-httpauth         Wed Apr  1 09:13:38 2026 - not installed
    python-gevent                 Wed Apr  1 09:11:18 2026 - not installed
    python-psycopg2               Wed Apr  1 09:03:15 2026 - not installed
    python-pyodbc                 Wed Apr  1 09:11:51 2026 - not installed
    python-ubus                   Wed Apr  1 09:03:40 2026 - not installed
    tvheadend                     Wed Apr  1 08:52:49 2026 - not installed
  Feed: telephony
    asterisk-chan-sccp            Wed Apr  1 09:47:07 2026 - not installed
  Feed: video
    assimp                        Wed Apr  1 07:48:12 2026 - not installed
    glslang                       Wed Apr  1 07:22:47 2026 - not installed
    qt5base                       Wed Apr  1 09:41:25 2026 - not installed
    qt5quick                      Wed Apr  1 09:41:16 2026 - not installed
    qt5quick-controls             Wed Apr  1 09:41:33 2026 - not installed
    qt5script                     Wed Apr  1 09:41:18 2026 - not installed
    qt5svg                        Wed Apr  1 09:41:27 2026 - not installed
    qt5translations               Wed Apr  1 10:09:37 2026 - not installed
    qt5virtualkeyboard            Wed Apr  1 10:09:37 2026 - not installed
    vkmark                        Wed Apr  1 09:35:47 2026 - not installed
20 package build failures don't affect this device, details at
  https://downloads.openwrt.org/releases/faillogs-25.12/x86_64/

Request:
  Version 25.12.2 r32802-f505120278 (kernel 6.12.74)
Request hash:
  f20434f8d8f54f15c03e8d9733e3a710ac923e1a2d85c30a6decc7ce307fe912
--
Status:   queued - 0 ahead of you
Progress:   0s total =   0s in queue +   0s in build
--
Status:   init
Progress:   1s total =   0s in queue +   1s in build
--
Status:   validate_manifest
Progress:  36s total =   0s in queue +  36s in build
--
Status:   building_image
Progress: 187s total =   0s in queue + 187s in build
--
Status:   done
Progress: 190s total =   0s in queue + 190s in build

Build succeeded in 190s total =   0s in queue + 190s to build:
  version_number = 25.12.2
  version_code   = r32802-f505120278 (requested r32802-f505120278)
  kernel_version = 6.12.74
  rootfs_size_mb = default
  init-script    = no-init-script

Image source: https://sysupgrade.openwrt.org/store/f20434f8d8f54f15c03e8d9733e3a710ac923e1a2d85c30a6decc7ce307fe912/openwrt-25.12.2-03946b7704e2-x86-64-generic-ext4-combined-efi.img.gz
Image saved : /tmp/firmware.bin
Manifest    : /tmp/firmware-manifest.json
Verifying   : /tmp/firmware.bin (22829954 bytes) against /tmp/firmware.sha256sums
  Saved sha256 matches
ERROR: sysupgrade validation failed:
stderr =
Wed Apr  1 14:04:27 EEST 2026 upgrade: Image metadata not present
Wed Apr  1 14:04:27 EEST 2026 upgrade: Unable to determine upgrade device
Image check failed.

Any ideas why? This is a Hyper-V machine (I converted the original generic image to a VHDX upon first install) and I have resized /dev/sda2 to 1TB.

Do not gunzip it before flashing, sysupgrade wants the untouched gzipped image (some browsers insist on being 'helpful').

I do not unzip anything by hand. I just run that command line owut upgrade or use the UI's Attended Sysupgrade and click "Install" directly, no download (though I tried to download and manually upgrade to that image with same results).

Should work fine, but do you have adblock installed (could be the /dev/null issue, see Adblock support thread - #3415 by dave14305 (and solution in Adblock support thread - #3426 by dave14305). Check that and report back.

(Note that your 2GB partition will be resized to 104MB and your config will be lost on upgrade. See https://openwrt.org/docs/guide-user/installation/sysupgrade.owut#expanding_root_file_system for details.)

I do have adblock installed, but the file attributes for /dev/null are normal:

root@OpenWrt:~# ls -l /dev/null
crw-rw-rw-    1 root     root        1,   3 Mar 30 13:16 /dev/null

The solution provided to recreate it does nothing attributes wise:

root@OpenWrt:~# rm /dev/null; mknod -m 666 /dev/null c 1 3
root@OpenWrt:~# ls -l /dev/null
crw-rw-rw-    1 root     root        1,   3 Apr  2 08:23 /dev/null

The only thig that changed is the file date.

Also, here is my partition table:

Device      Start     End Sectors    Size Type
/dev/sda1     512   33279   32768     16M Linux filesystem
/dev/sda2   33280 2097118 2063839 1007.7M Linux filesystem
/dev/sda128    34     511     478    239K BIOS boot

what would be the correct value for --rootfs-size in this case? 1007?

Should work, or maybe 1008? In any case, make sure to keep a backup in case the config is lost... Oh, and report back whether your config got deleted or not, I'm keeping track.

I still don't pass above this error, no mater how many builds I do:

/dev/null is a character device as it should, so I do not know what else to look for...

As soon as I can upgrade, I will let you know if the partition was resized or not. 1 MB up or down is irrelevant for me, so I will go with rounded down. I have put the value in the config file, so it should be taken automatically.

1 Like

At this point I have ruled out:

  • build failure - as several builds either from owut or Luci failed identically
  • Adblock - as I removed it and the issue remains
  • /dev/null attributes - as they are already as they should

How do I solve this issue?

ERROR: sysupgrade validation failed:
stderr =
upgrade: Image metadata not present
upgrade: Unable to determine upgrade device
Image check failed. 

The only things that works is to install manually the generic image, but that looses everything regarding extra packages and partition size.

You could try to wget the image from the link that owut spits out at the end. Make sure to put it in /tmp so there's enough room for it (that's where sysupgrade will want it, in any case).

Something like this. Then check the file size of firmware.bin, and verify it with sysupgrade.

$ wget -O /tmp/firmware.bin https://sysupgrade.openwrt.org/store/f2...12/openwrt-25.12.2-03946b7704e2-x86-64-generic-ext4-combined-efi.img.gz

$ sysupgrade --test /tmp/firmware.bin

Same unfortunately... :frowning:

root@OpenWrt:~#  sysupgrade -v --test /tmp/firmware.bin
Sat Apr  4 12:30:20 EEST 2026 upgrade: Image metadata not present
Sat Apr  4 12:30:20 EEST 2026 upgrade: Unable to determine upgrade device

I also tried to force it and all it did was to reboot... but it did not flashed anything, I am still on 25.12.1...

root@OpenWrt:~#  sysupgrade -v -F /tmp/firmware.bin
Sat Apr  4 12:32:12 EEST 2026 upgrade: Image metadata not present
Sat Apr  4 12:32:12 EEST 2026 upgrade: Unable to determine upgrade device
Image check failed but --force given - will update anyway!
Sat Apr  4 12:32:12 EEST 2026 upgrade: Saving config files...
etc/config/attendedsysupgrade
etc/config/dhcp
etc/config/dropbear
...
etc/uhttpd.key
Sat Apr  4 12:32:13 EEST 2026 upgrade: Commencing upgrade. Closing all shell sessions.
Command failed: Connection failed
root@OpenWrt:~# Connection to openwrt closed by remote host.
Connection to openwrt closed.

Edit:
file size of firmware.bin is 22 MB:

-rw-r--r--    1 root     root      22829954 Apr  4 12:48 firmware.bin

and it seems to be a valid EFI drive as I could see in it:
image
However, this suggest that firmware.bin was ungzipped by wget... not sure if that is an issue.

Edit 2:
there is this file in /tmp/ but is it 0 bytes and it is creadted when sysupgrade is run: sysupgrade.meta, could that be linked to the issue?

Zipped to 22MB is about normal for x86, unzipped is about 100+MB. The x86 images do not contain any metadata, so that too is normal.

The messages seem to indicate that your image file has mangled partition tables; here's what to expect for a valid x86 image:

/tmp$ ll firmware.bin
-rw-r--r--    1 root     root      27607337 Mar 30 07:30 firmware.bin

/tmp$ gunzip -c firmware.bin | wc -c
126353408

/tmp$ fwtool -i - firmware.bin
Data not found

/tmp$ sysupgrade --test firmware.bin
Sat Apr  4 10:36:24 PDT 2026 upgrade: Image metadata not present
Sat Apr  4 10:36:24 PDT 2026 upgrade: Reading partition table from bootdisk...
Sat Apr  4 10:36:24 PDT 2026 upgrade: Extract boot sector from the image
Sat Apr  4 10:36:24 PDT 2026 upgrade: Reading partition table from image...
root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# ll firmware.bin
-rw-r--r--    1 root     root      22829954 Apr  4 12:48 firmware.bin
root@OpenWrt:/tmp# gunzip -c firmware.bin | wc -c
126123520
root@OpenWrt:/tmp# fwtool -i - firmware.bin
Data not found
root@OpenWrt:/tmp# sysupgrade --test firmware.bin
Sun Apr  5 12:47:08 EEST 2026 upgrade: Image metadata not present
Sun Apr  5 12:47:08 EEST 2026 upgrade: Unable to determine upgrade device
Image check failed.

so instead of processing the partition table it says that it is unable to determine upgrade device...

Any ideas? Or am I stuck with installing the official image and loosing all packages and configs?

I really don't want to start over from stock image...

Pardon me but what's the issue.
You install all packages and copy back some config files...

1 Like

Downtime? Prone to errors? Clients that call you at midnight that a service is not running?

It is a whole can of worms... Reinstalling and reconfiguring everything every time a new release is out... is out of question, dumb and a real no-go... 10 NICs, tons of port forwardings, routing and firewall rules etc. make this a no viable option.

My only real option in this state (rebuild everything with each release) is to stay on current version or to install pfsense / opensense and work with that...

So "the issue" is that this is not a real upgrade option, but a "build again a new VM".

Edit: oh... and then it is a game of unplugging wires and plugging the laptop to each of the ports until I find out which one is the LAN port (because it changes...), assign port VLANs to laptop for each before I could copy back any config file. It is not as "easy" as it is made believe... install packages from where if there is no WAN connection? When I installed it, it was just a machine inside LAN behind another functional router and had no VLANs and random ports assigned to LAN/WAN. So yea, there is more than an "issue" with that approach...

2 Likes

It seems like that image is corrupt somehow, so you should rerun the build and get new image (with a different hash). If that build hasn't already timed out of the cache (test with owut download, which will download immediately if it's still cached, but take a few minutes if it's a new build), then force it.

To force a rebuild you can use a different package list or a dummy init script (the contents of init scripts are included in the job hash calculations). Fake init scripts are easiest:

$ echo '#' > dummy
$ owut download --init-script dummy

I have tried many builds, from UI and from command line (owut) but all builds behave the same. I did few builds today (they were forced by package changes)...

No idea why this happens, somehow the tool does not recognize the disk layout....

The fact that you are not seeing

might mean your partition table is corrupted and you simply need to wipe it and start over. What does fdisk --list show?

Pardon me again but maybe you should not offer your service as an paid offer then. Sorry but not feeling sorry. Do your homework or look for another job.
Disclaimer. I'm a network engineer at day time.

Diplomatic addon.

Use the image builder locally and include all packages and config. No need for the online build server and tools. So your downtime is as usual for an upgrade but no extra steps needed.

I think we are getting off the topic

I have the same issue as the OP
and the fact is although there are other ways to upgrade Attended Sysupgrade is not working
and we need to know why this is the case

Its the reason why i went over to a x86 build on a small pc so that i could update easy and quickly without all the steps .

1 Like