Date: Thu, 7 Feb 2008 09:30:45 +0100 From: "Ulrich Spoerlein" <uspoerlein@gmail.com> To: "Torfinn Ingolfsen" <torfinn.ingolfsen@broadpark.no> Cc: freebsd-stable@freebsd.org Subject: Re: Reconstruct disklabel for UFS and GELI volumes Message-ID: <7ad7ddd90802070030h3b42296et60d1e12f9d93d65f@mail.gmail.com> In-Reply-To: <20080207010502.3f96fd3f.torfinn.ingolfsen@broadpark.no> References: <7ad7ddd90802061204p35d0368ekbb54149287618f6a@mail.gmail.com> <20080207010502.3f96fd3f.torfinn.ingolfsen@broadpark.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 7, 2008 1:05 AM, Torfinn Ingolfsen <torfinn.ingolfsen@broadpark.no> wrote: > Ulrich Spoerlein <uspoerlein@gmail.com> wrote: > > There were three labels > Actually, it is one label per slice, unless you are doing something > unusual? s/labels/partitions/ , that's what I meant. > > - ad0s4a: UFS, exact size unknown. Is it possible to infer this from > > the UFS partition size? I can mount this already, as I simply wrote an > > 'a' label of maximum size to the disklabel > > - ad0s4b: GELI encrypted swap > > - ad0s4d: GELI encrypted ZVOL > > FWIW, I have had success with scan_ffs[1] as documented in this short > article[2]. It will recover lost labels, or at least try to. > If you are downloading binary packages from somewhere, be sure to > double check that you get the one that fits your platform (i386 / amd64 > or whatever) and version. > Take it slowly, and double check all steps before comitting anything. I already made some progress. The GEOM classes place a label into the last sector (GEOM::GELI) in my case, so I could use this string to scan the whole slice overnight. Sadly, the geli swap partition has no such signature, only the geli ad0s4d partition has one. However, using geli dump I can get the original partition size. I now only have to adjust the offset/length in the bsdlabel and figure out the original size for ad0s4a (which I guess was 512MB). I should have this back running quickly, once I get home to the machine. Thanks for all the suggestions so far. Since I can't install any packages (I'm using the 6.2 fixit cd), how can I calculate the file system size from the ffsinfo output? Uli
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7ad7ddd90802070030h3b42296et60d1e12f9d93d65f>