In Linux the only file system that is automatically mounted is the root file system which is automatically mounted on the root directory. Other file systems (eg. your floppy drive, cd rom drive, windows partitions, and any linux partitions other than root) can be mounted and unmounted as required. In the case of drives used with portable media (such as floppy drives, cd rom drives, and zip drives) it is necessary to unmount the drive before being able to remove the media from the drive (some recent linux versions may handle this for you automatically).
Before we can mount and unmount file systems we need to configure them so that linux knows about them and knows whether or not to mount them when the system first starts up. This configuration information is held in the fstab file which is normally found at /etc/fstab. This file contains a one line entry for each file system that the system knows about. Each entry within the file contains the following fields:
If you log in as root (or use the su command) you will have access to edit this file to allow you to add any additional file systems that your network may have as well as changing any of the options relating to the entries that are already in the file. You can use any of the many available text editors that linux has in order to make these changes.
This takes care of defining all of your file systems.
Next we need to ensure that all of the actual mountpoints are defined. You need to log in as root or use the su command to get access to do this as well as to be able to mount and unmount file systems.
To define a mount point, go to a command prompt and cd /mnt. This takes us to the /mnt directory which is the most appropriate place to define the mount points. To define a mount point type mkdir /floppy (where floppy is whatever you want the mount point to be called).
For those entries in the fstab where noauto wasn't specified, this is all that you need to do. The next time that you reboot the computer, those file systems will be mounted automatically.
Where noauto was specified, the file system will need to be mounted manually by going to a command prompt and entering a mount command eg. mount /dev/fd0 /mnt/floppy. Going into the mounted directory will now display all of the files and sub-directories that are available within the mounted file system.
You can also unmount any file system except the root file system by entering a umount command eg. umount /dev/fd0 or umount /mnt/floppy.
If you have a dual or multi boot system then you might consider automatically loading partitions belonging to the other operating systems as read only (assuming that you will never want to write anything to those partitions) or specify noauto and only mount them when you need them (if you need update access). This will protect those partitions from being impacted unintentionally from any actions that you perform while using Linux.
This article written by Stephen Chapman, Felgall Pty Ltd.