fstab
The file fstab (abbreviation for file system table ) is a configuration file in the directory etc ( / etc / fstab or / etc / vfstab ) in some Unix-like operating systems , which contains a list of all file systems to be mounted . The options that can be used differ depending on the platform, file system, and version of the operating system . Detailed information on the respective system can be obtained by entering the command
man 5 fstab
Example of /etc/fstab
an existing FreeBSD system:
# Device Mountpoint FStype Options Dump Pass#
/dev/ad4s2b none swap sw 0 0
/dev/ad4s2a / ufs rw 1 1
/dev/ad4s2d /var ufs rw 2 2
/dev/ad4s2e /usr ufs rw 2 2
/dev/ad4s2f /home ufs rw 2 2
/dev/ad6s1d /pile ufs rw 2 2
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
/dev/da0s1a /mnt ufs rw,async,noauto 0 0
daywalker:/bigpile /bigpile nfs rw 0 0
The different fields:
- Device
- Path name of the device file, computer name with NFS, or UUID = < uuid >, in order to mount the device with UUID and LABEL = < label > ( Linux ).
- Mount point
- Indication of where to mount.
- FStype
- File system type.
- Options
- rw denotes "read / write", ro "read-only", noauto denotes file systems that should not be mounted immediately, etc. The defaults option is widespread in Linux , which corresponds to the options rw, suid, dev, exec, auto, nouser, async .
- Dump
- If the backup program dump is to back up this file system, the value here is not equal to 0.
- Pass (passage no.)
- The order in which filesystems are checked with fsck . 0 stands for do not check ; every larger integer value then indicates the priority of the file system for checking. The rule is that lower numbers represent higher priority. The root file system ("root") here has a 1, as a rule all other file systems on hard disks have a 2, everything else (pseudo file systems, network file systems, not automatically mounted file systems) has a 0.
The order of the entries (lines) is important when booting and when shutting down. Comments and spaces between the fields are generally irrelevant. Some operating systems make automatic entries within the file and reformat them in the process. This is particularly the case with the large RPM-based Linux distributions . The mechanisms with which it is determined whether it is an automatic entry (which can and must be removed again) or a manual entry differ strikingly. In particular, with some distributions you should therefore warn against making manual changes to the fstab / vfstab .
Loss of this file or its corruption will in most cases result in an unbootable system. However, this can usually be easily remedied with a live CD .
The name of the file depends on the operating system, / etc / vfstab is common in the Solaris / BSD environment, on AIX the file is referred to as / etc / filesystems .