It is a collection of utilities to access DOS disks. These utilities behave mostly like their DOS counterparts, i.e. mdir is like dir, mcopy is like copy, etc. Specifics are in the manpages.
To mount a disk on /mnt, use the following command lines:
mount -t msdos /dev/fd0 /mnt
The directory /mnt must already exist:
mkdir /mnt
floppycontrol -pP --printfdcstate
into your bug report.
floppycontrol --debug
and
floppycontrol --reporting 0
. Note that floppycontrol
--debug
generates a huge output. Thus, try
first with --reporting
. Please note also that both
commands are drive specific, and that the default drive is
/dev/fd0. So, if you experience a problem on /dev/fd1, use
floppycontrol --debug -d/dev/fd1
.
Then include the kernel messages as well as the application messages
with your bug report. If you're using X windows, 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). Use dmesg also before
executing the command, in order to find out which messages were
generated by the command, and which ones were generated by earlyer
commands. Alternatively, you may get the user-printk
module which allows you to insert "comments" into the stream of
console messages.
floppycontrol -P
do?
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.
(to do this, type
setenv MTOOLS_FAT_COMPATIBILITY 1
in csh or tcsh, and
export MTOOLS_FAT_COMPATIBILITY=1
in sh/bash/zsh/...)Just for the record, here are definitions to mimic the standard behavior:
drive a: file="/dev/fd0"
drive b: file="/dev/fd1"
drive a: file="/dev/fd0" use_xdf=1
drive b: file="/dev/fd1" use_xdf=1
However, the use_xdf flag slightly slows down initial access to non
Xdf disks. append = "floppy=thinkpad"
With some IBM thinkpads, it's also possible to make their floppy
drive work by toggling the "FLOPPY" option in CMOS from "auto" to
"on". However, apparently this CMOS option is not available on all
models.On some models, both options may be required, on others, none are required.
More info about IBM Tinkpads on Linux can be found here.
minor_device = format_nr * 4 + 128 * fdc_nr + unit_nr(fdc_nr identifies the floppy disk controller, and unit_nr identifies which drive on the floppy disk controller to be used) format_nr identifies the (see the README file in fdutils for more details). If format_nr is 0, the device is an autodetection device. Use the MAKEFLOPPIES script included in the fdutils package to automatically create the needed devices.
Drive_nr identifies the drive. It ranges from 0 to 3 for drives connected to the first controller, and from 4 to 7 for drives connected to the second controller.
Type is the type of the drive or media. The exact meaning of this (drive or media) is still being discussed. Traditionally, this letter described the type of the drive (density, 5 1/4 or 3 1/2). Lower case letters described 5 1/4 drives, and upper case letters describe 3 1/2 drives. h or H meant high density drives, d or D meant double density drives.
Initially this letter described the type of the drive and not the type of the media in the drive. For instance, a meant for accessing 720k double density disks in a high density drive was called h720k and not d720k. The reason for this is that for 5 1/4 drives the parameters for accessing a disk do not only depend on the of the disk, but also on the drive type. The of the disk is already implied by the capacity, and so the type letter is used to describe the type of the drive.
However, this dependency on the drive type only exists for 5 1/4 drives. For 3 1/2 drives, this is not needed, and as 3 1/2 drives are more frequent, people started forgetting about this, and understood that the letter described the media . When support for extra density drives was added to the kernel, people still used the name H1440 for accessing high density disks using their extra density drive. By the way, several distribution use this scheme.
In order to calm down the confusion, we propose to make the type letter again describe the type of the drive. However, all 3 1/2 drives are now described by a unique type letter: "u". This means universal (one letter fits all 3 1/2 formats). Moreover the u resembles the Greek letter mu, as in microfloppy.
So the recommended name for a device node allowing to read 1440K disks in a 3 1/2 drive (no matter its density) is called u1440. Note that this is now lowercase.
However, this new convention is still subject to discussion.
Capacity is the capacity of the media in K bytes. Fortunately, this leads to no ambiguity.
Example:
A device node allowing to use 720K 5 1/4 floppies in a high density drive connected as first unit to the second controller is called /dev/fd4h720 Right now, MAKEFLOPPIES supports all three conventions (media, drive, and "u"), you may chose amongst them using command line switches.
14. My drive doesn't detect disk changes / When I type mdir a:, I get the directory listing of the previous disk. This means that there is a problem with the disk change line. This problem may have several reasons:
a. The disk change line is near the edge of the cable, and is the first line to suffer if the cable is not inserted straight. Press gently on the connectors of your floppy disk cable, in order to ensure that all wires make contact.
b. Because the disk change line is near the edge of the cable, it is also the first line to suffer if the cable is damaged. If necessary, buy a new cable, they cost less than five dollars.
c. On some drives, the disk change line may be chosen by jumper. Make sure that your floppy controller board and your drive agree which line is the disk change line. The usual location is line 34.
d. Some older drives don't support the disk change line at all. In this case, you have to configure the floppy driver to work around the problem. Use 'floppycontrol --broken_dcl' to do this. Now the floppy driver assumes that the disk is changed whenever the device node is closed and then re-opened. This is less efficient, as it results in many useless cache flushes, so use it only if you really need it. This command has to be issued after each reboot, so I suggest you put it into your /etc/rc files.
floppy=nodma
to your Lilo
command line.
More info about the Omnibook and linux can be found here.
#!/bin/sh
. etc/rc
/bin/sh
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 + unitSee the README file in fdutils for more details.
-DXL_SECS=44
This enables Lilo to boot from disks with up to 44 sectors (i.e. more
than you'll ever see :-) ) It allows to boot from ED disks and from
disks with more sectors than usual (up to 21 on a HD disk, 42 on an ED
disk). However, 2m and Xdf disks cannot be booted using this method.
floppy=nodma
boot flag. If you use the floppy driver as a
module, set the environment variable 'floppy' to 'dma'.
Switch off the FIFO by adding
floppy=nofifo
to your Lilo command line.