aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2025-10-22 10:42:36 +0200
committerKarel Zak <kzak@redhat.com>2025-10-22 10:42:36 +0200
commitd59e09cc0fb98268196cbf48080a74094e69d1a6 (patch)
treec87a793a6d394f6326a8ffac0d530f78d2e7a6bb
parentbe33a6786b82dc456be347d2b366661100101793 (diff)
downloadutil-linux-d59e09cc0fb98268196cbf48080a74094e69d1a6.tar.gz
mount: add note about systemd and --all historical context
Add information that mount -a was originally designed for init scripts but many modern systemd-based distributions use systemd units instead for mounting filesystems on boot in a more sophisticated way. Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--sys-utils/mount.8.adoc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys-utils/mount.8.adoc b/sys-utils/mount.8.adoc
index 0279767f70..9a5479fe54 100644
--- a/sys-utils/mount.8.adoc
+++ b/sys-utils/mount.8.adoc
@@ -307,7 +307,9 @@ The *mount* command does not pass all command-line options to the **/sbin/mount.
Command-line options available for the *mount* command are:
*-a*, *--all*::
-Mount all filesystems (of the given types) mentioned in _fstab_ (except for those whose line contains the *noauto* keyword). The filesystems are mounted following their order in _fstab_. The *mount* command compares filesystem source, target (and fs root for bind mount or btrfs) to detect already mounted filesystems. The kernel table with already mounted filesystems is cached during *mount --all*. This means that all duplicated _fstab_ entries will be mounted.
+Mount all filesystems (of the given types) mentioned in _fstab_ (except for those whose line contains the *noauto* keyword). This option was originally designed for use in init scripts. Note that many modern systemd-based distributions do not use *mount -a* on boot and instead mount filesystems in a more sophisticated way using systemd units.
++
+The filesystems are mounted following their order in _fstab_. The *mount* command compares filesystem source, target (and fs root for bind mount or btrfs) to detect already mounted filesystems. The kernel table with already mounted filesystems is cached during *mount --all*. This means that all duplicated _fstab_ entries will be mounted.
+
The correct functionality depends on _/proc_ (to detect already mounted filesystems) and on _/sys_ (to evaluate filesystem tags like UUID= or LABEL=). It's strongly recommended to mount _/proc_ and _/sys_ filesystems before *mount -a* is executed, or keep /proc and /sys at the beginning of _fstab_.
+