[solved] fatal error and boot issues with 25.1 and APU4D4

Started by fireburner, January 30, 2025, 08:42:32 PM

Previous topic - Next topic
January 30, 2025, 08:42:32 PM Last Edit: January 31, 2025, 07:51:45 PM by fireburner
I have just updated to 25.1 on my PC-Engines APU4D4 and the system now fails to boot with a fatal error.

These are the last lines I can see through the console before it stops:
>>> Invoking early script 'upgrade'
>>> Invoking early script 'configd'
Starting configd.
>>> Invoking early script 'templates'
Generating configuration: OK
>>> Invoking early script 'backup'
>>> Invoking backup script 'captiveportal'
>>> Invoking backup script 'dhcpleases'
>>> Invoking backup script 'duid'
>>> Invoking backup script 'netflow'
>>> Invoking backup script 'rrd'
>>> Invoking early script 'carp'
CARP event system: Error (255)
Launching the init system...done.
Initializing...
Fatal error: Uncaught Error: Call to undefined function OPNsense\Core\simplexml_load_string() in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:389
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(431): OPNsense\Core\Config->loadFromStream(Resource id #18)
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(329): OPNsense\Core\Config->load()
#2 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(51): OPNsense\Core\Config->init()
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(72): OPNsense\Core\Singleton->__construct()
#4 /usr/local/etc/inc/config.inc(114): OPNsense\Core\Singleton::getInstance()
#5 /usr/local/etc/inc/config.inc(369): parse_config()
#6 /usr/local/etc/rc.bootup(50): require_once('/usr/local/etc/...')
#7 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 389
Enter full pathname of shell or RETURN for /bin/sh:

Would anyone have any tips to get the system back to boot?
Thanks in advance.

Roll back to the last boot environment if running on ZFS? If running on UFS reinstall, but use ZFS this time ;-)
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Thanks for the advise. I don't use zfs yet.
I'd prefer to have this install fixed so I don't have to setup all the tons of firewall rules again.

Since the system is at least still accessible, you have an archive of the configurations in /conf/backup.

Copy them all, then reinstall and restore the last before your update.

The time when the backup was created is part of the file name. That number is Unix epoch, i.e. seconds since Jan 1st 1970. You can convert these with the "date" command on any Unix system.

# e.g. config-1738155436.8766.xml
$ date -r 1738155436
Mi 29 Jan 2025 13:57:16 CET

HTH,
Patrick
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

> Uncaught Error: Call to undefined function OPNsense\Core\simplexml_load_string()

That would mean the php83-simplexml package is not properly installed after upgrade, which sounds like a disk failure.

I would recommend to use the installer to config import plus reinstall.  It's often trickier to manually restore connectivity to reinstall packages and it's unclear how many files are missing (could be from base OS too making your life even harder).


Cheers,
Franco

Thanks Patrick and Franco.
I successfully managed to reinstall and import a recent backup from /conf/backup.
Very good to know, that there are automated backups on the device.
I used the chance and installed on zfs this time :)