Subject: Re: hosed partition table
To: None <netbsd-users@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: netbsd-users
Date: 10/24/2006 20:48:36
In article <20061023215119.GE16473@run.galis.org>,
George Georgalis <george@galis.org> wrote:
>On Mon, Oct 23, 2006 at 09:42:55PM +0000, Christos Zoulas wrote:
>>In article <20061023201529.GB16473@run.galis.org>,
>>George Georgalis <george@galis.org> wrote:
>>>On Mon, Oct 23, 2006 at 06:11:06PM +0000, Christos Zoulas wrote:
>>>>In article <20061023143323.GA19828@run.galis.org>,
>>>>George Georgalis <george@galis.org> wrote:
>>>>>On Sun, Oct 22, 2006 at 08:57:18PM -0400, George Georgalis wrote:
>>>>>>While I was unloading a disk with errors, I noticed the partition
>>>>>>table was odd, I tried to fix it and now, basically the situation
>>>>>>can be reduced to the c and d partitions have been deleted.
>>>>>
>>>>>BTW - I DID get all the needed data off the drive before I started
>>>>>mucking with the partition table and this is the output of fdisk
>>>>>and disklabel
>>>>>
>>>>> $ fdisk wd1
>>>>>fdisk: DIOCGDEFLABEL: Inappropriate ioctl for device
>>>>>fdisk: DIOCGDINFO: Inappropriate ioctl for device
>>>>> $ disklabel wd1
>>>>>
>>>>>disklabel: Invalid signature in mbr record 0
>>>>>disklabel: ioctl DIOCGDINFO: Inappropriate ioctl for device
>>>>>
>>>>>I'm pretty sure this has nothing to do with the disk errors that
>>>>>started this journey. The system happens to be 3.1_RC2, but
>>>>>if needed, I could change this box easily enough. What other
>>>>>commands are available to doctor the disk?
>>>>
>>>>what does ls -l /dev/rwd1* say?
>>>
>>> $ ls -l /dev/rwd1*
>>>-rw-r--r-- 1 root wheel 267324504 Oct 21 18:31 /dev/rwd1
>>
>>I think you should remove that :-)
>
>gone.
>
>I can use to "disklabel -i -I wd1" to add or remove partitions c
>or d; but there is a special property of d being 63 sectors larger
>then the largest c ("entire disk") which I cannot reproduce...
>that's where I'm stuck.
Well if you have an mbr you can define c to start at 63 by using:
disklabel -i -I wd1
R s
c
unused
63s
$
d
unused
0
$
christos