System Architecture: All/General
RedHat Release: All/General
FAQ Category: Hardware Issues
Modification Date: Dec 3, 1998
How do I use a floppy with Linux
There are **MANY** ways to use the floppy but I prefer to use a DOS formatted
disk (I can buy the preformatted). I can exchange them with friends or
coworkers who use Windows without any special software, etc.
Note, Windows/VFAT sometimes messes up the filename and the VFAT file system
does not have permissions nor the full compliment of features available with
most UNIX file systems like ext2.
Note also that if the file is a text file, you may want to copy using
mcopy -t filename a:
to add DOS's CRLF (for more info, RTFM mcopy and unix2dos).
Some common methods:
1) Using a DOS floppy, save the file to your local directory
When you are finished editing, copy it to the DOS format floppy
using mtools (mcopy file.txt a:) RTFM mcopy [I usually use this method]
[Note, you can create a tarball and save it, preserving permissions
dates, filenames, etc.: tar cvzf arch.tgz files... ; mcopy arch.tgz a:]
2) Using a DOS floppy, mount it either as root or a user:
as root:
mkdir /floppy [or wherever you want the floppy to appear]
edit /etc/fstab or use linuxconf
add: /dev/fd0 /floppy vfat user,noauto,rw 0 0
- device is /dev/fd0
- mount point is /floppy
- type is vfat (DOS with long file names)
- user,noauto,rw means users can mount, don't mount during boot
and disk is read/write
- 0 0 -- RTFM mount
as user:
mount /floppy
edit and save to /floppy
umount /floppy
[you could create a directory /a: or similar, but I use /floppy
or /floppy0 plus /floppy1]
3) Format your floppies as ext2 or minix and mount/unmount them. This is best
for UNIX only floppies as it has full file permissions, etc.
use mke2fs to format the floppy
add the mount info as in item 2, but say "ext2" instead of "vfat"
mount and unmount as in item 2.
As a user, you can use the nice GUI "usermount" to mount the floppy. It has
buttons to mount/unmount ALL devices that have "user" in /etc/fstab.
RTFM mtools, mke2fs, Hardware-HOWTO, fdformat, usermount, fstab