Reconstruct disklabel for UFS and GELI volumes

Nikola Lečić nikola.lecic at anthesphoria.net
Thu Feb 7 00:19:26 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On Wed, 6 Feb 2008 21:04:23 +0100
"Ulrich Spoerlein" <uspoerlein at gmail.com> wrote:
 
> Hi,
> 
> 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?

Hi Ulrich,

Try to scan that disk with sysutils/testdisk:

  http://www.cgsecurity.org/wiki/TestDisk

Best regards.
- -- 
Nikola Lečić = Никола Лечић
fingerprint : FEF3 66AF C90E EDC3 D878  7CDC 956D F4AB A377 1C9B

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iQCVAwUBR6pJVfzDP9K2CKGYAQMrxAP9Fxng2ZaHmgB5ID6ZTVfOwNTTDrzPNlMX
FRlOIKnksldTzhUdk0UfsJP9kgYpEInz6gQ3unSlUSBDTgN9jSW6yQGM0fW4hZ3H
27Ge5frdzETXg91TRsx1aP24i3SezNHO0AYLQw9cbD7ftDVHH1yzkmZrxSP7kYJ/
YPge/g7YRKI=
=h/6V
-----END PGP SIGNATURE-----


More information about the freebsd-stable mailing list