Messages in this thread |  | | Subject | Re: Can Linux read DMF format floppies? | Date | Wed, 21 Aug 1996 09:44:05 +0200 | From | Alain Knaff <> |
| |
>Linus Torvalds <torvalds@cs.helsinki.fi> wrote: >> On Tue, 20 Aug 1996, Ron Holt wrote: >> > >> > Can Linux read DMF format floppies? DMF is Microsoft's "Distribution Medi >a >> > Format". Some of the applications they make are distributed in this flopp >y >> > format. I don't know the exact geometry of these floppies. I've been >> > told it's something like 21 instead of 18 sectors per track. Does anyone >> > know where I can find a spec for DMF? >> >> Linux should be able to read them: there may even be a pre-set format for >> them. >> >> /dev/fd0H1680 (major 2, minor 44) should be a 21x2x80 3.5" floppy. > >[...] > >Thanks for the replies. Here's what my research shows... > >DMF is 80x21x2, so /dev/fd0H1680 is the correct device. Thanks for this info. It was not completely clear to me whether DMF was indeed just a plain 80x21x2 format, or sth else.
> /dev/fd0 does not >seem to autodetect this type properly.
Actually, the 80x21x2 format was never meant to be autodetected. Indeed, autodetection basically works by trying out a list of formats in a row. However, the longer this list is, the longer the autodetection takes. That's why only the most common formats are contained in the autodetection list. However, the autodetection list can easily be changed using floppycontrol. For example, in your case, floppycontrol --autodetect 11t,7,8,4,25,28,22,31 should do the job.
However, the way I usually recommend to do it is to use mtools with these disks. Mtools reads the bootsector of the disk (which is readable even if the autodetected geometry is slightly wrong), and uses the information contained therein to configure the correct geometry.
You could use a similar method in Wabi. The number of sectors per track is stored at offset 24 of the bootsector, the number of heads is at offset 26, and the number of cylinders can be obtained by dividing the total number of sectors on the disk (usually stored at offset 19 for floppies) by the number of sectors per track and the number of heads. In order to configure the geometry to read the disk, first use FDGETPRM to get the current (approximative) geometry, change the size, sect, head and track fields, and then write them back using FDSETPRM.
> Even after resetting the geometry >with the FDSETPRM ioctl I wasn't able to access the entire floppy via fd0.
This is odd. Usually, any format readable by a fixed format device is also readable by /dev/fd0 if you configure the exact same geometry from the fixed format device into /dev/fd0. Could you post some details: How many bytes could not be read? Which setfdprm command line did you use? (the correct parameters would be the ones returned by getfdprm /dev/fd0H1680)
>I ended up opening /dev/fd0, determined the real geometry via FDGETPRM, >closed /dev/fd0 and opened the appropriate device (/dev/fd0H1680, for example)
This should not be needed.
>. > >BTW, this work now allows Wabi for Linux to install things like Excel 5.0c and >other applications that Microsoft distributes in DMF. Sun has been doing >some testing of our port of Wabi for Linux and alerted us to this issue.
Interesting. Do you have any information for floppy geometry configuration on Solaris? This would also be useful for mtools.
>(Also, simply mounting /dev/fd0H1680 seems to work fine for reading at least).
It should also work for writing. (Well, maybe not if MS plays silly games with hidden files. In that case, modified disks will be readable by Linux, but maybe not by an MS OS).
> >Ron > >-- >Ron Holt <ron@caldera.com> Caldera, Inc.
Regards,
Alain
-----------------------------------------------------------------------. Email: Alain.Knaff@inrialpes.fr Alain Lucien Knaff . Tel.(work): (33) 76 61 52 68 . Tel.(home): (33) 76 85 23 05 Appartement 310b . (répondeur & minicom 3612) =====O=====/ 11,rue Général Mangin. Fax : (33) 76 61 52 52 =====O=====/ 38100 Grenoble France.
|  |