Subject: Re: Test kernels
To: William Gallafent <William.Gallafent@comlab.ox.ac.uk>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: port-arm32
Date: 03/30/1998 13:21:19
> However,
> how do I mount a disc in the drive ... I've tried various combinations of
> things, eg mount -t msdos /dev/sd0a /mnt ... but I get things about
> incorrect partition type, that sort of thing.
>
> Can someone tell me exactly what I should try, and then I'll know if it's
> my fault or some problem with the ATAPI code (I suspect the former!)

There be dragons here.

There are likely 'several' issues here:

(1) the check for the RiscBSD/RISCiX/whatever "filecore boot block"
isn't as robust as it could be.  In particular, 'fresh' zip disks (and
perhaps non-fresh, MS-DOS-formatted zip disks) pass the filecore boot
block checksum (not because of a deficiency in the coding, really; the
definition of the checksum is kind-of bogus 8-), which leads to the
confusing messages you report.

(2) even if that's fixed, the arm32 port doesn't understand
MS-DOS-style MBR disk labelling, and so won't fake up a disklabel so
that the 'right bits' containing the DOS filesystem can easily be
accessed.


If you're just using the disk for NetBSD/arm32 file storage, I
suggest:

	dd if=/dev/zero of=<raw disk device raw partition, e.g. /dev/rsd0a> \
		bs=32k count=16

Then using 'disklabel' to put a label on the disk, newfs to put a file
system on it, etc.

A good disklabel for zip disks is:

atapi-zip|IOMEGA 95Mbyte ZIP ATAPI dirve:\
        :dt=ATAPI:ty=removable:se#512:nt#64:ns#96:nc#32: \
        :pa#196608:oa#0:ta=4.2BSD:ba#512 \
        :pc#196608:oc#0 \
        :pd#196608:od#0 

(or at least, that's the one I/we tend to use.)

(There are some problems with using disklabel -r if you've got a copy
compiled from sources more than a few days old, at this point, but i
think that zeroing as much disk as i suggested about will work around
them.)


If you want to use the ZIP disks for data interchange with PCs that
understand MS-DOS file systems, I don't really know a 'good' way to do
that right now.  (Somebody else might, though.)

In some spare time, i'm trying to whack the arm32 disklabel code so
that i can figure out how to deal with DOSsy MBR partitions, but i
don't have much time to throw at the problem.



chris