The structure of /etc/fstab

fstab consists of a number of lines (one for each filesystem) seperated into six fields. Each field is seperated from the next by whitespace (spaces/tabs).

So from the example given previously:

/dev/hdc /mnt/cdrom iso9660 noauto,ro,user 0 0

The first field (/dev/hdc) is the physical device/remote filesystem which is to be described.

The second field (/mnt/cdrom) specifies the mount point where the filesystem will be mounted.

The third field (iso9660) is the type of filesystem on the device from the first field.

The fourth field (noauto,ro,user) is a (default) list of options which mount should use when mounting the filesystem.

The fifth field (0) is used by dump (a backup utility) to decide if a filesystem should be backed up. If zero then dump will ignore that filesystem. The sixth field (0) is used by fsck (the filesystem check utility) to determine the order in which filesystems should be checked.
If zero then fsck won’t check the filesystem.
(as the example line above is a cdrom there is very little point in doing a fsck on it, so the value is zero).

From: http://www.humbug.org.au/talks/fstab/fstab_structure.html

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.