UFS How to fix inode 2 in UFS

My FreeBSD 11.1 system keeps panic-ing with this:

kernel: panic: ufs_dirbad: /mnt: bad dir ino 2 at offset 0: mangled entry

For such an error most forums suggest an older article (http://phaq.phunsites.net/2007/07/01/ufs_dirbad-panic-with-mangled-entries-in-ufs/) where the final solution is clearing the broken inode using the filesystem debugger.

So bad I am more or less confident that inode 2 is not a simple, regular inode but it is related to the root filesystem so I am not that willing to clear it.

Does anyone have any alternative ideas how to fix this? I have already run fsck in single user mode both using and not using the journal but still no luck.
 
The panic message indicates the bad directory is /mnt, so it's probably not your main root filesystem that has a problem, but the filesystem that is mounted at /mnt.

The inode # of any mount point on my system is always 2.
 
The panic message indicates the bad directory is /mnt, so it's probably not your main root filesystem that has a problem, but the filesystem that is mounted at /mnt.

The inode # of any mount point on my system is always 2.

I cannot imagine how could I miss that "/mnt" in that single line with my ages of experience, but anyway I am really grateful you have pointed this out! This sounds much better than having a broken root filesystem :)
 
Back
Top