Reconstruct disklabel for UFS and GELI volumes

Ulrich Spoerlein uspoerlein at
Wed Feb 6 20:30:09 UTC 2008


Somehow[TM] an installation of 4.11 to ad0s3 managed to wipe out my
existing disklabel for 7.0 on ad0s4. I now need to recover the
disklabel to get my system to boot!

There were three labels
- 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

I only need to find out the start of ad0s4d. Is the consumer size of
an GELI device stored in the last 512 bytes metadata? Or are there
some magic bytes in this 512 bytes so I could find out the exact end
of ad0s4b and thus the start of ad0s4d?

Any help or advice would be highly appreciated!


More information about the freebsd-stable mailing list