Boot failure (goes to single-user mode) after upgrade to 23.1.8 due to [SOLVED]

Started by agoree407, May 31, 2023, 09:21:54 PM

Previous topic - Next topic
I have a custom rc script that I use to load a config.xml from a USB if it finds it plugged in (similar to the functionality that was removed or never added from pfSense code, see https://forum.opnsense.org/index.php?topic=3297.0).

This worked fine before but after an upgrade to 23.1.8, my systems now fail to boot and are punted to single-user mode (error in attached image).

Is there a recommended/expected place for startup scripts to be located in order to avoid the given error?  I currently have my script located at /usr/local/etc/rc.syshook.d/early/17-opnsensectl

It looks like officially, my location should work, according to https://docs.opnsense.org/development/backend/autorun.html

"Syshook scripts should be installed in:

/usr/local/etc/rc.syshook.d/<subdir>/"

My script is located at "/usr/local/etc/rc.syshook.d/early/17-opnsensectl" :o

"early" facility is intentionally before networking and PHP starts working..

https://github.com/opnsense/core/blob/038d5b9bcf78ca7b97ab80513d9780062ca68374/src/etc/rc#L223-L228

I'm surprised it worked until now, but not that it broke eventually.


Cheers,
Franco

I'm not sure I understand the use case.  i.e. Why are we storing the config on a usb stick?  It can't be for backup as that can still get corrupted?
OPNsense 24.7.7 running on:
Dell Optiplex 3050
Intel I5-7600 @ 3.5Ghz (4 Cores)
Intel I350-T4 Nic
8G DDR4
256G SSD

Quote from: axsdenied on June 01, 2023, 05:57:25 PM
I'm not sure I understand the use case.  i.e. Why are we storing the config on a usb stick?  It can't be for backup as that can still get corrupted?

I spin up virtual appliances built from a master image that needs a simple config update for networking config before ansible et al. takes over.  This is mainly a relic from pfSense ("upgrading" to OPNsense bc it has the features I need :) ) which would auto load from a USB stick if it found one plugged in (I simulate this w/Libvirt commands).

I did get it working by placing the script in /usr/local/etc/rc.syshook.d/start/ (instead of 'early') amongst changes I made to my rc script.  8)