Subject: Re: hosed partition table
To: None <netbsd-users@netbsd.org>
From: George Georgalis <george@galis.org>
List: netbsd-users
Date: 10/23/2006 16:19:44
On Mon, Oct 23, 2006 at 04:15:29PM -0400, George Georgalis 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
>crw-r-----  1 root  operator     3,      8 Oct 20 16:50 /dev/rwd1a
>crw-r-----  1 root  operator     3,      9 Sep 17 12:51 /dev/rwd1b
>crw-r-----  1 root  operator     3,     10 Sep 17 12:51 /dev/rwd1c
>crw-r-----  1 root  operator     3,     11 Sep 17 12:51 /dev/rwd1d
>crw-r-----  1 root  operator     3,     12 Sep 17 12:51 /dev/rwd1e
>crw-r-----  1 root  operator     3,     13 Sep 17 12:51 /dev/rwd1f
>crw-r-----  1 root  operator     3,     14 Sep 17 12:51 /dev/rwd1g
>crw-r-----  1 root  operator     3,     15 Sep 17 12:51 /dev/rwd1h
>crw-r-----  1 root  operator     3, 524296 Sep 17 12:51 /dev/rwd1i
>crw-r-----  1 root  operator     3, 524297 Sep 17 12:51 /dev/rwd1j
>crw-r-----  1 root  operator     3, 524298 Sep 17 12:51 /dev/rwd1k
>crw-r-----  1 root  operator     3, 524299 Sep 17 12:51 /dev/rwd1l
>crw-r-----  1 root  operator     3, 524300 Sep 17 12:51 /dev/rwd1m
>crw-r-----  1 root  operator     3, 524301 Sep 17 12:51 /dev/rwd1n
>crw-r-----  1 root  operator     3, 524302 Sep 17 12:51 /dev/rwd1o
>crw-r-----  1 root  operator     3, 524303 Sep 17 12:51 /dev/rwd1p
>
>>Also does disklabel -I -i /dev/rwd1d work?
>
>$ disklabel -I -i /dev/rwd1d
>disklabel: Invalid signature in mbr record 0

ahem, excuse me. disklabel did start...

 $ disklabel -I -i /dev/rwd1d
disklabel: Invalid signature in mbr record 0
partition> P
4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a: 390721968         0     4.2BSD      0     0     0  # (Cyl.      0 - 387620)
 d: 390721968         0     unused      0     0        # (Cyl.      0 - 387620


The last time I wrote this info, I was having trouble creating c
with the propper size (entire disk) less 63s offset.

// Goeorge


-- 
George Georgalis, systems architect, administrator <IXOYE><