About every 6 months, I have a need to understand fstab (/etc/fstab). It's one of those times, so here's what I am learning:
* fstab is read by programs; it is never written by programs
* Each filesystem on the localhost is described in a line in fstab
* Columns are separated by TABs or spaces
* The first column identifies the filesystem by specifying its device node (e.g. /dev/sda1). One can also specify a filesystem by using its UUID or label (this is good for removable media).
* The second field is the mount point for the filesystem
* The third field specifies the type of filesystem. For a list of filesystems see /proc/filesystems
* The fourth field contains mount options. See mount(8) for all options. Common options are noauto (do not mount at boot time), and user (allow a user to mount).
* The fifth and sixth field should be 0 and 0 (should is a little strong here... read the man page)
How to get the UUID of a USB disk:
$ ls -l /dev/disk/by-uuid/ $ vol_id /dev/xxxx
- ian's blog
- Login or register to post comments