 FDPATCHES FREQUENTLY ASKED QUESTIONS (Last updated on 8 January 1995)
 ====================================

 This FAQ is regularily updated in the directory
ftp.imag.fr:pub/Linux/ZLIBC/floppy/FAQ. 
 You find alpha releases of fdutils in the directory
ftp.imag.fr:pub/Linux/ZLIBC/fdutils . They are named
fdu<day><month>.taz or fdu4.0-<day><month>.diff.gz

 You may find ALPHA patches of the driver itself in
ftp.imag.fr:pub/Linux/ZLIBC/floppy/ALPHA. These patches are named
fdp<kernel-version>-<day><month>.diff.gz
 WARNING: These _are_ ALPHA, and may introduce new problems! Some
problems may only show up on certain hardware, or when trying weirdo
things. So don't be misled by people claiming they are stable and
should really be BETA. What works for one person, may not work for
somebody else at all. This directory contains a RELEASES file
describing the features of some of these patches.

 If after some testing these patches prove to be sufficiently stable,
they'll move into ftp.imag.fr:pub/Linux/ZLIBC/floppy/BETA.

 You may find quick&dirty fixes to the driver in
ftp.imag.fr:pub/Linux/ZLIBC/QDF. These patches are named
fdp<kernel-version>-<day><month>.diff
 These patches fix only the most obvious problems, or introduce
trivial enhancements. The main objective is to keep these patches
small and local, in order to keep the probability of introducing new
problems as small as possible. However, they may not attack the root
of the problem but only cure the symptoms. This directory contains a
RELEASES file describing the features of these patches.

 The ALPHA, BETA and QDF directories are removed, and replaced by a
README file when they get empty due to integration of the patches into
the stock kernel. You may still find patches to old kernels in
ftp.imag.fr:pub/Linux/ZLIBC/obsolete


1. I get "/dev/fd0: No such device or address", and it worked before 1.1.66

 Remember to run 'make config'.

 Recently, a certain number of users reported that there floppy drive
became inaccessible. Very often, it turned out that they forgot to run
make config. 
 Indeed, recently, the floppy driver became optional. The default
option was still to include it. Unfortunately, if you don't run make
config at all, the config utility doesn't even get the occasion to
apply the default.
 Conclusion: Run make config, and answer "yes" to the question "Normal
floppy disk support"


2. Is it possible to use fdpatches with two floppy disk controllers?

 YES. To use both controllers, boot the kernel with the lilo parameter
'floppy=two_fdc'. This parameter can be given on the lilo prompt, just after
the name of the kernel. It can also be specified in the /etc/lilo.conf file
by adding:
 append = "floppy=two_fdc"
 It is assumed that your second controller lives at 0x370. If it uses
another I/O base-address, change this address in the floppy.c. The
drives on the second controller use the minor device numbers 128-131
for the generic device, and 132-255 for the fixed geometry device. The
following formula gives the minor number: minor = fdc * 128 + geometry
* 4 + unit


3. Is it possible to boot off these special format disks?

 No. This is because the kernel image itself is loaded using BIOS
routines, and the BIOS doesn't know about these formats.


4. How should I report bugs?

 If you have a question or a bug report about the floppy driver, mail
me at Alain.Knaff@imag.fr. If you post to the news, use preferably one
of the groups comp.os.linux.help (for questions) or
comp.os.linux.hardware (for bug reports). As the volume in these
groups is rather high, be sure to include the word "floppy" (or
"FLOPPY") in the subject line.

 a. In case of a kernel panic, or OOPS, please note the EIP, and the
values on the stack (some of these are the calling functions). Then
look up those values in your zSystem.map (or System.map)
 b. In case of a lock-up (operation never completes), try to figure
out what operations are needed to reproduce it. (If you don't succeed
in reproducing it, please mention the floppy operations you remember.)
 c. If you can't access a disk, include the output of
floppycontrol -pP --printfdcstate into your bug report.
 d. If something weird happens during boot (lock-up, no floppy drives
accessible, trouble with unrelated hardware), include a listing of the
messages at boot. (You can obtain this with dmesg. If the boot doesn't
complete only note the most important messages down [few lines before
the crash, and floppy related lines])
 e. In case of I/O errors, switch to full debugging with 
'floppycontrol --debug'. Then include the kernel messages as well as
the application messages with your bug report. If you're using
xwindows, you won't see the kernel messages appear in your xterm
window. Use dmesg to get them. dmesg includes all messages since boot
(or as many as fit in the buffer, if there are too many messages). Do
also a dmesg before executing the command, in order to find out which
messages were triggered by the command. Alternatively, you may get the
printk module from ftp.imag.fr:pub/Linux/ZLIBC/misc/printk.tgz. This
module allows you to insert "comments" into the stream of console
messages.
 f. If you have other patches in the kernel, report them. If it is
easy enough to undo these other patches, please try wether the problem
happens without them.
 g. Be sure to include _complete_ command lines of the floppy commands
which led to the problem, as well as a history of the disk changes.
 h. Is the problem repeatable?
 i. If you notice that the problem is very time dependant, try to find
out if there is any correlation between the occurance of the problem,
and the state of the drive LED.
 j. If you can't supply all these items, go ahead anyways, I want just
to make sure you aren't forgetting anything.


5. I can't fdformat the new formats.

 Many of those new nifty formats use bigger sectors than
usual. Fdformat can't format these. Use the included utility
superformat instead.  Fdformat should still be able to format the
standard (existing before 1.1.41) formats.


6. I can't fdformat the usual formats either.

 Upgrade to at least 1.1.54. If this still doesn't work, try out the
newest ALPHA or BETA patch. (WARNING: The ALPHA patches _are_ ALPHA,
and may introduce new problems! Some problems may only show up on
certain hardware, or when trying weirdo things. So don't be misled by
people claiming these patches are stable and should really be BETA)


7. I get kernel segmentation faults when unmounting floppy disks.

 Upgrade to at least 1.1.53


8. Mtools says "12 bit FAT on a: sure?" when trying to access an ED disk.
(or a similar message when formatting a disk)

 Some ED disks use 16 bit FATS. The FAT type (12 or 16 bit) is described
in the configuration file (/etc/mtools or ~/.mtoolsrc). It is the first
number. Example:
A /dev/fd0 12 0 0 0
           ^^ 12 bit FAT
 12 means 	12 bit FAT
 16 means 	16 bit FAT
  0 means	"use whatever is appropriate"
-12 means	12 bit FAT, even if it looks fishy
-16 means	16 bit FAT, even if it looks fishy

 CAUTION: If you have an /etc/mtools file AND an ~/.mtoolsrc file, the
~/.mtoolsrc file overrides /etc/mtools. The home directory used for
~/.mtoolsrc is $HOME, if that is undefined, it is derived from
$LOGNAME, and if that's undefined too, it is derived from getlogin,
and finally from getuid.
 There are also compiled-in defaults, which are used if neither
/etc/mtools, nor ~/.mtoolsrc are found.


9. Mtools says "fat_read: Wrong FAT encoding %d %d?\n" when accessing a
disk formatted with the old fdpatches.

 mtools does some sanity checkings on the size of the
FAT. Unfortunately, these are too strict for certain disks formatted
with the old fdpatches, and for hard disk partitions formatted by DOS
6, and probably for other conditions as well.  Define the environment
variable MTOOLS_FAT_COMPATIBILITY to override this check.
(to do this, type "setenv MTOOLS_FAT_COMPATIBILITY 1" in csh or tcsh,
and "export MTOOLS_FAT_COMPATIBILITY=1" in sh/bash/zsh/...)


10. How should I describe the new 2m formats in /etc/mtools?

A /dev/fd0 12 0 0 0 
A /dev/fd0  0 0 0 0 

 Use the first line if you have a high density or a double density
drive, and the second one for a high density drive. The first number
describes the size of a fat entry (12 or 16 bit. 0 means autosense
it). The three last numbers describe the geometry of the drive. If
the are zero, the geometry will be autosensed, i.e. the entry will
be ok for every format.


11. Which minor device number should I use for 2m formats?

 2m formats don't have a minor number associated with them, they can
only be accessed using the "generic format" devices (i.e. /dev/fd0,
/dev/fd1).


12. The linker doesn't know the option -qmagic to compile the utilities.

 You need at least gcc 2.5.8 to use qmagic. If you have an older
compiler and older bin utils, you can just remove the -qmagic
option. This results in bigger binaries, which are nevertheless still
fully functional.


14. I have an IBM thinkpad :-(

 Don't panic. Add the line 'floppy=thinkpad' to your lilo boot
parameters.  This can be entered at the lilo prompt after the name of
the kernel image. It can also be specified in the lilo.conf file, by
adding the following line:
 append = "floppy=thinkpad"

 With some IBM thinkpads, its also possible to make their floppy by
toggling the "FLOPPY" option in CMOS from "auto" to "on". However,
apparently this CMOS option is not available on all models.


15. How to do to compile the floppy driver as a module.

 Get the fdutils package (if you don't have it already) and follow the
instructions in fdutils/module.