Subject: Re: hosed partition table
To: None <netbsd-users@netbsd.org>
From: George Georgalis <george@galis.org>
List: netbsd-users
Date: 10/23/2006 23:12:50
On Mon, Oct 23, 2006 at 04:42:49PM +0200, Geert Hendrickx wrote:
>On Mon, Oct 23, 2006 at 10:33:24AM -0400, George Georgalis wrote:
>> 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?
>
>Try to find your /var partition with scan_ffs(8) or scan_lfs(8) (new in
>NetBSD 3.1).  When you've got that, you can recover your fdisk table and
>disklabel(s) from /var/backup/work/.

oh, this was a data disk, so the backups where on the working
fine thank you /var partition. :) Actually I think this is the
first disk I learned BSD fdisk/disklabel partitioning with; well I
struggled for a while and came up with something that worked....
but restoring these files is not going to restore the full d
partition.

I tried manually setting c and d
#        size    offset     fstype [fsize bsize cpg/sgs]
 a: 390721968         0     4.2BSD      0     0     0  # (Cyl.      0 - 387620)
 c: 390721905        63     unused      0     0        # (Cyl.      0*- 387620)
 d: 390721968         0     unused      0     0        # (Cyl.      0 - 387620)


but what's the point... when I made a: the sole partition.
newfs -O2 wd1a works and I can mount it. I unmounted it
and now I'm doing dd if=/dev/zero of=/dev/rwd1d bs=4096
to verify media errors.

Seems working. So really, what is the point of c and d partitions?

// George




==> /var/backups/work/fdisk.wd1 <==
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 387621, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 390721968

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 390721968

Partition table:
0: <UNUSED>
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.

==> /var/backups/work/disklabel.wd1 <==
# /dev/rwd1d:
type: unknown
disk: amnesiac
label: wwpn
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 387620
total sectors: 390721905
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

8 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a: 390721889        16     4.2BSD   2048 16384 28848  # (Cyl.      0*- 387620*)
 c: 390721905         0     unused      0     0        # (Cyl.      0 - 387620*)


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