Mounting A Floppy Under PCLinuxOS
by Darrel Johnston (djohnston)
I cringe when I read an article about someone who is running Linux on an “old” computer from 2005. Old? That’s not old. I’m still using a Dell Pentium III from 1999. I’ll bet most of the personal computers made in 2005 did not come with floppy drives. My Dell did. And, unlike USB devices, the floppy drive is not polled by the hardware or the software to see if a volume has been inserted or removed. The user must manually mount and unmount each floppy disk inserted into the drive.
Fortunately, it is fairly easy to use GUI tools to enable the floppy drive for easy use. We can also create GUI tools to mount and unmount floppy disks, and to read and copy the contents of floppy disks. We must begin the setup in PCC, the PCLinuxOS Control Center. Click Local disks in the left pane of the window.
If the Floppy drive icon option is not showing in the right pane, the system is not reading the hardware device. Check the computer’s BIOS settings and all drive cables. Click the Floppy drive icon in the right pane.
The default options presented should be the correct ones. The image above is difficult to read. The options are:
Mount point: /media/floppy
Device: fd0
Name: H1440
Type: auto
Options: umask=0,users,iocharset=utf8,noauto,flush,exec
Click the OK button.
Click the Yes button to save the /etc/fstab modifications. Close the PCC window. Your /etc/fstab file should contain a new line:
/dev/fd0 /media/floppy auto umask=0,users,iocharset=utf8,noauto,flush,exec 0 0
It would be handy to have a standard place to access the contents of a floppy disk. We can create a shortcut to the floppy in our favorite file browser. I am using PCManFM in the illustration. The instructions presented will also work in Thunar, Nautilus and Dolphin. Open the file browser and navigate to the /media directory.
Drag and drop the floppy folder icon from the right pane to the bottom of the left pane.
We now have a shortcut, or link, in the left pane of the file manager window we can click on to access the contents of a mounted floppy disk. At this point, we can manually mount and unmount a floppy disk that is inserted into the drive. We can do both from a terminal as a regular user. Insert a floppy disk into the drive and open a terminal. To mount the floppy for use, enter the command:
mount /dev/fd0
To unmount a floppy, enter the command:
umount /media/floppy
Once mounted, the contents of the floppy disk can be accessed in the file manager by clicking the floppy disk icon in the left pane.
But, we still have to manually mount and unmount the floppies from a terminal using the command line. That, too, is easily overcome. We will create two desktop files, one for mounting a floppy and one for unmounting. Open a text editor. Enter the following text:
[Desktop Entry]
Type=Application
Icon=/usr/share/icons/gnome/48x48/devices/media-floppy.png
Name=MountFloppy
Comment=Mount a floppy disk
Categories=FileManager;X-MandrivaLinux-System-FileTools;
Exec=mount /dev/fd0
StartupNotify=true
Terminal=false
MimeType=x-directory/normal;inode/directory;
X-Desktop-File-Install-Version=0.18
Save the file as floppy_mount.desktop. In the same text editor, enter the following text as a new file:
[Desktop Entry]
Type=Application
Icon=/usr/share/icons/gnome/48x48/devices/media-flash.png
Name=UnmountFloppy
Comment=Unmount a floppy disk
Categories=FileManager;X-MandrivaLinux-System-FileTools;
Exec=umount /media/floppy
StartupNotify=true
Terminal=false
MimeType=x-directory/normal;inode/directory;
X-Desktop-File-Install-Version=0.18
Save the file as floppy_unmount.desktop. We have now created two desktop files that can be used to mount and unmount floppy disks. The files can be copied to your desktop or to any folder owned by you. For convenience, we also want the entries to show up in the PCLinuxOS menu. The system wide menu entries can be found in /usr/share/applications. However, the two desktop files are not provided by any installed package, and we don’t want to go to the extra effort of creating them again, should we reinstall the operating system at some point. For that reason, copy both floppy_mount.desktop and floppy_unmount.desktop files to ~/.local/share/applications. That is, copy the desktop files the the .local/share/applications folder in your home directory. The .local folder is hidden, so set your file browser to show hidden files before copying. Once copied, you will see two new entries:
MountFloppy and UnmountFloppy , in the File Tools section of the PCLinuxOS menu. I chose two standard icons that should be installed by default on any PCLinuxOS version. Change the Icon= line in the desktop files to choose any other icon you wish.