Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm booting my FreeNAS from an USB stick. But it became bad and won't boot up.

bad dir ino {X} at offset {X}: mangled entry

I now attached the USB drive to a VM with FreeNAS to mount / or repair the fs on the stick with fsck.

After running fsck -y -t ufs once, the partition seems to be totally destroyed (can't even rerun fsck as it just gives "no superblock found"). So I guess the fs can't be repaired.

That's why I'm now trying to retrieve the config /data/freenas-v1.db.

I mounted "mount -t ufs /dev/da0s1a /tmp/test" but "ls /tmp/test/data/" just gives:

ls: zfs: Bad file descriptor
./ ../

In a working install the config file freenas-v1.db is within that folder and zfs is an ordinary subdir of the folder.

Is the file lost? Any chance to get it back?

share|improve this question
up vote 0 down vote accepted

Finally got the file. Didn't realized /data is mounted from the 4th partition and is not part of the root filesystem.

Unfortunately, it's corrupted and can't be opened and sqlite doesn't seem to have a good tool to repair corrupted databases. So I'm finally out of luck with this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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