Subject: Re: NetBSD Hang after disklabel, xsm crash
To: Harald Bjoroy <harald@bitcon.no>
From: Patrick Welche <prlw1@cam.ac.uk>
List: port-i386
Date: 07/29/1998 11:46:08
Harald Bjoroy wrote:
> 
> 
> > > There should be a NetBSD tool (or at least a NetBSD 
> > distributed tool)
> > > for zapping the disklabel area of the disk to fix this kind of =
> > > problems.
> > 
> > ? both /sbin/fdisk and /bin/dd exist on the NetBSD bootfloppy.
> 
> But they hang the machine because somehow they read the faulty disklabel
> (or whatever made the disk go bad).
> 
> Maybe the fault is in the disk-driver, and impossible to get by using
> NetBSD, so the pfdisk.exe tool might be a solution. I have only heard
> references to this toool, I haven't seen it (nor looked for it).
> 
> > 
> > a: Start at sector  0, end at sector 6281856, type 4.2BSD
> > c: Start at sector  0, end at sector 6281856, type unused
> > d: Start at sector  0, end at sector 6281856, type unused
> > 
> > if it is a nice old-fashioned working BIOS, or
> > 
> 
> I can try this; this is very close to what I did in the first place,
> this'll give me a warning I understand I should ignore. I used the c
> partition, newfs complained with a warning but the fs was usable, it was
> only me wanting to get rid of the warnings that made me do the magic
> which made the disk hang the system.

Sorry, I can't remember the beginning: how do you get to 6281856 ? If
below (63s/16h/6244c) is right, then 63*16*6244=6293952 should be the
magic number, and something like

thisdisk|Harald's disk:\
        :dt=ST506:se#512:ns#63:nt#16:sc#6244:nc#4092:\
        :pa#6293952:oa#0:ta=4.2BSD:ba#8192:fa#1024:\
        :pc#6293952:oc#0:\
        :pd#6293952:od#0:

should do the trick, else try

badbios|Harald's disk:\
        :dt=ST506:se#512:ns#63:nt#16:sc#6244:nc#4092:\
        :pa#6293889:oa#63:ta=4.2BSD:ba#8192:fa#1024:\
        :pc#6293889:oc#63:\
        :pd#6293952:od#0:

(Oh, and I spotted the answer to my "how to mount a dos disk without a
NetBSD partition" question: the automatically generated disklabel for
it is partition "e", so mount -t msdos /dev/wd0e /dos did the trick)

Cheers,

Patrick