Reconstruct disklabel for UFS and GELI volumes
uspoerlein at gmail.com
Thu Feb 7 08:30:52 UTC 2008
On Feb 7, 2008 1:05 AM, Torfinn Ingolfsen
<torfinn.ingolfsen at broadpark.no> wrote:
> Ulrich Spoerlein <uspoerlein at gmail.com> wrote:
> > There were three labels
> Actually, it is one label per slice, unless you are doing something
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 as documented in this short
> article. 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?
More information about the freebsd-stable