Subject: Re: Mounting a MS-DOS ZIP-disk ?
To: None <port-amiga@NetBSD.ORG>
From: Michael L. Hitch <mhitch@msu.oscs.montana.edu>
List: port-amiga
Date: 12/17/1997 10:35:34
Ruben van Staveren <ruben@luna.net> writes: 
> When trying to mount a whole disk (i.e MSDOS/whatever)
> should the kernel code fake a rdb based on that drive's geometry
> to access the 'c' partition as such ?

  The kernel doesn't use the rdb for access.  It uses a NetBSD disk label.
The amiga creates the NetBSD disk label from the information contained in
the rdb blocks.  The 'c' partition IS created from the drive's geometry.

> 
> If there is a trick to write a rdb on a MSDOS native (ZIP) disk
> without destroying it's content ?

  If the MDDOS native disk doesn't have space in the first 16 blocks to 
stuff an rdb into, then this won't work.

  I don't know how a "MSDOS native" disk would be set up on a ZIP.  If
MSDOS treats it as a "normal" hard disk, it will have a MBR and partition
table in the first sector, and the data would be contained in the partition
defined in that table.  That partition would not start at the beginning of
the disk, so the msdos filesystem would not be able to use the 'c' partition
to mount the filesystem.

  One possibility might be to attempt to edit the disklabel and add a
partition that's located in the correct place [which requires knowing the
starting block and size of the MSDOS partition].  Disklabel will fail when
trying to update the disklabel on the ZIP drive, but may leave the "in-core"
copy of the disklabel with the changes.  That information should then allow
the partition to be mounted.  I'm not certain if this would work, but I
think I have seen the information that newfs is trying to update stick around
in the "in-core" disklabel.

Michael
---
Michael L. Hitch                        mhitch@montana.edu
Computer Consultant,  Information Technology Center
Montana State University, Bozeman, MT     USA