Hang after upgrade

Hi there,

For a little while now (I’d say a few years at least), everytime I’m trying to upgrade OpenWRT in-place (either via sysupgrade or recently owut), the system hangs at the first startup and I’m forced to reinstall from scratch and restore configuration afterwards.

Subsequent reboots does not affect the system at all, it just works. It’s just the very first boot after an upgrade that systematically hangs.

The only messages displayed on the serial console make me think of an issue with /etc/urandom.seed or RNG in general. I’m currently using OpenWRT on an Alix apu1d4 with default packages for random (urngd, urandom-seed-3, etc…), I don’t know if it’s relevant or not.

Have you had this issue? Have you a solution to suggest?

Thanks a lot in advance.

Give us some background on your device, what's the output from ubus call system board? What storage device are you using?

If you've still got owut installed, how about the output from owut check -v | head -20, too?

Of course:

# ubus call system board
{
	"kernel": "6.12.74",
	"hostname": "machinbox",
	"system": "AMD G-T40E Processor",
	"model": "PC Engines apu1",
	"board_name": "pc-engines-apu1",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "25.12.2",
		"firmware_url": "https://downloads.openwrt.org/",
		"revision": "r32802-f505120278",
		"target": "x86/64",
		"description": "OpenWrt 25.12.2 r32802-f505120278",
		"builddate": "1774469393"
	}
}
# owut check -v | head -20
owut - OpenWrt Upgrade Tool 2026.03.30~670907a5-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   squashfs
Sys-type       combined
Version-from   25.12.2 r32802-f505120278 (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  squashfs
Build-at       2026-03-25T20:09:53Z (~14 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-squashfs-combined.img.gz
Installed      216 packages
Top-level       51 packages
Default         44 packages
User-installed   8 packages (top-level only)

Everything is stored onto an SD Card, using squashfs combined.

That all looks fine (and pretty familiar, my edge box is an apu2e4, so a gen newer than the alix, but running that same x86/64 combined bios image).

Ok, so what's hinting at the RNG stuff? Here's what I see on mine, which starts up just fine.

$ dmesg | grep -iE 'rng|rand'
[    7.392697] random: crng init done
[   13.230844] urandom-seed: Seed file not found (/etc/urandom.seed)
[   14.562363] urngd: v1.0.2 started.

$ logread | grep -iE 'rng|rand'
Mon Apr  6 10:46:49 2026 kern.notice kernel: [    7.392697] random: crng init done
Mon Apr  6 10:46:49 2026 user.warn kernel: [   13.230844] urandom-seed: Seed file not found (/etc/urandom.seed)
Mon Apr  6 10:46:49 2026 user.info kernel: [   14.562363] urngd: v1.0.2 started.
Mon Apr  6 10:47:40 2026 daemon.info urandom_seed[13259]: Seed saved (/etc/urandom.seed)

I got the same results at startup from a « fresh » install (from the dmesg command). Cannot get a logread properly at the moment.

But after an upgrade… it just hangs roughly at those commands:

[   16.059914] r8169 0000:02:00.0 eth1: Link is Down
[   16.072320] procd: - early -
[   16.669774] procd: - ubus (running as root!) -
[   16.837891] procd: - init -

With messages regarding the fact that /etc/urandom.seed is not present and such. I really can’t figure out why this behaves like this…

Debugging boot issues is always a nightmare. I'm digging through https://github.com/openwrt/procd/blob/main/initd/init.c (procd init) for the first time, the only thing I can see is that maybe one of the kmodloader packages is hanging???

1 Like

Boot processes are always tough to diagnose. My main issue being why after upgrading and not on a clean install? That’s what I don’t get…

With the exact same config files afterwards, I don’t have any issues…

If the random seed cannot not be made then the boot process hangs making a random seed on low end routers can take some time dependant on the way it is made and can be the most time consuming part of the boot process so it could be the problem in your case.

So first of all give the boot process some more time (e.g. 10-20 minutes) but it might be something in your config which is missing to make the random seed.

I think the random seed is made at first boot so that could explain it

1 Like

Is there any way to monitor this eventually? Like can I open another terminal and check what processes are running at boot time to check this?

Isn’t the random.seed from previous version not preserved when upgrading? That’s what puzzling me the most: not issue on clean install, issue on upgrade, this does not make any sense to me :confused:

No, it is explicitly removed from the backup. (My guess is that it's best practice to do so, in case the device was compromised and the value was somehow poisoned, but that seems like an extremely roundabout compromise...)

In any case, you could experiment with this as a root cause by doing two things:

  1. echo "/etc/urandom.seed" >> /etc/sysupgrade.conf
  2. Edit /sbin/sysupgrade and remove that line "just in case" (this only matters with certain sysupgrade options, so is really optional).

Confirm with sysupgrade -l | grep urandom...

1 Like

I might have a 2D13 board I can play around with, I'll check if I can reproduce there.

I wonder if this could be part of the issue? https://github.com/openwrt/ubus/pull/20/changes/dadb9c2394dade75654d74c4feeb293e121dac85

1 Like