> /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.