1:255.13-alt1
[systemd_ALT.git] / man / systemd-fsck@.service.xml
blob78c661bfad87be36cec91bccadf4828d097f6c60
1 <?xml version="1.0"?>
2 <!--*-nxml-*-->
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="systemd-fsck@.service" xmlns:xi="http://www.w3.org/2001/XInclude">
8   <refentryinfo>
9     <title>systemd-fsck@.service</title>
10     <productname>systemd</productname>
11   </refentryinfo>
13   <refmeta>
14     <refentrytitle>systemd-fsck@.service</refentrytitle>
15     <manvolnum>8</manvolnum>
16   </refmeta>
18   <refnamediv>
19     <refname>systemd-fsck@.service</refname>
20     <refname>systemd-fsck-root.service</refname>
21     <refname>systemd-fsck-usr.service</refname>
22     <refname>systemd-fsck</refname>
23     <refpurpose>File system checker logic</refpurpose>
24   </refnamediv>
26   <refsynopsisdiv>
27     <para><filename>systemd-fsck@.service</filename></para>
28     <para><filename>systemd-fsck-root.service</filename></para>
29     <para><filename>systemd-fsck-usr.service</filename></para>
30     <para><filename>/usr/lib/systemd/systemd-fsck</filename></para>
31   </refsynopsisdiv>
33   <refsect1>
34     <title>Description</title>
36     <para><filename>systemd-fsck@.service</filename>, <filename>systemd-fsck-root.service</filename>, and
37     <filename>systemd-fsck-usr.service</filename> are services responsible for file system checks. They are
38     instantiated for each device that is configured for file system checking.
39     <filename>systemd-fsck-root.service</filename> and <filename>systemd-fsck-usr.service</filename> are
40     responsible for file system checks on the root and /usr file system, respectively, but only if the root
41     filesystem was not checked in the initrd. <filename>systemd-fsck@.service</filename> is used for all
42     other file systems and for the root file system in the initrd.</para>
44     <para>These services are started at boot if <option>passno</option> in <filename>/etc/fstab</filename>
45     for the file system is set to a value greater than zero, but only if it is also configured to be
46     mounted at boot (i.e. without <literal>noauto</literal> option). The file system check for root is
47     performed before the other file systems. Other file systems may be checked in parallel, except when
48     they are on the same rotating disk.</para>
50     <para><filename>systemd-fsck</filename> does not know any details
51     about specific filesystems, and simply executes file system
52     checkers specific to each filesystem type
53     (<filename>fsck.<replaceable>type</replaceable></filename>). These checkers will decide if
54     the filesystem should actually be checked based on the time since
55     last check, number of mounts, unclean unmount, etc.</para>
57     <para><filename>systemd-fsck-root.service</filename> and <filename>systemd-fsck-usr.service</filename>
58     will activate <filename>reboot.target</filename> if <command>fsck</command> returns the "System
59     should reboot" condition, or <filename>emergency.target</filename> if <command>fsck</command>
60     returns the "Filesystem errors left uncorrected" condition.</para>
62     <para><filename>systemd-fsck@.service</filename> will fail if
63     <command>fsck</command> returns with either "System should reboot"
64     or "Filesystem errors left uncorrected" conditions. For filesystems
65     listed in <filename>/etc/fstab</filename> without <literal>nofail</literal>
66     or <literal>noauto</literal> options, <literal>local-fs.target</literal>
67     will then activate <filename>emergency.target</filename>.</para>
68   </refsect1>
70   <refsect1>
71     <title>Kernel Command Line</title>
73     <para><command>systemd-fsck</command> understands these kernel
74     command line parameters:</para>
76     <variablelist class='kernel-commandline-options'>
77       <varlistentry>
78         <term><varname>fsck.mode=</varname></term>
80         <listitem><para>One of <literal>auto</literal>,
81         <literal>force</literal>, <literal>skip</literal>. Controls
82         the mode of operation. The default is <literal>auto</literal>,
83         and ensures that file system checks are done when the file
84         system checker deems them necessary. <literal>force</literal>
85         unconditionally results in full file system checks.
86         <literal>skip</literal> skips any file system
87         checks.</para>
89         <xi:include href="version-info.xml" xpointer="v186"/></listitem>
90       </varlistentry>
92       <varlistentry>
93         <term><varname>fsck.repair=</varname></term>
95         <listitem><para>One of <literal>preen</literal>,
96         <literal>yes</literal>, <literal>no</literal>. Controls the
97         mode of operation. The default is <literal>preen</literal>,
98         and will automatically repair problems that can be safely
99         fixed. <literal>yes</literal> will answer yes to all
100         questions by fsck and <literal>no</literal> will answer no to
101         all questions. </para>
103         <xi:include href="version-info.xml" xpointer="v213"/></listitem>
104       </varlistentry>
105     </variablelist>
106   </refsect1>
108   <refsect1>
109     <title>See Also</title>
110     <para>
111       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
112       <citerefentry project='man-pages'><refentrytitle>fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
113       <citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
114       <citerefentry project='url'><refentrytitle url='https://btrfs.readthedocs.io/en/latest/fsck.btrfs.html'>fsck.btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
115       <citerefentry project='man-pages'><refentrytitle>fsck.cramfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
116       <citerefentry project='man-pages'><refentrytitle>fsck.ext4</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
117       <citerefentry project='man-pages'><refentrytitle>fsck.fat</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
118       <citerefentry project='man-pages'><refentrytitle>fsck.hfsplus</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
119       <citerefentry project='man-pages'><refentrytitle>fsck.minix</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
120       <citerefentry project='man-pages'><refentrytitle>fsck.ntfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
121       <citerefentry project='man-pages'><refentrytitle>fsck.xfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
122     </para>
123   </refsect1>
125 </refentry>