Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Sep 1996 16:10:11 -0400
From:      Richard Hwang <rhwang@mail.io.com>
To:        hackers@freebsd.org
Subject:   rebuilding trashed disklabel
Message-ID:  <199609092010.QAA02289@megazone.bigpanda.com>

next in thread | raw e-mail | index | archive | help
I have a drive here (western digital 32500 2.5G ide) on a Dell P6 system with
80M RAM which had FreeBSD on it.  (The whole drive was allocated to FreeBSD;
no multiple boot to other operating systems.)  When I rebooted the system, it
failed to boot, claiming that I should insert bootable media.  When I checked
out the disklabel, it looked something like this:

[...]
1 partition:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c:    65536        0    4.2BSD        0     0     0   # (Cyl.    0 - 31)

I figured that all I had to do was to rebuild the disklabel, and then I'd
get the entire drive back, since the data is probably still there (unless
it decided to follow the disklabel into oblivion). 

The problem is that I don't know the sizes of the partitions.  Here is what
I do know:

wd0a   /      32M
wd0b   swap   ?M (probably between 80M - 256M?)
wd0e   /var   ?M
wd0f   /tmp   ?M
wd0g   /usr   ?M

I was able to recover wd0a successfully by defining wd0a.  I have a perl
script which adjusts the partition offsets, writes the disklabel, and tries
to mount the partition, but realized that it would take forever to finish.

Is there some easier way to restore the other partitions?

-Rich

-- 
Richard Hwang                                                 rhwang@io.com





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