Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jul 1996 18:46:36 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        dougal@iquest.com (Dougal Campbell)
Cc:        terry@lambert.org, questions@freebsd.org
Subject:   Re: Partition table gone. Fixable?
Message-ID:  <199607090146.SAA23283@phaeton.artisoft.com>
In-Reply-To: <Pine.BSI.3.93.960708185409.3972H-100000@vespucci.iquest.com> from "Dougal Campbell" at Jul 8, 96 07:26:13 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> I had seen the -B option for disklabel, but was afraid to touch anything
> until I had heard from someone more knowledgable on the subject. Also, I
> didn't think it would really matter, since this was not the boot disk. As
> you might guess from above, the machine has wd0 and wd1, and wd1 is the
> afflicted disk, and it was mounted as /usr/local. Also, this is FreeBSD
> 2.1R. Will disklabel -B actually do anything useful in this case?
> 
> While I'm searching more of the mailing list archives, what other tips can
> you offer? I've never had to deal with low-level disk repair before.
> Nothing that couldn't be fixed by fsck, anyhow.  At least, not under
> unix (I've hacked similar filesystems, like OS/9). What tools can I use
> to read/modify sectors directly, if necessary -- dd? If I try disklabel -B
> (or -w, for that matter), will I just screw things up even more?

If you know where things are offset at, you can basically rewrite the
important parts with the standard tools, and nothing will be damaged.

Were you mounting an MSDOSFS partition that is in fromnt of the BSD
partition?  If so, this is probably the cause of your problem. 8-(.

Your biggest problem is going to be figuring out slice 'b' if you
don't rememebr the size; swap partitions don't have magic numbers.

A good bet would be a binary editor (like xvi), except one that works
on a block-by-block basis, so you can edit sectors by editing the device.

I remember an "xedit" from about 3 years ago.

If you don't have another BSD system, you will probably want to ask for
someone to compile it so you can get it onto your fixit floppy, if you
are going to take that route... otherwise, you will need to write a tool
to search for the magic number.

If you remember who I was replying to, I'm sure they have some of the
tools -- I rememebr them talking about having recovered their system
after the first posting you refer to.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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