Archive

Posts Tagged ‘pfSense’

pfSense kernel panic, run `fsck /` like five times

January 23, 2017 Leave a comment

I was installing a Sense unit into my breaker panel and was repeatedly breaking the master power (yes, I probably should have unplugged sensitive equipment). It turned out that the file system on my new SG-2220 pfSense appliance from NetGate wasn’t a huge fan and the system would enter a kernel panic upon boot.

I grabbed a USB cable with a mini-b plug and used puTTY, 115200 baud, 8-N-1, as directed in the user manual, then performed the following steps to backup the config (which includes the certificates!), and then fix the file system:

#https://www.netgate.com/docs/sg-2220/connect-to-console.html
#at pfsense boot time, boot into single user mode

#plug in a usb stick
#https://forums.freebsd.org/threads/4501/
mount -t msdosfs -o large /dev/ad6s1 /mnt

#https://turbofuture.com/computers/How-to-Backup-and-Restore-Configurations-in-pfSense
#http://hints.macworld.com/article.php?story=20100212171620210
#https://forum.pfsense.org/index.php?topic=40696.0
cp -npRv "/cf/conf" "/mnt/cf_conf/"

# unmount usb
cd
umount /mnt

#https://www.cyberciti.biz/faq/howto-freebsd-remount-partition/
#https://redmine.pfsense.org/issues/5592
fsck / #select y for all the things
fsck / #select y for all the things
fsck / #select y for all the things
fsck / #select y for all the things
mount -o rw /

#https://doc.pfsense.org/index.php/Forcing_a_Filesystem_Check
touch /root/force_fsck
reboot
Advertisements
Tags:
%d bloggers like this: