Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 May 1999 02:29:46 -0400
From:      "David E. Cross" <crossd@cs.rpi.edu>
To:        "Craig A. Struble" <cstruble@vt.edu>
Cc:        freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG, crossd@cs.rpi.edu
Subject:   Re: Need help recovering from major mistake 
Message-ID:  <199905230629.CAA54120@cs.rpi.edu>
In-Reply-To: Message from "Craig A. Struble" <cstruble@vt.edu>  of "Sun, 23 May 1999 01:45:18 EDT." <Pine.OSF.4.02.9905230127520.12492-100000@csgrad.cs.vt.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Using my FreeBSD CD-ROMs, I've been able to go into fixit mode and mount
> the root filesystem of the drive, but I'm not sure where to go from there.
> How can I figure out what my old disklabel was? Is there some way I can
> search the raw disk for the locations of the file systems?
> 
> Any help will be GREATLY appreciated. Please email me directly with your
> responses as I'm not subscribed to the FreeBSD mailing lists.
I had NT kindly overwrite my disklable once, I got arround the problem by
scanning the disk for the magic numbers that signifies the start of a 
FreeBSD sub-partition.  You then have to do some math based on the raw block
numbers to figure out the start and lenght.  you are lucky in that FreeBSD
will tell you if you get the lenght wrong (you need to get the start correct);
it tells you the correct length.  After you have that information go into
'disklabel -e disk' and re-enter the values.

I no longer have the program, but the magic values to look for are easily
gotten by examining the the first  block or 2 from a subpartition.
'dd bs=512 if=/dev/rdsk count=2 | less' did the trick for me.

--
David Cross                               |  email: crossd@cs.rpi.edu 
Systems Administrator/Research Programmer |  Web: http://www.cs.rpi.edu/~crossd 
Rensselaer Polytechnic Institute,         |  Ph: 518.276.2860            
Department of Computer Science            |  Fax: 518.276.4033
I speak only for myself.                  |  WinNT:Linux::Linux:FreeBSD


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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