Date: Wed, 14 Jun 2017 23:48:54 +0800 From: Jov <amutu@amutu.com> To: alphachi <alphachi@mediaspirit.org> Cc: freebsd-questions@freebsd.org Subject: Re: All data in home directory lost after kernel panic Message-ID: <CADyrUxOA1sbuUicPUYLQZqHSnFK0hZPcVnSDwHtWGH-cjq9BYw@mail.gmail.com> In-Reply-To: <CAJN5%2BGv1bOWdcW4DB1ahTE0wTUBp=KZeKsQmh3BfcspdhFG=eQ@mail.gmail.com> References: <CAJN5%2BGtkVXOWPZqEnOrJOCD=TsDNUVx8EakqWC9JsmCXnq8%2BWw@mail.gmail.com> <CAJN5%2BGtVdXkMKVmjSxu96F%2BLUrcWAgAwsVWE5h=Q27N5ZBfwaw@mail.gmail.com> <CAJN5%2BGs%2BpuXR12Thfzm4ws73ZK5mgx0wvZo2Ybf_ytZpaKZKkA@mail.gmail.com> <CAJN5%2BGtyHFPCN2XH-SP4kfBypT%2Bs9BMyvRz0nMy5h6icKhtuvQ@mail.gmail.com> <CAJN5%2BGtLwaAfLXR%2B4SKUWqrqabqWOTsDY4qB%2BMVpG2AbgC31qQ@mail.gmail.com> <CAJN5%2BGukW_y9Oa3zyy=PKqd1ZxS8-jwdMjMusE13QqbmxPjuOA@mail.gmail.com> <CAJN5%2BGsQdx=Qevf0yPH65j5dgJ46Pf0GZcv8dgR6D5Cj4OqKyA@mail.gmail.com> <CAJN5%2BGvgORgqvr3WSekANZeK9JFDAsJK2Jh9EGG%2B3HA9WyqiNA@mail.gmail.com> <CAJN5%2BGv1bOWdcW4DB1ahTE0wTUBp=KZeKsQmh3BfcspdhFG=eQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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! Jov 2017=E5=B9=B46=E6=9C=8814=E6=97=A5 11:04 PM=EF=BC=8C"alphachi" <alphachi@me= diaspirit.org>=E5=86=99=E9=81=93=EF=BC=9A > 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. Everythi= ng > is fine, however I suddenly find all data in my home directory disappeare= d; > that is to say, my home directory is empty. > > I think my data still exists on the disk and this is just the problem abo= ut > filesystem, because: > 1. The total size of my home directory is about 132GB before. When I chec= k > 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 thoug= h > 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 nam= e. > For example: > > # recoverdisk /home/fbsd/.zshrc .zshrc > Bigsize =3D 1048576, medsize =3D 32768, minsize =3D 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@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions- > unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADyrUxOA1sbuUicPUYLQZqHSnFK0hZPcVnSDwHtWGH-cjq9BYw>