recovering partitions (not slices), is it possible?

JoséM.Fandiño freebsd4 at fadesa.es
Sun Jan 25 13:37:06 PST 2004


Hello,

 I was trying to install FreeBSD 5.2 in the slice ad0s3 but 
accidentally I wiped two partitions of my 4.9 system which 
were in the ad0s2 slice :(

ad0s1 -> Linux boot
ad0s2 -> FreeBSD 4.9 (deleted partitions)
ad0s3 -> FreeBSD 5.2
ad0s4 -> Extended partition

they were the root and var partitions (usr and home were
in different disks).
strings /dev/ad2s2c | grep "/dev/ad0s2.*ufs"
/dev/ad0s2e             /var            ufs     rw,noatime,nosuid       0       1
/dev/ad0s2a             /               ufs     rw              1       1

As the disk hasn't been reformatted or written over all the 
data is still here. 

I haven't got luck googling, so I would like to ask for 
advises. Perhaps searching some type of signature helps 
to find the deleted partitions.

thanks you.

# fdisk ad2
******* Working on device /dev/ad2 *******
parameters extracted from in-core disklabel are:
cylinders=8912 heads=15 sectors/track=63 (945 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=8912 heads=15 sectors/track=63 (945 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 131 (0x83),(Linux native)
    start 63, size 16002 (7 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 16/ head 14/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 16065, size 803250 (392 Meg), flag 0
        beg: cyl 17/ head 0/ sector 1;
        end: cyl 866/ head 14/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 819315, size 2634660 (1286 Meg), flag 0
        beg: cyl 867/ head 0/ sector 1;
        end: cyl 1023/ head 14/ sector 63
The data for partition 4 is:
sysid 5 (0x05),(Extended DOS)
    start 3453975, size 4964085 (2423 Meg), flag 0
        beg: cyl 1023/ head 14/ sector 63;
        end: cyl 1023/ head 14/ sector 63

# disklabel ad2s2
# /dev/ad2s2:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c:   803250        0    unused        0     0         # "raw" part, don't edit


-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/IT d- s+:+() a- C+++ UBL+++$ P+ L+++ E--- W++ N+ o++ K- w---
O+ M+ V- PS+ PE+ Y++ PGP+>+++ t+ 5 X+$ R- tv-- b+++ DI D++>+++
G++ e- h+(++) !r !z
------END GEEK CODE BLOCK------


More information about the freebsd-questions mailing list