]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-fsck@.service.xml
verify: use manager_load_startable_unit_or_warn() to load units for verification
[thirdparty/systemd.git] / man / systemd-fsck@.service.xml
1 <?xml version="1.0"?>
2 <!--*-nxml-*-->
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!--
5 SPDX-License-Identifier: LGPL-2.1+
6
7 This file is part of systemd.
8
9 Copyright 2012 Lennart Poettering
10
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
15
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
20
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
23 -->
24 <refentry id="systemd-fsck@.service">
25
26 <refentryinfo>
27 <title>systemd-fsck@.service</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>systemd-fsck@.service</refentrytitle>
42 <manvolnum>8</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>systemd-fsck@.service</refname>
47 <refname>systemd-fsck-root.service</refname>
48 <refname>systemd-fsck</refname>
49 <refpurpose>File system checker logic</refpurpose>
50 </refnamediv>
51
52 <refsynopsisdiv>
53 <para><filename>systemd-fsck@.service</filename></para>
54 <para><filename>systemd-fsck-root.service</filename></para>
55 <para><filename>/usr/lib/systemd/systemd-fsck</filename></para>
56 </refsynopsisdiv>
57
58 <refsect1>
59 <title>Description</title>
60
61 <para><filename>systemd-fsck@.service</filename> and
62 <filename>systemd-fsck-root.service</filename> are services
63 responsible for file system checks. They are instantiated for each
64 device that is configured for file system checking.
65 <filename>systemd-fsck-root.service</filename> is responsible for
66 file system checks on the root file system, but only if the
67 root filesystem was not checked in the initramfs.
68 <filename>systemd-fsck@.service</filename> is used for all other
69 file systems and for the root file system in the initramfs.</para>
70
71 <para>These services are started at boot if
72 <option>passno</option> in <filename>/etc/fstab</filename> for the
73 file system is set to a value greater than zero. The file system
74 check for root is performed before the other file systems. Other
75 file systems may be checked in parallel, except when they are on
76 the same rotating disk.</para>
77
78 <para><filename>systemd-fsck</filename> does not know any details
79 about specific filesystems, and simply executes file system
80 checkers specific to each filesystem type
81 (<filename>/sbin/fsck.*</filename>). This helper will decide if
82 the filesystem should actually be checked based on the time since
83 last check, number of mounts, unclean unmount, etc.</para>
84
85 <para>If a file system check fails for a service without
86 <option>nofail</option>, emergency mode is activated, by isolating
87 to <filename>emergency.target</filename>.</para>
88 </refsect1>
89
90 <refsect1>
91 <title>Kernel Command Line</title>
92
93 <para><filename>systemd-fsck</filename> understands these kernel
94 command line parameters:</para>
95
96 <variablelist class='kernel-commandline-options'>
97 <varlistentry>
98 <term><varname>fsck.mode=</varname></term>
99
100 <listitem><para>One of <literal>auto</literal>,
101 <literal>force</literal>, <literal>skip</literal>. Controls
102 the mode of operation. The default is <literal>auto</literal>,
103 and ensures that file system checks are done when the file
104 system checker deems them necessary. <literal>force</literal>
105 unconditionally results in full file system checks.
106 <literal>skip</literal> skips any file system
107 checks.</para></listitem>
108 </varlistentry>
109
110 <varlistentry>
111 <term><varname>fsck.repair=</varname></term>
112
113 <listitem><para>One of <literal>preen</literal>,
114 <literal>yes</literal>, <literal>no</literal>. Controls the
115 mode of operation. The default is <literal>preen</literal>,
116 and will automatically repair problems that can be safely
117 fixed. <literal>yes</literal> will answer yes to all
118 questions by fsck and <literal>no</literal> will answer no to
119 all questions. </para></listitem>
120 </varlistentry>
121 </variablelist>
122 </refsect1>
123
124 <refsect1>
125 <title>See Also</title>
126 <para>
127 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
128 <citerefentry project='man-pages'><refentrytitle>fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
129 <citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
130 <citerefentry project='man-pages'><refentrytitle>fsck.btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
131 <citerefentry project='man-pages'><refentrytitle>fsck.cramfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
132 <citerefentry project='man-pages'><refentrytitle>fsck.ext4</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
133 <citerefentry project='man-pages'><refentrytitle>fsck.fat</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
134 <citerefentry project='man-pages'><refentrytitle>fsck.hfsplus</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
135 <citerefentry project='man-pages'><refentrytitle>fsck.minix</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
136 <citerefentry project='man-pages'><refentrytitle>fsck.ntfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
137 <citerefentry project='man-pages'><refentrytitle>fsck.xfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
138 </para>
139 </refsect1>
140
141 </refentry>