Persistent Mount Configuration
Quick answer
/etc/fstab describes configured filesystems and swap. Editing it does not itself mount storage. A wrong entry can delay boot or prevent normal startup; review a candidate copy first.
Prepare the practice environment
Run python3 lab-fixtures/storage/setup.py from the extracted root as an ordinary user. Enter the printed fresh private path and check pwd. Use fresh fixtures, Bash with set -e -o pipefail, LC_ALL=C and umask 077. Only disposable regular files may be written. Optional examples require an authorized snapshot VM. Never substitute actual devices or modify mounts, system configuration or active swap. Review the lab guide.
How it works
The six fields are source, target, type, options, dump frequency and fsck pass. UUID= identifies a filesystem; PARTUUID= identifies a partition. Use actual independently verified identifiers, not these fictional samples. A conventional ext4 root entry uses pass 1 and other checked ext4 entries pass 2; 0 skips boot-time checking through this mechanism. nofail and noauto have different meanings; defaults is not a universal security policy. On systemd systems, fstab changes may require daemon-reload before manager state reflects them.
For a mount point containing a space, fstab uses an escaped field such as /mnt/lab\040data, not an unescaped blank in the middle of the field. Read back the parsed target in a private candidate file. The noauto option excludes an entry from mount -a; nofail does not mean the mount is guaranteed to work. A successful parse proves neither device availability nor boot behavior.
Try the examples
This checks field count and selected values, not validity.
Expected stdout:
6 /mnt/bm-data ext4 26 /mnt/bm-cache tmpfs 0findmnt --fstab --tab-file ./fstab.sample -rn -o SOURCEThe UUID is fictional; it is not evidence of a matching mounted device.
Expected stdout:
UUID=12345678-1234-4234-8234-123456789abctmpfsVM only: the sample intentionally references fictional paths and may report errors. Replace with VM-specific verified values in a copy before validating again. Do not install the sample.
Manual example; not executed locally. Follow its stated environment restrictions.
Common mistakes
Do not run mount -a merely to test syntax: it may mount real storage. Keep a backup and console recovery before editing live fstab.
Practice
Explain all six fields in the first entry and write a preflight checklist for an authorized VM. Keep the candidate separate from /etc/fstab.
Related references
Study: findmnt, blkid. These are reference names, not deployed links.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Persistent mount configuration — Knowledge Check
Apply storage concepts to synthetic fixtures and VM-only scenarios.
What is field 2?
What does pass 0 request?
Which identifies a partition?
Which is safe first for a candidate?