All data in home directory lost after kernel panic

Polytropon freebsd at
Wed Jun 14 16:44:30 UTC 2017

On Wed, 14 Jun 2017 23:48:54 +0800, Jov wrote:
> Hi, I have similar problem last year and get back my data at last.try the
> following steps:
> Step 1:
> backup your disk using dd.
> Step 2:
> run newfs -N /dev/your_partition,get all the super block numbers.chose one
> in the middle,for example 123456.
> Step 3:
> run fsck_ffs -f -b 123456 /dev/your_partition.(here replace 123456 to your
> num get from step 2)
> Step 4: mount the fs,check the root of the fs,there may be a lost+found
> dir,your data may be in there with some random number as dir name.

This will only work if the alternate superblock has the correct
and intact inode information, which might still be the case after
a background fsck went "too far". Then fsck should be able to
correct the inconsistencies, and a lost+found/ directory will
be created at the top of the file system's hierarchy which
will usually contain all files in their original directory
structure, but with the top level names replaced by inode
numbers; from the content, you can often recreate those names.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list