Hard poweroff

Started by litk, September 27, 2019, 08:37:21 AM

Previous topic - Next topic
Hi,
I am planing to install opnsense on thin client Fujitsu Siemens Futro s900 and I am wandering how to turn of this machine. My current setup with Linksys WRT54GL I just power cut my surge protector. How to treat Futro s900 with opnsense installed to not damage installation on the disk.

Hi,

Please never cut the power. The UFS file system will punish you for it with partial data loss, which is mostly recoverable, but always annoying to deal with.

The Power menu entries will offer you reboot or shutdown and shutdown should cleanly power off all hardware except for the ones that have shutdown issues somewhere in the hardware components due to age.

Worst case a quick "halt -p" will do the trick on a shell or use the console menu or a shortcut thereof:

# opnsense-shell halt


Cheers,
Franco

Oh this is an extra time to spend every day and to remember to safe power off opnsense. Is it possible to install opn sense in the way that any other network hardware works for example my Linksys WRT54GL i dont know how this is called, embedded, file system is read only or on RAMdisk?

Ready-only disks minimise power failure corruption, but you still have a read-write area that can fail: your configuration itself.  Nano images of *sense back in the old days had a read-only approach but were constantly flip-flopping between read-only and read-write just to do something. Pfsense removed the Nano variant and OPNsense removed secondary disk image and all read/write path trickery.

Long story short the extra effort is not worth it with normal hardware appliances and VMs, especially since we left the embedded path by growing the FreeBSD/HardenedBSD installation to build an utility platform rather than a fixed-in-place minimal distribution.

Mind you, you can still run your root system as read-only which will make the OPNsense appear in "live-mode", but modification of runtime configuration is not possible this way and lost on reboot.


Cheers,
Franco

QuoteMind you, you can still run your root system as read-only which will make the OPNsense appear in "live-mode", but modification of runtime configuration is not possible this way and lost on reboot.
Isn't possible to read saved configuration during boot live-mode?

Yes. But / needs to be read-only from /etc/fstab directly so boot can take care of all the live-system setup.


Cheers,
Franco

Why not add a small UPS to OPNsense which will do a graceful shutdown once you have cut the power?

Bart...

I'd agree with bartjsmit, but (talking about I think similar people I know): someone who wants to hardpoweroff his hardware is someone with low tech-experience and wants to safe (power-) costs and would not be willing to invest money for UPS... but maybe I am wrong...

I don't know litk's usecase but I guess its only a router for a very low number of devices (a PC, a tablet, a smartphone, maybe a TV) and if my guess is right maybe OPNsense is overkill for him and a OpenWRT device (which can be hardpower off) would fit his needs better?

The UPS is probably out of the question since it costs more than the hardware it's supposed to protect. But it's true that it would avoid the problem altogether. ;)


Cheers,
Franco