Vector Linux 5.8



External Storage Devices with VectorLinux 5.8


1. Introduction
2. Floppy Drive
5. USB Storage
6. How They Work
7. Credits


1. Introduction

In the recent past many new Linux users, especially those that come from Windows, were immediately struck by the somewhat inconvenient floppy or cdrom drive access. Well, that used to be the case in older versions of Linux, but not anymore. This manual will quickly point out the features of how to access your external storage devices. If none of this makes sense to you please read Section 6 below to understand the underlying mechanisms, and hopefully that might give you the background understanding you require.


2. Floppy Drives

We assume that you are working with either the xfce or KDE desktop environment. The most important thing is that you should see desktop icons, and one of them is "Floppy". To work with a floppy, simply:

  1. Insert your floppy diskette in the floppy drive
  2. Click the "floppy" icon (in xfce you must double click). A file manager will be launched for you. It will be Thunar with xfce or konqueror on KDE.
  3. The floppy is usually mounted on /mnt/floppy. You may now use the file manager to read/write the data from or to the floppy.
  4. After you are finished, you MUST close the file manager.
  5. Remove the floppy disk from the floppy drive.

That´s all. If you want to know the details of what is happening: clicking the floppy icon mounts the floppy and launches the file manager. Then when you close the file manager, the floppy will be unmounted. You must remember one thing though, do not remove the floppy diskette before you close the file manager, or while the floppy-drive light is still flashing. Doing so could damage your floppy data.


3. CDROM Drives

You access these in the same manner as the floppy drive. Simply:

  1. Insert your CD into the cdrom drive.
  2. Click the "cdrom" icon. A file manager will be launched for you with the CDROM contents on the /mnt/cdrom folder.
  3. Use the file manager to read the data from the cdrom.
  4. After you're finished, you MUST close the file manager.

Note that music CD's are not a proper filesystem and therefore cannot be mounted via this method. You can check a music CD's contents with a ripping program such as RipperX or a CD Player such as xmms.



Ok, this is a bit different. We cannot use a file manager to write data onto a CDR platter. You must launch a cd-burning program from the user menu. Those programs are: k3b (on VL SOHO) or graveman (on VL Standard).


5. USB Storage and vl-hot

Technically, USB storage devices (including Pen Drives, flash memory readers and mp3 players, etc.) are a different story than floppy or CDROM drives because they are handled by the hotplug system. Fortunately, VL is able to make it work similarly on either xfce or KDE.

As of VL SOHO v5.1 and later versions usb-mount has been superceded by vl-hot. vl-hot is an automated USB mounting system based on the udev kernel routines. Theoretically, if you have vl-hot running correctly on VL SOHO 5.1.1 or later versions if you plug in a USB or PCMCIA device it should autmoatically be mounted for you and you should then be able to browse the files on that device with any file manager. vl-hot is a purely udev based automount system for any kind of pluggable storage device that conforms to the block device specification and so uses scsi emulation. Hardware known to work with vl-hot are USB pendrives, hard disks, digital cameras, memory card readers, PCCARD (or PCMCIA) memory cards and drives. Firewire devices should work, but there are no user reports on this kind of hardware yet. The working specifications of vl-hot are:

  • the mount base directory will be "/mnt/vl-hot/".
  • each drive will have a "sd?" directory (where "?" represents a letter of the alphabet).
  • each mounted partition will have a "vol#" directory (where "#" represents a number) within the drive directory. An exception to this rule is in the case of non-MBR devices, where there is no partition table.
  • desktop icons are dynamically created/deleted. With KDE these have unmount options in the context (right-click) menu.
  • the unmount operation has completed succesfully once the desktop icon disappears.
  • for window managers other than xfce or KDE you should: 1) close down the file manager, 2) remove the device and then, 3) use the command "umount /mnt/vl-hot/sd?" as root, to correctly unmount the device.

With xfce or KDE when you plug-in the usb-storage device, a "pendrive" icon should pop up on the desktop. Just click it to access the pendrive contents. After you unplug the pendrive, the icon will disappear if using KDE. If you use xfce double-click the unmount icon to unmount the device and then remove the device. Writing is not cached, so there is little chance of losing data when unplugging incorrectly.


6. How They Work

This is the explanation if you want to know the underlying mechanisms of filesystem mounting. Normally, all of these are configured by VL autosetup during installation and only in unusual circumstances will you need to concern yourself with manually mounting a device. However, problems may occur and this information may assist you:

6.1 Floppy and CDROM drives

All storage devices (like everything else in Unix/Linux) are treated as a file. To this end they are usually given a filename in the /dev directory (e.g. /dev/cdrom). Before accessing a storage device it must be "mounted". Floppy and CDROM drives both work on the same principle.

  1. Firstly, during the install process VectorLinux autodetection makes a symbolic link to the actual device. Usually, /dev/floppy links to /dev/fd0 and /dev/cdrom links to one of the IDE controllers (/dev/hdb, /dev/hdc, etc). Think of the symlink as an alias that hides the actual device. You can check it out by using:

    tux@engrob4:$ ls -l /dev/cdrom
    lrwxrwxrwx  1 root root 8 2004-10-06 00:33 /dev/cdrom -> /dev/hdc

    You may set that up manually, or use vcdset.

  2. Then, the symlink is registered on /etc/fstab like this

    # The 'noauto' option indicates that the file system should not be mounted
    # with 'mount -a' 'user' indicates that normal users are allowed to mount it
    /dev/cdrom      /mnt/cdrom      iso9660 defaults,noauto,ro,user 0 0
    /dev/fd0        /mnt/floppy     auto    defaults,noauto,user    0 0
  3. When the user clicks the floppy/cdrom icon, it launches a script that actually does the mounting for you. This is the simplified version.

    mount /mnt/cdrom
    file_manager /mnt/cdrom/
    umount /mnt/cdrom
  4. Look at the script, after launching the file manager, it waits for it to exit then unmounts the /mnt/cdrom. That's why you have to close the file manager.



For CDWRITER, k3b and graveman will access the device directly. So we don't have to bother about mounting it.



USB storage is handled by hotplug or by vl-hot (for versions VL SOHO5.1 and later). Hotplug on Linux was designed to be as smart as Plug&Play on Windows. However, both of them have also proved to be troublemakers. So yeah, if everything goes right, your USB-storage works this way:

  1. When you plug in the pendrive, the hotplug system will detect it.
  2. The hotplug system launches the registered script, in this case "usb-mount". You may check the registration on /etc/hotplug/usb.
  3. To run properly, usb-mount needs root privileges. So it should have an entry on /etc/sudoers.
  4. The usb-mount script will automatically mount the device into /mnt/usb-storage/device-0 (or -1, -2, etc as appropriate)
  5. If KDE is running, usb-mount creates a desktop icon.
  6. When you unplug the device, the hotplug system calls usb-umount.
  7. The usb-umount script deletes the desktop icon and unmounts the /mnt/usb-storage/device-0.

Actually it is not quite that simple, but you get the picture, right ? If you have VL SOHO 5.1 or later your system will use vl-hot instead of usb-mount. How vl-hot works can be read in more detail at "Joe1962"'s website.


7. Credits

Copyright 2007 Vector Linux
Released under [GNU Free Document License [ ]
Contributed By: Kocil, Joe1962, Lagagnon, LLL