[comp.os.minix] Minix-ST: Can I mix 3 1/2" and 5 1/4" floppy drives?

Hugh_Messenger.EuroPARC@xerox.com (11/23/88)

Can Minix-ST cope with a generic 5 1/4" disk drive as the second floppy
disk drive?  I'm looking at getting a 5 1/4" drive (probably a Cumana) so
that I can import PC files, and also until I get a hard disk driver working
I need a second drive for Minix ... but if Minix can't cope with a 5 1/4"
drive I'll have to rethink.

   -- Hugh

hyc@math.lsa.umich.edu (Howard Chu) (11/24/88)

In article <5642@louie.udel.EDU> Hugh_Messenger.EuroPARC@xerox.com writes:
>Can Minix-ST cope with a generic 5 1/4" disk drive as the second floppy
>disk drive?  I'm looking at getting a 5 1/4" drive (probably a Cumana) so
>that I can import PC files, and also until I get a hard disk driver working
>I need a second drive for Minix ... but if Minix can't cope with a 5 1/4"
>drive I'll have to rethink.
>
>   -- Hugh

One of the nice things about Minix is that it comes with full source code.
As delivered, ST Minix only knows about single and double sided 3-1/2"
drives. However, it wouldn't be too hard to "teach" it  about other disk
formats. (The controller commands are identical, all you need to worry about
is the geometry. Maybe the head startup/settle time.)

I've begun modifying my kernel such that the floppy device driver will
handle multiple floppy disk formats. It requires changing an entry in
fs/table.c, add an entry flop_open as a procedure to execute when opening
a floppy disk special file. Add this procedure to stfloppy.c - have it
read block 0 of the floppy and get track/sector parameters before doing
any other operations. These params will have to be maintained in an array,
a set for each floppy drive. This also requires a change to mkfs, to keep
things working - mkfs zeroes block zero of a floppy when creating a file
system on it. That seems a little wrong to me, since there's valuable info
about the disk layout there. It'd seem more appripriate to just zero a
few fields, (# fats, # root entries, etc.) and at least preserve the track
count and number of sectors per track.

Given this scheme, it is then unnecessary to keep a separate special file
for single sided drives as opposed to doubles, because the device driver
will be able to find out for itself and do the right thing.

I'll have my patches ready to post by this weekend, I think...
--
  /
 /_ , ,_.                      Howard Chu
/ /(_/(__                University of Michigan
    /           Computing Center          College of LS&A
   '              Unix Project          Information Systems