diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2024-04-17 17:34:43 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2024-04-17 17:41:07 +0200 |
commit | 9f74901a1e04012bea85572b7613c65c6d5111f3 (patch) | |
tree | 674f931e1d9e6a365218a171bfc769d2a959cf28 /docs/SYSTEMD_FILE_HIERARCHY_REQUIREMENTS.md | |
parent | Merge pull request #32143 from yuwata/magic (diff) | |
parent | docs/RANDOM_SEEDS: update NetBSD link (diff) | |
download | systemd-9f74901a1e04012bea85572b7613c65c6d5111f3.tar.xz systemd-9f74901a1e04012bea85572b7613c65c6d5111f3.zip |
Merge pull request #31648 from neighbourhoodie/review-content
I did the merge manually to resolve a trivial conflict.
Diffstat (limited to 'docs/SYSTEMD_FILE_HIERARCHY_REQUIREMENTS.md')
-rw-r--r-- | docs/SYSTEMD_FILE_HIERARCHY_REQUIREMENTS.md | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/docs/SYSTEMD_FILE_HIERARCHY_REQUIREMENTS.md b/docs/SYSTEMD_FILE_HIERARCHY_REQUIREMENTS.md index 574df93e00..81d6f437d7 100644 --- a/docs/SYSTEMD_FILE_HIERARCHY_REQUIREMENTS.md +++ b/docs/SYSTEMD_FILE_HIERARCHY_REQUIREMENTS.md @@ -7,14 +7,26 @@ SPDX-License-Identifier: LGPL-2.1-or-later # systemd File Hierarchy Requirements -There are various attempts to standardize the file system hierarchy of Linux systems. In systemd we leave much of the file system layout open to the operating system, but here's what systemd strictly requires: +There are various attempts to standardize the file system hierarchy of Linux systems. +In systemd we leave much of the file system layout open to the operating system, but here's what systemd strictly requires: -- /, /usr, /etc must be mounted when the host systemd is first invoked. This may be achieved either by using the kernel's built-in root disk mounting (in which case /, /usr and /etc need to be on the same file system), or via an initrd, which could mount the three directories from different sources. -- /bin, /sbin, /lib (and /lib64 if applicable) should reside on /, or be symlinks to the /usr file system (recommended). All of them must be available before the host systemd is first executed. -- /var does not have to be mounted when the host systemd is first invoked, however, it must be configured so that it is mounted writable before local-fs.target is reached (for example, by simply listing it in /etc/fstab). -- /tmp is recommended to be a tmpfs (default), but doesn't have to. If configured, it must be mounted before local-fs.target is reached (for example, by listing it in /etc/fstab). -- /dev must exist as an empty mount point and will automatically be mounted by systemd with a devtmpfs. Non-devtmpfs boots are not supported. -- /proc and /sys must exist as empty mount points and will automatically be mounted by systemd with procfs and sysfs. -- /run must exist as an empty mount point and will automatically be mounted by systemd with a tmpfs. +- `/`, `/usr`, `/etc` must be mounted when the host systemd is first invoked. + This may be achieved either by using the kernel's built-in root disk mounting (in which case `/`, `/usr` and `/etc` need to be on the same file system), or via an initrd, which could mount the three directories from different sources. -The other directories usually found in the root directory (such as /home, /boot, /opt) are irrelevant to systemd. If they are defined they may be mounted from any source and at any time, though it is a good idea to mount them also before local-fs.target is reached. +- `/bin`, `/sbin`, `/lib` (and `/lib64` if applicable) should reside on `/`, or be symlinks to the `/usr` file system (recommended). + All of them must be available before the host systemd is first executed. + +- `/var` does not have to be mounted when the host systemd is first invoked, however, + it must be configured so that it is mounted writable before local-fs.target is reached (for example, by simply listing it in` /etc/fstab`). + +- `/tmp` is recommended to be a tmpfs (default), but doesn't have to. + If configured, it must be mounted before local-fs.target is reached (for example, by listing it in `/etc/fstab`). + +- `/dev` must exist as an empty mount point and will automatically be mounted by systemd with a devtmpfs. Non-devtmpfs boots are not supported. + +- `/proc` and `/sys` must exist as empty mount points and will automatically be mounted by systemd with procfs and sysfs. + +- `/run` must exist as an empty mount point and will automatically be mounted by systemd with a tmpfs. + +The other directories usually found in the root directory (such as `/home`, `/boot`, `/opt`) are irrelevant to systemd. +If they are defined they may be mounted from any source and at any time, though it is a good idea to mount them also before local-fs.target is reached. |