Linux Headquarters

I've installed Linux… now what???

Using Your Floppy Drive

Introduction
In Linux, the floppy and CDROM drives must be “mounted” before the data on them can be read. This allows users to read not only floppy disks formatted for the ext2 Linux filesystem, but also Windows(DOS) disks. When a floppy disk is mounted, its file heirarchy is added to the existing file heirarchy usually under /mnt/floppy or /floppy. It can be mounted anywhere the user wants it to be. Thus, after mounted the floppy, the command ls /mnt/floppy displays the contents of the disk. After using the floppy drive, the disk must be “unmounted” before it is removed.
Mounting the Floppy Drive
The general syntax is mount -t type device dir
The currently supported device types are minix, xiafs, ext, ext2,msdos, umsdos, vfat, proc, autofs, devpts, nfs, iso9660, smbfs, ncpfs, adfs, affs, coda, hfs, hpfs,ntfs, qnx4, romfs, ufs, sysv, xenix, and coherent. See the man pages for details on all of them.

The ones you are most likely to use are as follows:

Device Type Filesystem
ext2 Linux
msdos, vfat Windows, DOS
iso9660 CDROM

Examples:

Command Filesystem
mount -t ext2 /dev/fd0 /mnt/floppy Linux
mount -t vfat /dev/fd0 /mnt/floppy Windows, DOS

Allowing Users to Mount the Floppy Drive
Most Linux distributions do not allow users to mount the floppy drive for security reasons. Root access is usually required to do so. However, someone with root access can allow users to mount the floppy using the /etc/fstab configuration file.

Example /etc/fstab without user privileges to mount the floppy:


/dev/hda1       /                ext2    defaults        1 1
/dev/hda5       swap             swap    defaults        0 0
/dev/fd0        /mnt/floppy      ext2    noauto          0 0
/dev/cdrom      /mnt/cdrom       iso9660 noauto,ro       0 0
none            /proc            proc    defaults        0 0
none            /dev/pts         devpts  gid=5,mode=620  0 0

Example /etc/fstab with user privileges to mount the floppy:


/dev/hda1       /                ext2    defaults        1 1
/dev/hda5       swap             swap    defaults        0 0
/dev/fd0        /mnt/floppy      ext2    noauto,users    0 0
/dev/cdrom      /mnt/cdrom       iso9660 noauto,ro       0 0
none            /proc            proc    defaults        0 0
none            /dev/pts         devpts  gid=5,mode=620  0 0

Notice the users tag in the fourth column of the line beginning with /dev/fd0. This allows anyone in the users group to mount the floppy using the ext2 filesystem with the command mount /mnt/floppy. If you want allow users to mount the floppy as other filesystem, you can add lines to the /etc/fstab and give it a different filetype and mount point (/mnt/floppy). Thus, if you added the line

/dev/fd0 /mnt/msfloppy vfat noauto,users 0 0

you can use the command mount /mnt/msfloppy to mount a MS-DOS floppy.
You can also add individual user names to the end of the fourth column to give them only certain users access.

What is Related

Comments are closed.

Subscribe to email feed

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Dedicated Linux Serv

Linux is the popular system nowadays, offering all the benefits ...

StarOffice 5.1

Introduction StarOffice 5.1 is a complete office suite with a word ...

AxY FTP

Introduction AxY FTP, formerly known as wxFTP, is a graphical FTP ...

Adobe Acrobat PDF Re

Introduction Many of you are probably familar with Adobe Acrobat Reader ...

Macromedia Shockwave

Introduction Macromedia has developed a version of its popular Shockwave plugin ...

Twitter updates

No public Twitter messages.