need hints to recover lost FreeBSD partition entries in MBR ...

Andreas Klemm andreas at FreeBSD.org
Sun Sep 11 10:15:47 PDT 2005


On Sun, Sep 11, 2005 at 09:42:54AM -0500, Joe Koberg wrote:
> You might want /usr/ports/sysutils/scan_ffs
> 
> from the package description:
> 
>  scan_ffs(8) recovers accidential lost or deleted disklabels.

Thanks for the hint. It turns out for me that for some strange
reason the FreeBSD Slice 4 doesnt start exactly on a Cylinder
boundary :-( DragonFly or Partition Magic, one of these tools
must be the culprit.

Disk name:      ad4                                    FDISK Partition Editor
DISK Geometry:  19457 cyls/255 heads/63 sectors = 312576705 sectors (152625MB)

Offset       Size(ST)        End     Name  PType       Desc  Subtype    Flags

         0         63         62        -     12     unused        0
        63   24579387   24579449    ad4s1      7        fat       11    =
  24579450  174080340  198659789    ad4s2      4 extended DOS        5  =
 198659790   18860310  217520099    ad4s3      8    freebsd      165    =
 217520100   95061708  312581807        -     12     unused        0

scan_ffs -s -b 217520100 ad4
ufs2 at 217528802 size 23761975 mount /data time Mon Jan 31 16:49:36 2005

off by 8702	(217528802-217520100=8702)

detected partition start doesnt start on cylinder:
217528802/255/63=13540.54


Although I try to make the previous slice 3 a little larger
sysinstall doesnt allow me to make the slice greater than
up to the partition boundary.

So I end up with that, see above
217520100/255/63=13540.00

Using sysinstall I cannot create a slightly wrong but working
partition table to access my data again.

Question: What can I use now to be able to re-create Slice 4
starting not exactly at partition boundary but instead
at Sector 217528802 ????

I tried fdisk but cannot enter something like interactive
mode.

All it tells me is this:

root at titan[ttyp3]{208} ~ fdisk ad4
******* Working on device /dev/ad4 *******
parameters extracted from in-core disklabel are:
cylinders=310101 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=310101 heads=16 sectors/track=63 (1008 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 11 (0x0b),(DOS or Windows 95 with 32 bit FAT)
    start 63, size 24579387 (12001 Meg), flag 0
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 254/ sector 63
The data for partition 2 is:
sysid 5 (0x05),(Extended DOS)
    start 24579450, size 174080340 (85000 Meg), flag 0
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 254/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 198659790, size 18860310 (9209 Meg), flag 80 (active)
        beg: cyl 1023/ head 255/ sector 63;
        end: cyl 1023/ head 254/ sector 63
The data for partition 4 is:
<UNUSED>


How can I enter interactice mode in fdisk ???






	Andreas ///

-- 
Andreas Klemm - Powered by FreeBSD 5.4
Need a magic printfilter today ? -> http://www.apsfilter.org/


More information about the freebsd-hackers mailing list