Troubleshooting Disk and Filesystem Issues¶
Triggering a Filesystem Check¶
pfSense will run a filesystem check ( fsck
) at boot when it detects an
unclean filesystem, typically from after a power outage or other sudden unclean
reboot or shutdown. In rare cases, that isn’t always enough, as a filesystem can
become corrupted in other ways that may not always leave the drive marked
unclean.
In these cases, perform one of the following repair methods.
Automatic Filesystem Check¶
These methods force a filesystem check during the boot sequence even if the drive is considered clean.
Note
This option is not present on all firewalls as it is not compatible with certain hardware. To run a manual check instead, see Manual Filesystem Check.
GUI¶
Navigate to Diagnostics > Reboot
Set Reboot Method to Reboot with Filesystem Check
Click
Submit
The firewall will reboot and run the check. Monitor the console output for errors.
Console¶
Connect to the console
Choose the menu option to reboot from the console menu (
5
)Enter
F
(uppercase “f”)
The firewall will reboot and run the check. Monitor the console output for errors.
Manual Filesystem Check¶
If an automatic filesystem check is not possible, run a manual check instead:
Reboot the firewall into single user mode.
For most firewalls this can be done using option
2
from the boot menu.If the boot menu is unavailable, press the
Space
bar while the kernel is loading at boot time, which will start the boot loader with anOK
orloader>
prompt. From there, enter:boot -s
Warning
Check the prompt again before typing this command. It must say either
loader>
orOK
. If the prompt shows a different string such asMarvel>>
that is not the correct prompt for this action. Reboot and try again.Press
Enter
when prompted for a shellEnter
fsck -fy /
Repeat the command at least five times, or until no errors are found nor fixed, even if the filesystem is reported clean.
Example:
/boot/kernel/kernel data=0x19e4818+0x777e8 syms=[0x4+0x9a3b0+0x4+0xdc388]
|
Hit [Enter] to boot immediately, or any other key for command prompt.
Type '?' for a list of commands, 'help' for more detailed help.
loader> boot -s
[lots of boot output]
Enter full pathname of shell or RETURN for /bin/sh:
# fsck -fy /
See also
The Netgate Resource Library contains a video which walks through the process of running a filesystem check.