11.11. Creating the /etc/fstab File

The /etc/fstab file is used by some programs to determine where file systems are to be mounted by default, in which order, and which must be checked (for integrity errors) prior to mounting. Create a new file systems table like this:

cat > /etc/fstab << "EOF"
# Begin /etc/fstab

# file system  mount-point     type        options          dump  fsck
#                                                                 order

/dev/[xxx]     /               [fff]       defaults         1     1
/dev/[yyy]     swap            swap        pri=1            0     0
proc           /proc           proc        defaults         0     0
sysfs          /sys            sysfs       defaults         0     0
devpts         /dev/pts        devpts      gid=5,mode=620  0     0
shm            /dev/shm        tmpfs       defaults         0     0
tmpfs          /run            tmpfs       defaults         0     0
devtmpfs       /dev            devtmpfs    mode=0755,nosuid 0     0
none           /proc/openprom  openpromfs  defaults         0     0
# End /etc/fstab

Replace [xxx], [yyy], and [fff] with the values appropriate for the system, for example, sda2, sda5, and ext2. For details on the six fields in this file, see man 5 fstab.