UFS Wrote over a disklabel during installation on an old system

Whilst install 10.1 on an old system, being unfamiliar with the new bsdinstall I overwrote (I believe) the disklabel on my backup disk. scanffs shows:-

Code:
X: 3907024000 63 4.2BSD 2048 16384 0 # /media

which is likely the right thing.

It is a 2TB ATA disk in a USB enclosure. My question is how to use this info to get at the data I think is hiding in there.

all that shows right now is /dev/da0

Code:
root@sp:/usr/ports/sysutils/ffs2recov # diskinfo -v /dev/da0
/dev/da0
        512             # sectorsize
        2000396746752   # mediasize in bytes (1.8T)
        3907024896      # mediasize in sectors
        0               # stripesize
        0               # stripeoffset
        243201          # Cylinders according to firmware.
        255             # Heads according to firmware.
        63              # Sectors according to firmware.
        5743415A4132303339313432        # Disk ident.

I am reasonably sure that there used to be a /dev/da0s1 mounted as /media.
 
See mdconfig(8). I added an example there that uses gnop(8) to skip over initial data. Using that, you can skip over the 63 blocks (or maybe 62), then mount the filesystem without having to write the the MBR. Mount it read-only, would be my suggestion.

It might be that the slice contains a BSDlabel, which can also be skipped over to get to the actual start of a filesystem.
 
Back
Top