From owner-freebsd-questions@freebsd.org Wed Jun 14 16:44:30 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0D6EBEF1E3 for ; Wed, 14 Jun 2017 16:44:30 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay15.qsc.de (mailrelay15.qsc.de [212.99.187.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E6247094E for ; Wed, 14 Jun 2017 16:44:29 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay15.qsc.de; Wed, 14 Jun 2017 18:44:17 +0200 Received: from r56.edvax.de (port-92-195-58-9.dynamic.qsc.de [92.195.58.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id F10193CC3F; Wed, 14 Jun 2017 18:44:15 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v5EGiF7g004446; Wed, 14 Jun 2017 18:44:15 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 14 Jun 2017 18:44:15 +0200 From: Polytropon To: Jov Cc: alphachi , freebsd-questions@freebsd.org Subject: Re: All data in home directory lost after kernel panic Message-Id: <20170614184415.3384fa67.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay15.qsc.de with 6DF8C6834B3 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.1531 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 16:44:30 -0000 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. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...