All data in home directory lost after kernel panic

Jov amutu at
Wed Jun 14 15:48:58 UTC 2017

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.

Good luck!


2017年6月14日 11:04 PM,"alphachi" <alphachi at>写道:

> Today I upgraded my system to 10.3-STABLE r319937 successfully. It's
> installed on UFS with GELI.
> When I double-click a VM in virtualbox, the system reboots because of a
> kernel panic. After autofsck, the login prompt shows, but the system
> reboots again while I input my login imformation and press Enter. I have to
> boot single user mode and run fsck manually, then login as root. Everything
> is fine, however I suddenly find all data in my home directory disappeared;
> that is to say, my home directory is empty.
> I think my data still exists on the disk and this is just the problem about
> filesystem, because:
> 1. The total size of my home directory is about 132GB before. When I check
> the output of "df -h" now, the value of "Used" is still about 132GB.
> 2. The operation of user login shouldn't cause a kernel panic, even though
> the home directory is empty.
> 3. "ls -a /home/fbsd" hasn't any output, but normally it should output .
> and .. at least.
> I try to use recoverdisk(1) to recover a file that I can remember its name.
> For example:
> # recoverdisk /home/fbsd/.zshrc .zshrc
> Bigsize = 1048576, medsize = 32768, minsize = 512
> start    size    block-len    state    done    remaining    % done
> 0    4220    4220    0    4220    0    100.00000
> Completed
> Although I checked this file and confirmed the recovery is successful, I
> can't recover all data by this way since it's impossible to remember all
> filenames. As far as I know, recoverdisk(1) doesn't support directory
> recovery like "recoverdisk <src_dir> <des_dir>". Should I try to use
> something like "recoverdisk /dev/<geli_node> <usbmnt_dir>" firstly?
> Any idea about this? Thanks!
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-
> unsubscribe at"

More information about the freebsd-questions mailing list