The upgrade was aborted due to an error.

Started by eric_zrgoq14k, February 02, 2026, 10:12:18 AM

Previous topic - Next topic
Hi,

I've tried updating to 26.1 in the console.
After fetching the packages etc, I got the message: "The upgrade was aborted due to an error."
I am left in the dark here, because I don't know what the error is.

Console output:

Fetching packages-26.1-amd64.tar: ......................... done
Fetching base-26.1-amd64.txz: ...... done
Extracting packages-26.1-amd64.tar... done
Extracting base-26.1-amd64.txz... done
Please reboot.
>>> Invoking upgrade script 'sanity.sh'
Passed all upgrade tests.
>>> Invoking upgrade script 'isc-dhcp-plugin.sh'
Skipping already installed legacy ISC-DHCP plugin...
>>> Invoking upgrade script 'cleanup.sh'
The upgrade was aborted due to an error.

*** OPNsense.localdomain: OPNsense 25.7.11_9 (amd64) ***


Cheers, Eric

Does this continue to happen if you try the upgrade again?


Cheers,
Franco

Yes, I've tried to update several times now. Also after a reboot, but no luck.
I am getting the same output in the console.

Ok, what happens if you run the cleanup manually in verbose mode?

# opnsense-update -VFs || echo "failed"

February 02, 2026, 02:46:12 PM #4 Last Edit: February 02, 2026, 02:48:44 PM by eric_zrgoq14k
Then I get this:

# opnsense-update -VFs || echo "failed"
+ [ '' ]
+ [ -F ]
+ flush_temporary
+ find /usr/local/opnsense -type f -name '*.pyc' -delete
+ find /boot ! '(' -type d ')' -a '(' -name '*.pkgsave' -o -name '.pkgtemp.*' ')' -delete
+ find /boot -type d -name '.pkgtemp.*' -print0
+ xargs -0 -n1 rm -r
+ find /usr/libexec/bsdinstall ! '(' -type d ')' -a '(' -name '*.pkgsave' -o -name '.pkgtemp.*' ')' -delete
+ find /usr/libexec/bsdinstall -type d -name '.pkgtemp.*' -print0
+ xargs -0 -n1 rm -r
+ find /usr/local ! '(' -type d ')' -a '(' -name '*.pkgsave' -o -name '.pkgtemp.*' ')' -delete
+ find /usr/local -type d -name '.pkgtemp.*' -print0
+ xargs -0 -n1 rm -r
+ [ '' '=' -R ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ [ ! -f /usr/local/etc/pkg/repos/OPNsense.conf ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -n '' ]
+ [ '' '=' -M ]
+ [ '' '=' -x ]
+ [ '' '=' -X ]
+ [ -n '' ]
+ [ -n '' ]
+ [ -n -s ]
+ exit 0

And when updating, the same error message.

Cheers, Eric

Ok that wasn't it.  Can you you run the pre-upgrade hooks from the shell?  Nothing will happen WRT upgrading but we'll hopefully see the error there.

# sh -x /usr/local/etc/rc.syshook upgrade


Thanks,
Franco

This was the output:

sh -x /usr/local/etc/rc.syshook upgrade
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin
+ REQUESTS_CA_BUNDLE=/usr/local/etc/ssl/cert.pem
+ SYSDIR=/usr/local/etc/rc.syshook.d
+ SYSLEVEL=upgrade
+ shift
+ [ -z upgrade ]
+ [ ! -d /usr/local/etc/rc.syshook.d/upgrade ]
+ find -s /usr/local/etc/rc.syshook.d/upgrade -type f}
+ SYSHOOKS='/usr/local/etc/rc.syshook.d/upgrade/10-sanity.sh
/usr/local/etc/rc.syshook.d/upgrade/20-isc-dhcp-plugin.sh
/usr/local/etc/rc.syshook.d/upgrade/90-cleanup.sh'
+ RETURN=0
+ SYSHOOK=upgrade/10-sanity.sh
+ SYSHOOK=10-sanity.sh
+ SYSNAME=sanity.sh
+ echo $'>>> Invoking upgrade script \'sanity.sh\''
>>> Invoking upgrade script 'sanity.sh'
+ /usr/local/etc/rc.syshook.d/upgrade/10-sanity.sh
Passed all upgrade tests.
+ SYSHOOK=upgrade/20-isc-dhcp-plugin.sh
+ SYSHOOK=20-isc-dhcp-plugin.sh
+ SYSNAME=isc-dhcp-plugin.sh
+ echo $'>>> Invoking upgrade script \'isc-dhcp-plugin.sh\''
>>> Invoking upgrade script 'isc-dhcp-plugin.sh'
+ /usr/local/etc/rc.syshook.d/upgrade/20-isc-dhcp-plugin.sh
Skipping already installed legacy ISC-DHCP plugin...
+ SYSHOOK=upgrade/90-cleanup.sh
+ SYSHOOK=90-cleanup.sh
+ SYSNAME=cleanup.sh
+ echo $'>>> Invoking upgrade script \'cleanup.sh\''
>>> Invoking upgrade script 'cleanup.sh'
+ /usr/local/etc/rc.syshook.d/upgrade/90-cleanup.sh
+ exit 0

Cheers, Eric

Hi Eric,

Ok I think there's something wrong with the fact that your system is not downloading a kernel anymore.

Can you show me the following?

# opnsense-version kernel
# uname -a


Cheers,
Franco

Today at 02:36:17 PM #8 Last Edit: Today at 02:39:10 PM by eric_zrgoq14k
Well the output is a surprise for me, lol ;-)


# opnsense-version kernel
26.1
# uname -a
FreeBSD OPNsense.localdomain 14.3-RELEASE-p7 FreeBSD 14.3-RELEASE-p7 stable/26.1-n271965-1bab7230df71 SMP amd64

But according to the GUI I am on:
System Information
Versions
OPNsense 25.7.11_9-amd64
FreeBSD 14.3-RELEASE-p7

And 25.7.11_9 is also showing in the console menu


Cheers, Eric


Hi Eric,

Stranger things have happened ;)

Just wanted to be sure that's the case on your end. How about this patch?

# opnsense-patch https://github.com/opnsense/core/commit/7ae42d9584


Cheers,
Franco

OK, did that:

# opnsense-patch https://github.com/opnsense/core/commit/7ae42d9584
Fetched 7ae42d9584 via https://github.com/opnsense/core
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|From 7ae42d958441078caec4b3278ca182492d96f43e Mon Sep 17 00:00:00 2001
|From: Franco Fichtner <franco@opnsense.org>
|Date: Tue, 3 Feb 2026 15:04:51 +0100
|Subject: [PATCH] firmware: do not fail upgrade if new kernel is already booted
|
|PR: https://forum.opnsense.org/index.php?topic=50654.0
|---
| src/opnsense/scripts/firmware/upgrade.sh | 2 ++
| 1 file changed, 2 insertions(+)
|
|diff --git a/src/opnsense/scripts/firmware/upgrade.sh b/src/opnsense/scripts/firmware/upgrade.sh
|index cc581e5aa4f..b90ae8ed875 100755
|--- a/src/opnsense/scripts/firmware/upgrade.sh
|+++ b/src/opnsense/scripts/firmware/upgrade.sh
--------------------------
Patching file opnsense/scripts/firmware/upgrade.sh using Plan A...
Hunk #1 succeeded at 38.
done
All patches have been applied successfully.  Have a nice day.


I haven't rebooted yet or run the updater. Wasn't sure on the next step.
Cheers, Eric

> I haven't rebooted yet or run the updater. Wasn't sure on the next step.

Go for it :)

Ok, things have gone haywire. I am on my mobile connection now.
I started the update. Things looked normal. Then I lost the connection. Tried rebooting after a while and still no connection.

I have opnsense running on a dedicated zimaboard. Connected the board to a screen and I made a screenshot of where it hangs.

Looks like a problem

Cheers, Eric

Damaged file system. I would reinstall with ZFS.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Yes, I think this might be part of the underlying issue here that it appeared to fail midway on the first upgrade attempt.


Cheers,
Franco