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? A have already run fsck in single user mode both using and not using the journal but still no luck.

  • Whatever you do, backup your system now by taking a disk image with an USB-bootable emergency util of your choice, and only then attempt to fix your system. – Janne Pikkarainen Feb 20 at 14:36

This indicates structural problems of the drive sometimes. Sometimes it happens after power failure. No matter what you do - first backup immediately. Second is boot into single user mode and perform the fsck -yf on drive. After fsck backup again. It can work further or you can replace it with another known good drive.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.