Vector Linux 5.9
Accessing disks and partitions
1. Mounting devices 2. Mounting devices with VASM 3. The fstab file 4. mount and umount commands 5. The vl-hot automount system 6. The HAL automount system 7. Credits
all of the drives, partitions and devices in your computer are
treated as "files". Various hard drive partitions, CD-ROMs, and
floppies are all placed in the same filesystem tree. In order to be
able to access the contents of those devices you need to "mount"
them, and for that you have to use the
The easiest way to mount a device such as a second hard disk or partition is by adding a permanent entry in the /etc/fstab file, along with the mounting options and permissions. In this manner the device will be automatically monted for you at every boot. Since VectorLinux 5, VASM provides an easy method to administer such entries for your mount points.
Note: Some devices can be automatically mounted when you boot up your computer. These need to be listed in the /etc/fstab file. Anything that you want to be mounted automatically should have an entry in that file. For other devices, you'll have to issue a command every time you want to use the device.
VASM provides an easy method to configure additional local disks or partitions to be mounted in your system. Just launch it, select "FILESYSTEM", then "MOUNT", and there you can ADD or REMOVE mount points.
- Adding mount points
- Deleting mount points
Since VL5, using VASM is all you need to know to mount your partitions or hardisks. However, for those wanting to know more about mounting devices, here is some additional information.
Let's look at an example of the /etc/fstab file:
The first column is the device name. In this case, the devices are four partitions in an IDE hard drive, two special filesystems that don't need a device, a floppy, and a CD-ROM drive. The second column is where in the directory tree the device will be mounted. This needs to be a directory name, except in the case of a swap partition. The third column is the filesystem type of the device. For Windows 9x filesystems, this will be vfat, for normal Linux filesystems, this will be ext2 (second extended filesystem). CD-ROM drives are iso9660, and other Windows-based devices will either be msdos or vfat. NTFS filesystems read support is available but write support is not fully reliable yet.
The umask section deals with access permissions to FAT devices. This is a very complex topic that goes beyond the scope of this guide, but keep in mind that the 000 option poses almost no restrictions about how regular users can access the device.
The last column is a listing of options that apply to the mounted filesystem. “defaults” is fine for just about everything. However, read-only devices should be given the ro flag. There are a lot of options that can be used. Check the fstab(5) man page for more information. The last two columns are used by fsck and other commands that need to manipulate the devices. Check the man page for that information, as well.
When you install VectorLinux, the setup program will build much of the fstab file. The only time you will need to edit it is if you add disks or want devices to be automatically mounted at boot time.
Attaching another device to your filesystem is easy. All you have to do is use the mount command, along with a few options. Using mount can also be made much more simple if the device has an entry in the /etc/fstab file. For example, let's say that I wanted to mount my CD-ROM drive and that my fstab file looked like the example from the previous section. I would call mount like so:
Since there is an entry in fstab for that mount point, mount knows what options to use. If there wasn't an entry for that device, I would have to use several options for mount:
That command line includes the same information as the example fstab did, but we'll go over all the parts anyways. The -t iso9660 is the filesystem type of the device to mount. In this case, it would be the iso9660 filesystem which is what CD-ROM drives most commonly use. The -o ro tells mount to mount the device read-only. The /dev/cdrom is the name of the device to mount, and /mnt/cdrom is the location on the filesystem to mount the drive.
Before you can remove a floppy, CD-ROM, or
other removable device that is currently mounted, you'll have to
unmount it. That is done using the
In the default configuration of VectorLinux, only the root user is able to mount and umount devices. You can allow regular users the ability to mount devices by adding "users" (without quotes) in your fstab file:
VectorLinux v5.9 has provided the both the "vl-hot" and HAL automounting systems. These systems are designed to auto-mount for the user such removeable devices as pen drives, memory card readers, digital cameras, etc. Theoretically, all you need do is plug the device into your USB port on the computer and a device icon will appear on your desktop or the appropriate application will be auto-launched. Please read the external storage document for more information on these systems.