Mounting and Unmounting Floppy Disks

To mount a disk means to make that disk available for reading and writing. In DOS, disks are mounted automatically, without user intervention. In Linux, disks must be mounted. This is particularly true with removable media. Likewise, all media (even CD-ROM disks) must be unmounted when you are finished. If you remove a floppy disk from the drive without unmounting it, you run the risk of data corruption. This is because Linux uses disk caching (yes, even on floppies) that may hold data in memory for quite some time before flushing it out to the disk.

One other note about mounting and file systems. In DOS, you have a separate file system on each logical drive in your computer. Think of it this way, if you have a floppy disk in the drive, two hard disks (C: and D:), and a CD-ROM on drive E:, you have four distinct root directories; the root directory on drive A:, C:, D:, and E:. In Linux, there is only one root directory, and only one file system. All storage devices are mounted "into" that file system. Typically, we mount the floppy drive into the /mnt directory. That way, if you need to access information on the floppy, you would look for that information in the /mnt directory. This is the standard being used in the examples below.

Mounting a floppy disk:

1.44Mb disk: mount -t msdos /dev/fd0 /mnt [Enter]

1.68Mb disk: mount -t msdos /dev/fd0u1680 /mnt [Enter]

These commands do the following: first, the call the mount command. They pass the drive type parameter to the mount command (-t msdos) indicating that these disks are formatted in a standard MS-DOS format. Next, mount is instructed which device to mount. All hardware devices are represented in Linux by a file in the /dev directory. In the first example, the default fd0 device is used. This device assumes that the first floppy disk is a 1.44 Mb disk. The second example (the one you must use when you mount the Dachstein 'floppy only' distribution disk) says that the first floppy disks will be used, but to force reading and writing in the 1680K or 1.68 Mb format. The last parameter tells mount where to put the floppy disk in the file system (in this case, in the /mnt directory). Once the disk is mounted, you can cd to it, copy files, edit files, etc. Just dont forget to unmount it when you are done.

Unmounting a floppy disk:

unmount /mnt [Enter]

This tells Linux to unmount (and flush any data that may not yet have been written) whatever device was mounted into the /mnt directory. One final word regarding mounting and unmounting disks. You cannot be in the directory into which you are mounting a file system. For example, if you are mounting a floppy disk into the /mnt directory, you cannot be in the /mnt directory. If you aren't sure whether or not you are in the /mnt directory, perform a cd / [Enter] to move to the root directory just to be safe.