[comp.os.minix] Handling all floppy formats

timcc@csv.viccol.edu.au (Tim Cook) (01/14/90)

(I am not a Minix internals expert, but I have been following this
discussion, and I think I can provide some input).

To summarize the discussion on the Minix floppy driver vs. the many
different PC disk formats:

   The Minix boot procedure and/or floppy driver can be modified to
   discover the exact disk type by reading the number of tracks and
   sectors per track put on the first sector of a disk by most disk
   formatters.

   This is no good, however for those that want to access a disk as a
   raw device.  The first sector is considered an addressable part of
   that raw device.

   Some suggest getting the driver to attempt to read sectors or tracks
   that only exist on particular formats, and to discover the format by
   elimination.  Others suggest that this is unfriendly to hardware
   (and I agree).

   So what do we do?

Can I suggest the following:

In many contemporary Unix systems, particular types of behaviour of a
device driver can be indicated by using different special files to access
the particular device.  For example, you can tell the BSD 9-track tape
drive driver whether or not to rewind the tape after you have finished
accessing it by selecting one or the other of /dev/rmt8 or /dev/rmt12.
You can also tell the driver to write to the tape at either 1600 or 6250bpi
using a similar selection.

Given the precedent, can we not use this idea to indicate all floppy
driver options with Minix?  What I suggest entails:

   1. Write a floppy driver that can read all known formats (and keep it up
      to date).

   2. Assign 4 (assuming that is the largest number of floppies a system
      will have) consecutive minor device numbers to each of the known
      floppy formats.  The first number will refer to the first floppy in
      the system, and so on.

   3. For the convenience of those who can't (or don't want to) remember
      the format of their boot or filesystem floppies, assign 4 minor
      device numbers that will indicate to the floppy driver that the
      floppy type can be read off sector 1.

   4. Provide a procedure to create the necessary set of special files that
      correspond to the individual user's floppy setup during installation.

Can anyone see anything wrong with this?  If not, can someone decide on a
standard?