 FDPATCHES FREQUENTLY ASKED QUESTIONS (Last updated on 1 August 1994)
 ====================================

 This FAQ is regularily updated in the directory
ftp.imag.fr:pub/ZLIBC/fdpatches/FAQ. You find also alpha releases of
fdpatches in the directory ftp.imag.fr:pub/ZLIBC/fdpatches/FAQ . They
are named fdp<day><month>.taz .


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

 YES. To use both controllers, uncomment the "#define HAVE_2_CONTROLLERS" 
line at the top of the floppy.c file. It is assumed that your second
controller lives at 0x370. If it uses another I/O base-address, change
this address in the floppy_init function. 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

 This is actually untested (or only partly tested). If you get the
driver working with two fdcs, and drives attached to both of these
fdc's, please drop me a note.


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


3. How should I report bugs?

 a. In case of a kernel panic, or OOPS, please note the EIP, and the
values on the stack (some are the calling functions). Then look up
those values in your zSystem.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])


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


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


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


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


8. 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).

9. I use a more recent kernel than pl38, and while applying the
fdpatches, some hunks fail.

 If this happens in floppy.c, try copying the floppy.c file included
in fdpatches over the one in /linux/drivers/block/fdpatches.
 If this happens in fd.h or fdreg.h, copy the fd.h or fdreg.h of your
old fdpatched kernel over the corresponding files of the new kernel.
 If this happens in some other files, just ignore it. The changes to
other files are not that crucial, and the features lost are only
minor.

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


11. Dosemu doesn't work with fdpatches

 Does it work without them :-) ? It has been flaky recently, even with
the stock kernel. It segfaults when run on a virtual console (but
still works in an xterm). It has trouble with detecting floppy changes
too. If you see a different failure, which doens't exist with the stock kernel,
please report.


12. With stock linux I can access my ED drive, but whith fdpatches I
can't any more.

 Type floppycontrol --printfdcstate. If the has_fifo field is 0, but
the version field is 52 or bigger, you probably have one of those
82077 FDC with the FIFO bug (Stock Linux 1.1.24 didn't work either,
right?). In this case, uncomment the #define FDC_FIFO_BUG line at the
top of floppy.c.
 If that happens, I'd like to hear from you, as right now I don't even know
wether these FDC's do indeed exist... Thanks.


14. I cannot access my ED drive using /dev/fd0E2880. It behaves exactly
as if the disk wasn't formatted.

 Certain CompaQ computers seem to have their own idea about which
minor device numbers should be used. Remove /dev/fd0E2880, and
recreate is with minor device number 36:
	mknod /dev/fd0H2880 b 2 36
 Ask Bill Broadhurst (bbroad@netcom.com) for details.



