]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-fstab-generator.xml
bootctl: allow non-root user to run `bootctl status` (#5964)
[thirdparty/systemd.git] / man / systemd-fstab-generator.xml
CommitLineData
059b37cc
LP
1<?xml version="1.0"?>
2<!--*-nxml-*-->
12b42c76 3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
059b37cc
LP
4<!--
5 This file is part of systemd.
6
7 Copyright 2012 Lennart Poettering
8
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
13
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
21-->
22<refentry id="systemd-fstab-generator">
23
798d3a52
ZJS
24 <refentryinfo>
25 <title>systemd-fstab-generator</title>
26 <productname>systemd</productname>
27
28 <authorgroup>
29 <author>
30 <contrib>Developer</contrib>
31 <firstname>Lennart</firstname>
32 <surname>Poettering</surname>
33 <email>lennart@poettering.net</email>
34 </author>
35 </authorgroup>
36 </refentryinfo>
37
38 <refmeta>
39 <refentrytitle>systemd-fstab-generator</refentrytitle>
40 <manvolnum>8</manvolnum>
41 </refmeta>
42
43 <refnamediv>
44 <refname>systemd-fstab-generator</refname>
45 <refpurpose>Unit generator for /etc/fstab</refpurpose>
46 </refnamediv>
47
48 <refsynopsisdiv>
12b42c76 49 <para><filename>/usr/lib/systemd/system-generators/systemd-fstab-generator</filename></para>
798d3a52
ZJS
50 </refsynopsisdiv>
51
52 <refsect1>
53 <title>Description</title>
54
55 <para><filename>systemd-fstab-generator</filename> is a generator
56 that translates <filename>/etc/fstab</filename> (see
3ba3a79d 57 <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>
798d3a52
ZJS
58 for details) into native systemd units early at boot and when
59 configuration of the system manager is reloaded. This will
60 instantiate mount and swap units as necessary.</para>
61
62 <para>The <varname>passno</varname> field is treated like a simple
63 boolean, and the ordering information is discarded. However, if
64 the root file system is checked, it is checked before all the
65 other file systems.</para>
66
67 <para>See
68 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>
69 and
70 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>
71 for more information about special <filename>/etc/fstab</filename>
72 mount options this generator understands.</para>
73
b1c1a519
ZC
74 <para><filename>systemd-fstab-generator</filename> implements
75 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
798d3a52
ZJS
76 </refsect1>
77
78 <refsect1>
79 <title>Kernel Command Line</title>
80
81 <para><filename>systemd-fstab-generator</filename> understands the
82 following kernel command line parameters:</para>
83
84 <variablelist class='kernel-commandline-options'>
85
86 <varlistentry>
87 <term><varname>fstab=</varname></term>
88 <term><varname>rd.fstab=</varname></term>
89
90 <listitem><para>Takes a boolean argument. Defaults to
91 <literal>yes</literal>. If <literal>no</literal>, causes the
91214a37 92 generator to ignore any mounts or swap devices configured in
798d3a52 93 <filename>/etc/fstab</filename>. <varname>rd.fstab=</varname>
91214a37 94 is honored only by the initial RAM disk (initrd) while
798d3a52
ZJS
95 <varname>fstab=</varname> is honored by both the main system
96 and the initrd.</para></listitem>
97 </varlistentry>
91214a37 98
798d3a52
ZJS
99 <varlistentry>
100 <term><varname>root=</varname></term>
101
102 <listitem><para>Takes the root filesystem to mount in the
103 initrd. <varname>root=</varname> is honored by the
104 initrd.</para></listitem>
105 </varlistentry>
91214a37 106
798d3a52
ZJS
107 <varlistentry>
108 <term><varname>rootfstype=</varname></term>
109
110 <listitem><para>Takes the root filesystem type that will be
111 passed to the mount command. <varname>rootfstype=</varname> is
112 honored by the initrd.</para></listitem>
113 </varlistentry>
91214a37 114
798d3a52
ZJS
115 <varlistentry>
116 <term><varname>rootflags=</varname></term>
117
118 <listitem><para>Takes the root filesystem mount options to
119 use. <varname>rootflags=</varname> is honored by the
120 initrd.</para></listitem>
121 </varlistentry>
91214a37 122
798d3a52
ZJS
123 <varlistentry>
124 <term><varname>mount.usr=</varname></term>
125
126 <listitem><para>Takes the <filename>/usr</filename> filesystem
127 to be mounted by the initrd. If
128 <varname>mount.usrfstype=</varname> or
129 <varname>mount.usrflags=</varname> is set, then
130 <varname>mount.usr=</varname> will default to the value set in
131 <varname>root=</varname>.</para>
132
b938cb90 133 <para>Otherwise, this parameter defaults to the
798d3a52
ZJS
134 <filename>/usr</filename> entry found in
135 <filename>/etc/fstab</filename> on the root filesystem.</para>
136
137 <para><varname>mount.usr=</varname> is honored by the initrd.
138 </para></listitem>
139 </varlistentry>
91214a37 140
798d3a52
ZJS
141 <varlistentry>
142 <term><varname>mount.usrfstype=</varname></term>
143
144 <listitem><para>Takes the <filename>/usr</filename> filesystem
145 type that will be passed to the mount command. If
146 <varname>mount.usr=</varname> or
147 <varname>mount.usrflags=</varname> is set, then
148 <varname>mount.usrfstype=</varname> will default to the value
149 set in <varname>rootfstype=</varname>.</para>
150
b938cb90 151 <para>Otherwise, this value will be read from the
798d3a52
ZJS
152 <filename>/usr</filename> entry in
153 <filename>/etc/fstab</filename> on the root filesystem.</para>
154
155 <para><varname>mount.usrfstype=</varname> is honored by the
156 initrd.</para></listitem>
157 </varlistentry>
91214a37 158
798d3a52
ZJS
159 <varlistentry>
160 <term><varname>mount.usrflags=</varname></term>
161
162 <listitem><para>Takes the <filename>/usr</filename> filesystem
163 mount options to use. If <varname>mount.usr=</varname> or
164 <varname>mount.usrfstype=</varname> is set, then
ff9b60f3 165 <varname>mount.usrflags=</varname> will default to the value
798d3a52
ZJS
166 set in <varname>rootflags=</varname>.</para>
167
b938cb90 168 <para>Otherwise, this value will be read from the
798d3a52
ZJS
169 <filename>/usr</filename> entry in
170 <filename>/etc/fstab</filename> on the root filesystem.</para>
171
172 <para><varname>mount.usrflags=</varname> is honored by the
173 initrd.</para></listitem>
174 </varlistentry>
91214a37
LP
175
176 <varlistentry>
177 <term><varname>systemd.volatile=</varname></term>
178
179 <listitem><para>Controls whether the system shall boot up in volatile mode. Takes a boolean argument or the
180 special value <option>state</option>.</para>
181
182 <para>If false (the default), this generator makes no changes to the mount tree and the system is booted up in
183 normal mode.</para>
184
185 <para>If true the generator ensures
186 <citerefentry><refentrytitle>systemd-volatile-root.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
187 is run as part of the initial RAM disk ("initrd"). This service changes the mount table before transitioning to
188 the host system, so that a volatile memory file system (<literal>tmpfs</literal>) is used as root directory,
189 with only <filename>/usr</filename> mounted into it from the configured root file system, in read-only
190 mode. This way the system operates in fully stateless mode, with all configuration and state reset at boot and
191 lost at shutdown, as <filename>/etc</filename> and <filename>/var</filename> will be served from the (initially
192 unpopulated) volatile memory file system.</para>
193
194 <para>If set to <option>state</option> the generator will leave the root
195 directory mount point unaltered, however will mount a <literal>tmpfs</literal> file system to
301a21a8 196 <filename>/var</filename>. In this mode the normal system configuration (i.e. the contents of
91214a37
LP
197 <literal>/etc</literal>) is in effect (and may be modified during system runtime), however the system state
198 (i.e. the contents of <literal>/var</literal>) is reset at boot and lost at shutdown.</para>
199
200 <para>Note that in none of these modes the root directory, <filename>/etc</filename>, <filename>/var</filename>
201 or any other resources stored in the root file system are physically removed. It's thus safe to boot a system
202 that is normally operated in non-volatile mode temporarily into volatile mode, without losing data.</para>
203
204 <para>Note that enabling this setting will only work correctly on operating systems that can boot up with only
205 <filename>/usr</filename> mounted, and are able to automatically populate <filename>/etc</filename>, and also
206 <filename>/var</filename> in case of <literal>systemd.volatile=yes</literal>.</para></listitem>
207 </varlistentry>
798d3a52
ZJS
208 </variablelist>
209 </refsect1>
210
211 <refsect1>
212 <title>See Also</title>
213 <para>
214 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
3ba3a79d 215 <citerefentry project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
798d3a52
ZJS
216 <citerefentry><refentrytitle>systemd.mount</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
217 <citerefentry><refentrytitle>systemd.swap</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
91214a37
LP
218 <citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
219 <citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry>
798d3a52
ZJS
220 </para>
221 </refsect1>
059b37cc
LP
222
223</refentry>