This is the old ROX web-site. Please use the new website instead.
This document explains how Linux handles storage media (CDs, floppies, zip disks, memory sticks, hard drives, etc).
Linux has a single global filesystem. Physical devices are mounted on this filesystem. For example:
/ is the root directory on a partition on your hard drive.
/etc is a subdirectory on the same partition.
/cdrom is the root directory on the CD-ROM.
/cdrom/data is a subdirectory on the CD.
The filesystem layout on most Linux systems follows the
Filesystem Hierarchy Standard to some degree. The layout is a bit of a mess, for historical reasons. However, it may help you if you're feeling lost.
Every storage device has a corresponding device file in /dev. Also, each partition on the device has its own device file. When you plug in a USB memory stick, you should see a new device appear in /dev (if you have a modern system).
The configuration file /etc/fstab contains a list of mount points and their corresponding devices in /dev. For example, this line says that partition 1 (the only one) on the Jumpshot flash card reader should be mounted on /flash. It is an MSDOS format partition, can be mounted by a user, and isn't mounted at boot time. Use man fstab to get more details about this.
/dev/Jumpshot-1 /flash msdos user,noauto 0 0
Note: many distributions provide a graphical program to help you add devices. Use that if available.
Ensure an entry appears in /dev when the device is plugged in.
If the device you are adding isn't formatted (eg, a new hard drive), you need to format it now:
Create a directory in the filesystem to mount it on (eg, mkdir /flash).
Add a line to /etc/fstab associating that device with the new mount-point.
The directory should now appear with a mount-point symbol over it in ROX-Filer (you may need to click Refresh on the toolbar).
Click on the mount point to mount it, giving you access to the files on the device.
Sometimes when booting, the system will stop and do a full check of a partition. This is to fix any errors which might have appeared. However, sometimes it does the checks too often (usually because you reboot a lot). There are three situations in which a check will be done:
The computer wasn't shutdown properly. On reboot, it is assumed that the computer crashed and the disk is checked for errors. You can avoid these checks by using a journalling filesystem (eg, ext3 rather than ext2). These ensure that the filesystem is in a sane state after a power failure. However, you may still loose data that was buffered but not yet written, so always shutdown correctly anyway.
The disk hasn't been checked for a long time (the check interval).
The disk has been mounted many times without a check.
For a desktop machine you may be rebooting very often, and therefore trigger a lot of checks (eg, every few weeks). You can disable the count check, and set a check interval, using tune2fs. Eg, this command sets partition hda1 to be checked every six months, but never based on number of mounts:
tune2fs -i 6m -c 0 /dev/hda1