From owner-freebsd-questions Mon Jul 8 18:51:04 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA22908 for questions-outgoing; Mon, 8 Jul 1996 18:51:04 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id SAA22903 for ; Mon, 8 Jul 1996 18:51:02 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id SAA23283; Mon, 8 Jul 1996 18:46:36 -0700 From: Terry Lambert Message-Id: <199607090146.SAA23283@phaeton.artisoft.com> Subject: Re: Partition table gone. Fixable? To: dougal@iquest.com (Dougal Campbell) Date: Mon, 8 Jul 1996 18:46:36 -0700 (MST) Cc: terry@lambert.org, questions@freebsd.org In-Reply-To: from "Dougal Campbell" at Jul 8, 96 07:26:13 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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.