A few weeks ago I installed pfSense 2.5.2 on a kettop Mi4005L Mini PC. This Mini PC uses an Aptio BIOS UEFI Firmware from American Megatrends Inc. (AMI) and settings for Restore From AC Power Loss was by default set to Power Off.

So if a power loss happens, pfSense won’t restart automatically and you have to first press the power button of the Mini PC to start pfSense again.

The first thing to do mandatory is to switch this setting to Power On, I wonder why this is not done by default from kettop as surely nobody wants a router which wont restart automatically after a power outage. The Mini PC was pre-installed with a older version of pfSense, so the purpose of the Mini PC was clear to be a router.

Press Delete key during power on self-test startup to get into BIOS/UEFI -> Advanced -> Restore From AC Power Loss -> Power On

In general I will using a PC-Engine APU1D-Bundle Board for pfSense and works great for. At the moment you won’t get them in time because of the current semiconductor shortage on the market. The delivery time at the moment is expected end of the year.

PC-Engine APU1D-Bundle Board uses btw. the CoreBoot Open Source System BIOS
coreboot, formerly known as LinuxBIOS
https://en.wikipedia.org/wiki/Coreboot


For testing if now after switching Restore From AC Power Loss in UEFI to Power On, pfSense will restart automatically after a power outage, I plugged off several times the power plug from the Mini PC.

Therefore pfSense now restarts automatically but unfortunately ended up in a boot loop which at the end prompted with:

cpu_reset: Restarting BSP
cpu_reset_proxy: Stopped CPU 3

The reason for this boot loop is a corrupted file system from pfSense resp. freeBSD which is the base from pfSense.

In pfSense 2.3.x and before the only filesystem type was UFS which unfortunately is prone to filesystem corruption after power loss.

If pfSense lost power at the wrong moment, the UFS filesystem can get corrupted. As I several times plugged off the power from it, I was running into this boot loop, mission accomplished.

Since pfSense 2.4 you will have the choice for the filesystem between UFS and ZFS.

The ZFS filesystem type is more reliable and has more features than UFS, however ZFS can be memory hungry. Either filesystem will work on hardware with several GB of RAM, but if RAM usage is critical to other tasks that will run on this firewall, UFS is a more conservative choice. For hardware that requires UEFI, use ZFS.

Source: https://docs.netgate.com/pfsense/en/latest/install/install-walkthrough.html#figure-installer-partitions

ZFS vs UFS and power loss
https://forum.netgate.com/topic/120393/zfs-vs-ufs-and-power-loss

pfSense installer version 2.5.2

So far I always used the UFS filesystem and was never running into that problem since now with the kettop Mini PC and the stress test for power outage because of that stupid pre-set Restore From AC Power Loss to Power Off in UEFI.

To determine the current filesystem in pfSense, you can enter the following command directly into the shell or in the GUI under Diagnostics -> Command Prompt -> Execute Shell Command

df -T


To finally solve the boot loop, you wont have to reinstall pfSense thank god, you can solve it by doing a manual filesystem check as described in the following link from netgate.

Manual Filesystem Check
https://docs.netgate.com/pfsense/en/latest/troubleshooting/filesystem-check.html#filesystem-check-manual

  • Boot pfSense into single user mode -> in most cases option 2
  • Press Enter when prompted for a shell
  • Enter fsck -fy / (-f force checking even if filesystem is marked clean, -y assume yes to all questions)
  • Repeat the command at least five times, or until no errors are found nor fixed, even if the filesystem is reported clean.
  • After that finally reboot by enter the same-titled reboot command.





Links

Manual Filesystem Check
https://docs.netgate.com/pfsense/en/latest/troubleshooting/filesystem-check.html#filesystem-check-manual

ZFS vs UFS and power loss
https://forum.netgate.com/topic/120393/zfs-vs-ufs-and-power-loss

coreboot, formerly known as LinuxBIOS
https://en.wikipedia.org/wiki/Coreboot

Pfsense appliance AES-NI Kettop-Mi4005L
https://www.kettopshop.com/pfsense-appliance-aes-ni-pfsense-appliance-intel-gigabit-nic-p2096634.html

PC-Engine APU1D-Bundle Board
https://www.varia-store.com/de/produkt/103574-apu3d2-bundle-board-netzteil-speicher-geh-auml-use-rot.html