man-pages/man8/systemd-fstab-generator.8.html
2021-03-31 01:06:50 +01:00

282 lines
7.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of SYSTEMD-FSTAB-GENERATOR</TITLE>
</HEAD><BODY>
<H1>SYSTEMD-FSTAB-GENERATOR</H1>
Section: systemd-fstab-generator (8)<BR>Updated: <BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
systemd-fstab-generator - Unit generator for /etc/fstab
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
/lib/systemd/system-generators/systemd-fstab-generator
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
systemd-fstab-generator
is a generator that translates
/etc/fstab
(see
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5)
for details) into native systemd units early at boot and when configuration of the system manager is reloaded. This will instantiate mount and swap units as necessary.
<P>
The
<I>passno</I>
field is treated like a simple boolean, and the ordering information is discarded. However, if the root file system is checked, it is checked before all the other file systems.
<P>
See
<B><A HREF="/cgi-bin/man/man2html?5+systemd.mount">systemd.mount</A></B>(5)
and
<B><A HREF="/cgi-bin/man/man2html?5+systemd.swap">systemd.swap</A></B>(5)
for more information about special
/etc/fstab
mount options this generator understands.
<P>
One special topic is handling of symbolic links. Historical init implementations supported symlinks in
/etc/fstab. Because mount units will refuse mounts where the target is a symbolic link, this generator will resolve any symlinks as far as possible when processing
/etc/fstab
in order to enhance backwards compatibility. If a symlink target does not exist at the time that this generator runs, it is assumed that the symlink target is the final target of the mount.
<P>
systemd-fstab-generator
implements
<B><A HREF="/cgi-bin/man/man2html?7+systemd.generator">systemd.generator</A></B>(7).
<A NAME="lbAE">&nbsp;</A>
<H2>KERNEL COMMAND LINE</H2>
<P>
systemd-fstab-generator
understands the following kernel command line parameters:
<P>
<I>fstab=</I>, <I>rd.fstab=</I>
<DL COMPACT><DT id="1"><DD>
Takes a boolean argument. Defaults to
&quot;yes&quot;. If
&quot;no&quot;, causes the generator to ignore any mounts or swap devices configured in
/etc/fstab.
<I>rd.fstab=</I>
is honored only by the initial RAM disk (initrd) while
<I>fstab=</I>
is honored by both the main system and the initrd.
</DL>
<P>
<I>root=</I>
<DL COMPACT><DT id="2"><DD>
Takes the root filesystem to mount in the initrd.
<I>root=</I>
is honored by the initrd.
</DL>
<P>
<I>rootfstype=</I>
<DL COMPACT><DT id="3"><DD>
Takes the root filesystem type that will be passed to the mount command.
<I>rootfstype=</I>
is honored by the initrd.
</DL>
<P>
<I>rootflags=</I>
<DL COMPACT><DT id="4"><DD>
Takes the root filesystem mount options to use.
<I>rootflags=</I>
is honored by the initrd.
<P>
Note that unlike most kernel command line options this setting does not override settings made in configuration files (specifically: the mount option string in
/etc/fstab). See
<B><A HREF="/cgi-bin/man/man2html?8+systemd-remount-fs.service">systemd-remount-fs.service</A></B>(8).
</DL>
<P>
<I>mount.usr=</I>
<DL COMPACT><DT id="5"><DD>
Takes the
/usr
filesystem to be mounted by the initrd. If
<I>mount.usrfstype=</I>
or
<I>mount.usrflags=</I>
is set, then
<I>mount.usr=</I>
will default to the value set in
<I>root=</I>.
<P>
Otherwise, this parameter defaults to the
/usr
entry found in
/etc/fstab
on the root filesystem.
<P>
<I>mount.usr=</I>
is honored by the initrd.
</DL>
<P>
<I>mount.usrfstype=</I>
<DL COMPACT><DT id="6"><DD>
Takes the
/usr
filesystem type that will be passed to the mount command. If
<I>mount.usr=</I>
or
<I>mount.usrflags=</I>
is set, then
<I>mount.usrfstype=</I>
will default to the value set in
<I>rootfstype=</I>.
<P>
Otherwise, this value will be read from the
/usr
entry in
/etc/fstab
on the root filesystem.
<P>
<I>mount.usrfstype=</I>
is honored by the initrd.
</DL>
<P>
<I>mount.usrflags=</I>
<DL COMPACT><DT id="7"><DD>
Takes the
/usr
filesystem mount options to use. If
<I>mount.usr=</I>
or
<I>mount.usrfstype=</I>
is set, then
<I>mount.usrflags=</I>
will default to the value set in
<I>rootflags=</I>.
<P>
Otherwise, this value will be read from the
/usr
entry in
/etc/fstab
on the root filesystem.
<P>
<I>mount.usrflags=</I>
is honored by the initrd.
</DL>
<P>
<I>systemd.volatile=</I>
<DL COMPACT><DT id="8"><DD>
Controls whether the system shall boot up in volatile mode. Takes a boolean argument or the special value
<B>state</B>.
<P>
If false (the default), this generator makes no changes to the mount tree and the system is booted up in normal mode.
<P>
If true the generator ensures
<B><A HREF="/cgi-bin/man/man2html?8+systemd-volatile-root.service">systemd-volatile-root.service</A></B>(8)
is run as part of the initial RAM disk (&quot;initrd&quot;). This service changes the mount table before transitioning to the host system, so that a volatile memory file system (&quot;tmpfs&quot;) is used as root directory, with only
/usr
mounted into it from the configured root file system, in read-only mode. This way the system operates in fully stateless mode, with all configuration and state reset at boot and lost at shutdown, as
/etc
and
/var
will be served from the (initially unpopulated) volatile memory file system.
<P>
If set to
<B>state</B>
the generator will leave the root directory mount point unaltered, however will mount a
&quot;tmpfs&quot;
file system to
/var. In this mode the normal system configuration (i.e. the contents of
&quot;/etc&quot;) is in effect (and may be modified during system runtime), however the system state (i.e. the contents of
&quot;/var&quot;) is reset at boot and lost at shutdown.
<P>
If this setting is set to
&quot;overlay&quot;
the root file system is set up as
&quot;overlayfs&quot;
mount combining the read-only root directory with a writable
&quot;tmpfs&quot;, so that no modifications are made to disk, but the file system may be modified nonetheless with all changes being lost at reboot.
<P>
Note that in none of these modes the root directory,
/etc,
/var
or any other resources stored in the root file system are physically removed. It's thus safe to boot a system that is normally operated in non-volatile mode temporarily into volatile mode, without losing data.
<P>
Note that with the exception of
&quot;overlay&quot;
mode, enabling this setting will only work correctly on operating systems that can boot up with only
/usr
mounted, and are able to automatically populate
/etc, and also
/var
in case of
&quot;systemd.volatile=yes&quot;.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?5+fstab">fstab</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?5+systemd.mount">systemd.mount</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?5+systemd.swap">systemd.swap</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?8+systemd-cryptsetup-generator">systemd-cryptsetup-generator</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?7+kernel-command-line">kernel-command-line</A></B>(7)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="9"><A HREF="#lbAB">NAME</A><DD>
<DT id="10"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="11"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="12"><A HREF="#lbAE">KERNEL COMMAND LINE</A><DD>
<DT id="13"><A HREF="#lbAF">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:16 GMT, March 31, 2021
</BODY>
</HTML>