Can't load 'kernel'
-
After power outage, I got pfSense box not booting. On screen I see a message
Can't load 'kernel'Then is suggests to type question mark for list of commands and prints
OKI have simple commands like
ls,lsdev, but I don't havecdorcat.lsshows a 2 column list of apparent directories (d) and files, but I can'tlswith pathOK ls boot open 'boot' failed, no such file or directoryThis can hint that filesystem was damaged, but I can see any file in first level, like
OK more COPYRIGHT ...<shows file>...Can we suggest that filesystem is OK, but something like BIOS settings are bad? Or may be some automatic update changed kernel, which appeared not bootable.
Neither commands like
boot kernel.old load /boot/kernel.oldworked.
-
Time to run a fsck.
-
Is it possible to run it from boot loader? How to run it?
-
See here https://docs.netgate.com/pfsense/en/latest/hardware/troubleshooting-disk-check-errors-fsck.html
and or here https://docs.netgate.com/pfsense/en/latest/hardware/boot-troubleshooting.html
-
At the OK prompt do:
OK load /boot/kernel.old/kernel \ /boot/kernel.old/kernel text=0x17c69f8 data=0xb94940+0x517b18 syms=[0x8+0x198228 +0x8+0x198f6d] - OK boot -sSteve
-
@stephenw10 it says
can't find '/boot/kernel.old/kernel' can't find '/boot/kernel.old/kernel'(twice)
-
@Gertjan it didn't help
I ran
fsckit found some errors, fixed them, finally said filesystem is ok, but if booting then situation is the same. While in command line, I was able to mount that filesystem and browse it.bootdirectory was browseable. -
After I made
gpart bootcode -b /boot/pmbr -p /boot/gptboot -i1 ada0s1I got worse situation on boot
Invalid partition table -
If it got to the point where it can't load the kernel, I wouldn't settle for anything less than a wipe+reload. I'd also be suspicious of the disk itself.