systemd-fstab-generator(8) — Linux manual page



NAME         top

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

SYNOPSIS         top


DESCRIPTION         top

       systemd-fstab-generator is a generator that translates /etc/fstab
       (see fstab(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.

       The passno 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.

       See systemd.mount(5) and systemd.swap(5) for more information about
       special /etc/fstab mount options this generator understands.

       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

       systemd-fstab-generator implements systemd.generator(7).


       systemd-fstab-generator understands the following kernel command line

       fstab=, rd.fstab=
           Takes a boolean argument. Defaults to "yes". If "no", causes the
           generator to ignore any mounts or swap devices configured in
           /etc/fstab.  rd.fstab= is honored only by the initial RAM disk
           (initrd) while fstab= is honored by both the main system and the

           Takes the root filesystem to mount in the initrd.  root= is
           honored by the initrd.

           Takes the root filesystem type that will be passed to the mount
           command.  rootfstype= is honored by the initrd.

           Takes the root filesystem mount options to use.  rootflags= is
           honored by the initrd.

           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

           Takes the /usr/ filesystem to be mounted by the initrd. If
           mount.usrfstype= or mount.usrflags= is set, then mount.usr= will
           default to the value set in root=.

           Otherwise, this parameter defaults to the /usr/ entry found in
           /etc/fstab on the root filesystem.

           mount.usr= is honored by the initrd.

           Takes the /usr/ filesystem type that will be passed to the mount
           command. If mount.usr= or mount.usrflags= is set, then
           mount.usrfstype= will default to the value set in rootfstype=.

           Otherwise, this value will be read from the /usr/ entry in
           /etc/fstab on the root filesystem.

           mount.usrfstype= is honored by the initrd.

           Takes the /usr/ filesystem mount options to use. If mount.usr= or
           mount.usrfstype= is set, then mount.usrflags= will default to the
           value set in rootflags=.

           Otherwise, this value will be read from the /usr/ entry in
           /etc/fstab on the root filesystem.

           mount.usrflags= is honored by the initrd.

           Controls whether the system shall boot up in volatile mode. Takes
           a boolean argument or the special value state.

           If false (the default), this generator makes no changes to the
           mount tree and the system is booted up in normal mode.

           If true the generator ensures systemd-volatile-root.service(8) is
           run as part of the initial RAM disk ("initrd"). This service
           changes the mount table before transitioning to the host system,
           so that a volatile memory file system ("tmpfs") 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.

           If set to state the generator will leave the root directory mount
           point unaltered, however will mount a "tmpfs" file system to
           /var/. In this mode the normal system configuration (i.e. the
           contents of "/etc/") is in effect (and may be modified during
           system runtime), however the system state (i.e. the contents of
           "/var/") is reset at boot and lost at shutdown.

           If this setting is set to "overlay" the root file system is set
           up as "overlayfs" mount combining the read-only root directory
           with a writable "tmpfs", so that no modifications are made to
           disk, but the file system may be modified nonetheless with all
           changes being lost at reboot.

           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.

           Note that with the exception of "overlay" 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 "systemd.volatile=yes".

           Takes a boolean argument or enables the option if specified
           without an argument. If disabled, causes the generator to ignore
           any swap devices configured in /etc/fstab. Defaults to enabled.

SEE ALSO         top

       systemd(1), fstab(5), systemd.mount(5), systemd.swap(5),
       systemd-cryptsetup-generator(8), kernel-command-line(7)

COLOPHON         top

       This page is part of the systemd (systemd system and service manager)
       project.  Information about the project can be found at 
       ⟨⟩.  If you have a bug
       report for this manual page, see
       ⟨⟩.  This
       page was obtained from the project's upstream Git repository
       ⟨⟩ on 2020-11-01.  (At that
       time, the date of the most recent commit that was found in the repos‐
       itory was 2020-11-01.)  If you discover any rendering problems in
       this HTML version of the page, or you believe there is a better or
       more up-to-date source for the page, or you have corrections or im‐
       provements to the information in this COLOPHON (which is not part of
       the original manual page), send a mail to

systemd 247                                       SYSTEMD-FSTAB-GENERATOR(8)

Pages that refer to this page: systemd.mount(5)systemd.swap(5)30-systemd-environment-d-generator(7)kernel-command-line(7)systemd.directives(7)systemd.generator(7)systemd.index(7)systemd.special(7)systemd-cryptsetup-generator(8)systemd-gpt-auto-generator(8)systemd-growfs(8)systemd-growfs.service(8)systemd-growfs@.service(8)systemd-makefs(8)systemd-makefs.service(8)systemd-makefs@.service(8)systemd-mkswap.service(8)systemd-mkswap@.service(8)systemd-remount-fs(8)systemd-remount-fs.service(8)systemd-veritysetup-generator(8)systemd-volatile-root(8)systemd-volatile-root.service(8)