1SYSTEMD-FSTAB-GENERATOR(8)  systemd-fstab-generator SYSTEMD-FSTAB-GENERATOR(8)
2
3
4

NAME

6       systemd-fstab-generator - Unit generator for /etc/fstab
7

SYNOPSIS

9       /usr/lib/systemd/system-generators/systemd-fstab-generator
10

DESCRIPTION

12       systemd-fstab-generator is a generator that translates /etc/fstab (see
13       fstab(5) for details) into native systemd units early at boot and when
14       configuration of the system manager is reloaded. This will instantiate
15       mount and swap units as necessary.
16
17       The passno field is treated like a simple boolean, and the ordering
18       information is discarded. However, if the root file system is checked,
19       it is checked before all the other file systems.
20
21       See systemd.mount(5) and systemd.swap(5) for more information about
22       special /etc/fstab mount options this generator understands.
23
24       One special topic is handling of symbolic links. Historical init
25       implementations supported symlinks in /etc/fstab. Because mount units
26       will refuse mounts where the target is a symbolic link, this generator
27       will resolve any symlinks as far as possible when processing /etc/fstab
28       in order to enhance backwards compatibility. If a symlink target does
29       not exist at the time that this generator runs, it is assumed that the
30       symlink target is the final target of the mount.
31
32       systemd-fstab-generator implements systemd.generator(7).
33

KERNEL COMMAND LINE

35       systemd-fstab-generator understands the following kernel command line
36       parameters:
37
38       fstab=, rd.fstab=
39           Takes a boolean argument. Defaults to "yes". If "no", causes the
40           generator to ignore any mounts or swap devices configured in
41           /etc/fstab.  rd.fstab= is honored only by the initial RAM disk
42           (initrd) while fstab= is honored by both the main system and the
43           initrd.
44
45       root=
46           Configures the operating system's root filesystem to mount when
47           running in the initrd. This accepts a device node path (usually
48           /dev/disk/by-uuid/...  or /dev/disk/by-label/...  or similar), or
49           the special values "gpt-auto" and "tmpfs".
50
51           Use "gpt-auto" to explicitly request automatic root file system
52           discovery via systemd-gpt-auto-generator(8).
53
54           Use "tmpfs" in order to mount a tmpfs(5) file system as root file
55           system of the OS. This is useful in combination with mount.usr=
56           (see below) in order to combine a volatile root file system with a
57           separate, immutable /usr/ file system. Also see systemd.volatile=
58           below.
59
60       rootfstype=
61           Takes the root filesystem type that will be passed to the mount
62           command.  rootfstype= is honored by the initrd.
63
64       rootflags=
65           Takes the root filesystem mount options to use.  rootflags= is
66           honored by the initrd.
67
68           Note that unlike most kernel command line options this setting does
69           not override settings made in configuration files (specifically:
70           the mount option string in /etc/fstab). See systemd-remount-
71           fs.service(8).
72
73       mount.usr=
74           Takes the /usr/ filesystem to be mounted by the initrd. If
75           mount.usrfstype= or mount.usrflags= is set, then mount.usr= will
76           default to the value set in root=.
77
78           Otherwise, this parameter defaults to the /usr/ entry found in
79           /etc/fstab on the root filesystem.
80
81           mount.usr= is honored by the initrd.
82
83       mount.usrfstype=
84           Takes the /usr/ filesystem type that will be passed to the mount
85           command. If mount.usr= or mount.usrflags= is set, then
86           mount.usrfstype= will default to the value set in rootfstype=.
87
88           Otherwise, this value will be read from the /usr/ entry in
89           /etc/fstab on the root filesystem.
90
91           mount.usrfstype= is honored by the initrd.
92
93       mount.usrflags=
94           Takes the /usr/ filesystem mount options to use. If mount.usr= or
95           mount.usrfstype= is set, then mount.usrflags= will default to the
96           value set in rootflags=.
97
98           Otherwise, this value will be read from the /usr/ entry in
99           /etc/fstab on the root filesystem.
100
101           mount.usrflags= is honored by the initrd.
102
103       roothash=, usrhash=
104           These options are primarily read by systemd-veritysetup-
105           generator(8). When set this indicates that the root file system (or
106           /usr/) shall be mounted from Verity volumes with the specified
107           hashes. If these kernel command line options are set the root (or
108           /usr/) file system is thus mounted from a device mapper volume
109           /dev/mapper/root (or /dev/mapper/usr).
110
111       systemd.volatile=
112           Controls whether the system shall boot up in volatile mode. Takes a
113           boolean argument or the special value state.
114
115           If false (the default), this generator makes no changes to the
116           mount tree and the system is booted up in normal mode.
117
118           If true the generator ensures systemd-volatile-root.service(8) is
119           run as part of the initial RAM disk ("initrd"). This service
120           changes the mount table before transitioning to the host system, so
121           that a volatile memory file system ("tmpfs") is used as root
122           directory, with only /usr/ mounted into it from the configured root
123           file system, in read-only mode. This way the system operates in
124           fully stateless mode, with all configuration and state reset at
125           boot and lost at shutdown, as /etc/ and /var/ will be served from
126           the (initially unpopulated) volatile memory file system.
127
128           If set to state the generator will leave the root directory mount
129           point unaltered, however will mount a "tmpfs" file system to /var/.
130           In this mode the normal system configuration (i.e. the contents of
131           "/etc/") is in effect (and may be modified during system runtime),
132           however the system state (i.e. the contents of "/var/") is reset at
133           boot and lost at shutdown.
134
135           If this setting is set to "overlay" the root file system is set up
136           as "overlayfs" mount combining the read-only root directory with a
137           writable "tmpfs", so that no modifications are made to disk, but
138           the file system may be modified nonetheless with all changes being
139           lost at reboot.
140
141           Note that in none of these modes the root directory, /etc/, /var/
142           or any other resources stored in the root file system are
143           physically removed. It's thus safe to boot a system that is
144           normally operated in non-volatile mode temporarily into volatile
145           mode, without losing data.
146
147           Note that with the exception of "overlay" mode, enabling this
148           setting will only work correctly on operating systems that can boot
149           up with only /usr/ mounted, and are able to automatically populate
150           /etc/, and also /var/ in case of "systemd.volatile=yes".
151
152           Also see root=tmpfs above, for a method to combine a "tmpfs" file
153           system with a regular /usr/ file system (as configured via
154           mount.usr=). The main distinction between systemd.volatile=yes, and
155           root=tmpfs in combination mount.usr= is that the former operates on
156           top of a regular root file system and temporarily obstructs the
157           files and directories above its /usr/ subdirectory, while the
158           latter does not hide any files, but simply mounts a unpopulated
159           tmpfs as root file system and combines it with a user picked /usr/
160           file system.
161
162       systemd.swap
163           Takes a boolean argument or enables the option if specified without
164           an argument. If disabled, causes the generator to ignore any swap
165           devices configured in /etc/fstab. Defaults to enabled.
166

SEE ALSO

168       systemd(1), fstab(5), systemd.mount(5), systemd.swap(5), systemd-
169       cryptsetup-generator(8), systemd-gpt-auto-generator(8), kernel-command-
170       line(7)
171
172
173
174systemd 250                                         SYSTEMD-FSTAB-GENERATOR(8)
Impressum