3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 This file is part of systemd.
7 Copyright 2012 Lennart Poettering
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.
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.
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/>.
22 <refentry id="systemd-fsck@.service">
25 <title>systemd-fsck@.service</title>
26 <productname>systemd</productname>
30 <contrib>Developer</contrib>
31 <firstname>Lennart</firstname>
32 <surname>Poettering</surname>
33 <email>lennart@poettering.net</email>
39 <refentrytitle>systemd-fsck@.service</refentrytitle>
40 <manvolnum>8</manvolnum>
44 <refname>systemd-fsck@.service</refname>
45 <refname>systemd-fsck-root.service</refname>
46 <refname>systemd-fsck</refname>
47 <refpurpose>File system checker logic</refpurpose>
51 <para><filename>systemd-fsck@.service</filename></para>
52 <para><filename>systemd-fsck-root.service</filename></para>
53 <para><filename>/usr/lib/systemd/systemd-fsck</filename></para>
57 <title>Description</title>
59 <para><filename>systemd-fsck@.service</filename> and
60 <filename>systemd-fsck-root.service</filename> are
61 services responsible for file system checks. They are
62 instantiated for each device that is configured for
64 <filename>systemd-fsck-root.service</filename> is
65 responsible for file system checks on the root file
66 system, but in only if the root filesystem wasn't
67 checked in the initramfs.
68 <filename>systemd-fsck@.service</filename> is used for
69 all other file systems and for the root file system in
72 <para>Those services are started at boot if
73 <option>passno</option> in
74 <filename>/etc/fstab</filename> for the file system is
75 set to a value greater than zero. The file system
76 check for root is performed before the other file
77 systems. Other file systems may be checked in
78 parallel, except when they are one the same rotating
81 <para><filename>systemd-fsck</filename> does not know
82 any details about specific filesystems, and simply
83 executes file system checkers specific to each
84 filesystem type (<filename>/sbin/fsck.*</filename>).
85 This helper will decide if the filesystem should
86 actually be checked based on the time since last
87 check, number of mounts, unclean unmount, etc.</para>
89 <para><filename>systemd-fsck</filename> will forward
90 file system checking progress to the console. If a
91 file system check fails for a service without
92 <option>nofail</option>, emergency mode is activated,
94 <filename>emergency.target</filename>.</para>
98 <title>Kernel Command Line</title>
100 <para><filename>systemd-fsck</filename> understands
101 one kernel command line parameter:</para>
103 <variablelist class='kernel-commandline-options'>
105 <term><varname>fsck.mode=</varname></term>
107 <listitem><para>One of
108 <literal>auto</literal>,
109 <literal>force</literal>,
110 <literal>skip</literal>. Controls the
111 mode of operation. The default is
112 <literal>auto</literal>, and ensures
113 that file system checks are done when
114 the file system checker deems them
115 necessary. <literal>force</literal>
116 unconditionally results in full file
117 system checks. <literal>skip</literal>
118 skips any file system
119 checks.</para></listitem>
123 <term><varname>fsck.repair=</varname></term>
125 <listitem><para>One of
126 <literal>preen</literal>,
127 <literal>yes</literal>,
128 <literal>no</literal>. Controls the
129 mode of operation. The default is <literal>
130 preen</literal>, and will automatically repair
131 problems that can be safely fixed. <literal>yes
132 </literal> will answer yes to all questions by
133 fsck and <literal>no</literal> will answer no to
141 <title>See Also</title>
143 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
144 <citerefentry><refentrytitle>fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
145 <citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
146 <citerefentry><refentrytitle>fsck.btrfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
147 <citerefentry><refentrytitle>fsck.cramfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
148 <citerefentry><refentrytitle>fsck.ext4</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
149 <citerefentry><refentrytitle>fsck.fat</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
150 <citerefentry><refentrytitle>fsck.hfsplus</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
151 <citerefentry><refentrytitle>fsck.minix</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
152 <citerefentry><refentrytitle>fsck.ntfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
153 <citerefentry><refentrytitle>fsck.xfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>