Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 2004 14:20:52 -0500
From:      ANISH MISTRY <mistry.7@osu.edu>
To:        =?iso-8859-1?Q?=22Jos=E9_M=2E_Fandi=F1o=22?= <freebsd4@fadesa.es>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: recovering partitions (not slices), is it possible? (Solution)
Message-ID:  <7949b654.b6547949@osu.edu>

next in thread | raw e-mail | index | archive | help
scan=5Fffs (sysutil/scan=5Fffs) was ported from OpenBSD a few weeks ago=2C=
 and it is in the ports (good thing for a fixit cd=2E) =3A)

--
Anish Mistry

----- Original Message -----
From=3A =22Jos=E9 M=2E Fandi=F1o=22 =3Cfreebsd4=40fadesa=2Ees=3E
Date=3A Monday=2C January 26=2C 2004 12=3A48 pm
Subject=3A Re=3A recovering partitions (not slices)=2C is it possible=3F =
(Solution)

=3E Hello again=2C
=3E =

=3E I was able to recover all deleted partitions =3A)
=3E =

=3E I found this program http=3A//ls=2Esi=2Eru/freebsd/find-super-blocks=2E=
c
=3E it provides me sufficient information for recreating both
=3E partitions=2E
=3E =

=3E From another FreeBSD machine it was as easy as=3A
=3E prue5=23 =2E/find-super-blocks /dev/ad2s2
=3E FS=5FMAGIC at sector 16=3A / -=3E 204800 sectors=2E bsize=3A 16384
=3E FS=5FMAGIC at sector 409616=3A /var -=3E 196608 sectors=2E bsize=3A 1=
6384
=3E =

=3E with this output we can give the appropriated value to
=3E disklabel and redefine the boundary between the root and
=3E var partitions=2E
=3E =

=3E 8 partitions=3A
=3E =23        size   offset    fstype   =5Bfsize bsize bps/cpg=5D
=3E  a=3A   409600        0    4=2E2BSD        0     0     0   =23 (Cyl=2E=
    =

=3E 0 - 433*)
=3E  c=3A   803250        0    unused        0     0         =23 (Cyl=2E =
   =

=3E 0 - 849)
=3E  e=3A   393650   409600    4=2E2BSD        0     0     0   =23 (Cyl=2E=
  =

=3E 433*- 849*)
=3E =

=3E prue5=23 fsck -f /dev/ad2s2a
=3E ** /dev/ad2s2a
=3E ** Last Mounted on /mnt
=3E ** Phase 1 - Check Blocks and Sizes
=3E ** Phase 2 - Check Pathnames
=3E ** Phase 3 - Check Connectivity
=3E ** Phase 4 - Check Reference Counts
=3E ** Phase 5 - Check Cyl groups
=3E 2420 files=2C 22779 used=2C 77980 free (820 frags=2C 9645 blocks=2C 0=
=2E8=25 =

=3E fragmentation)=11
=3E prue5=23 fsck -f /dev/ad2s2e
=3E ** /dev/ad2s2e
=3E ** Last Mounted on /data2
=3E ** Phase 1 - Check Blocks and Sizes
=3E ** Phase 2 - Check Pathnames
=3E ** Phase 3 - Check Connectivity
=3E ** Phase 4 - Check Reference Counts
=3E ** Phase 5 - Check Cyl groups
=3E 1188 files=2C 53963 used=2C 43548 free (1020 frags=2C 5316 blocks=2C =
1=2E0=25 =

=3E fragmentation)
=3E regards=2E
=3E =

=3E =22Jos=E9 M=2E Fandi=F1o=22 wrote=3A
=3E =3E =

=3E =3E Hello=2C
=3E =3E =

=3E =3E  I was trying to install FreeBSD 5=2E2 in the slice ad0s3 but
=3E =3E accidentally I erased two partitions of my 4=2E9 system which
=3E =3E were in the ad0s2 slice =3A(
=3E =3E =

=3E =3E ad0s1 -=3E Linux boot
=3E =3E ad0s2 -=3E FreeBSD 4=2E9 (deleted partitions)
=3E =3E ad0s3 -=3E FreeBSD 5=2E2
=3E =3E ad0s4 -=3E Extended partition
=3E =3E =

=3E =3E they were the root and var partitions (usr and home were
=3E =3E in different disks)=2E
=3E =3E strings /dev/ad2s2c =7C grep =22/dev/ad0s2=2E*ufs=22
=3E =3E /dev/ad0s2e             /var            ufs     =

=3E rw=2Cnoatime=2Cnosuid       0       1
=3E =3E /dev/ad0s2a             /               ufs     rw              =

=3E 1       1
=3E =3E =

=3E =3E As the disk hasn=27t been reformatted or written over all the
=3E =3E data is still here=2E
=3E =3E =

=3E =3E I haven=27t got luck googling=2C so I would like to ask for
=3E =3E advises=2E Perhaps searching some type of signature helps
=3E =3E to find the deleted partitions=2E
=3E =3E =

=3E =3E thanks you=2E
=3E =3E =

=3E =3E =23 fdisk ad2
=3E =3E ******* Working on device /dev/ad2 *******
=3E =3E parameters extracted from in-core disklabel are=3A
=3E =3E cylinders=3D8912 heads=3D15 sectors/track=3D63 (945 blks/cyl)
=3E =3E =

=3E =3E Figures below won=27t work with BIOS for partitions not in cyl 1
=3E =3E parameters to be used for BIOS calculations are=3A
=3E =3E cylinders=3D8912 heads=3D15 sectors/track=3D63 (945 blks/cyl)
=3E =3E =

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

=3E =3E =23 disklabel ad2s2
=3E =3E =23 /dev/ad2s2=3A
=3E =3E 8 partitions=3A
=3E =3E =23        size   offset    fstype   =5Bfsize bsize bps/cpg=5D
=3E =3E   c=3A   803250        0    unused        0     0         =23 =22=
raw=22 =

=3E part=2C don=27t edit
=3E =3E =

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

=3E =3E freebsd-questions=40freebsd=2Eorg mailing list
=3E =3E http=3A//lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-questions=

=3E =3E To unsubscribe=2C send any mail to =22freebsd-questions-
=3E unsubscribe=40freebsd=2Eorg=22
=3E -- =

=3E -----BEGIN GEEK CODE BLOCK-----
=3E Version=3A 3=2E1
=3E GCS/IT d- s+=3A+() a- C+++ UBL+++=24 P+ L+++ E--- W++ N+ o++ K- w---
=3E O+ M+ V- PS+ PE+ Y++ PGP+=3E+++ t+ 5 X+=24 R- tv-- b+++ DI D++=3E+++
=3E G++ e- h+(++) !r !z
=3E ------END GEEK CODE BLOCK------
=3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
=3E freebsd-questions=40freebsd=2Eorg mailing list
=3E http=3A//lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-questions
=3E To unsubscribe=2C send any mail to =22freebsd-questions-
=3E unsubscribe=40freebsd=2Eorg=22



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7949b654.b6547949>