Fixing Netgate SG-1100 boot loop
SG-1100 is a decent firewall for a home setup, It uses PFSense as its core and has 1 Gbps throughput, the only problem is that if it loses power for any reason like power outage or getting unplugged, it sometimes goes into a boot loop because of filesystem corruption which is very annoying, you definitely don’t want this to happen to a production firewall.
The fix is easy though.
1- Connect to the device using the serial console:
sudo screen /dev/ttyUSB0 115200
or if you’re on a MAC:
sudo screen /dev/cu.usbserial 115200.
2- Power cycle the device so it starts to boot from beginning, then watch for when this prompt comes up, press any key except
Enter to interrupt:
boot -s and hit
Enter, this will boot the device into
Single User Mode
4- At the next prompt, simply hit Enter to get a shell:
fsck -y /, this will fix the whole filesystem and won’t take long.
You may need to run this command a few times, I don’t exactly know why, but it seems it doesn’t fix everything in one go, I ran it 5 times, and the first 3 times it was making changes and fixing stuff, nothing was done on the last 2 times though.
reboot and Enter
Your device should be booting normally now.