]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-fsck@.service.xml
man: more hyperlinks and other fixes
[thirdparty/systemd.git] / man / systemd-fsck@.service.xml
CommitLineData
a32f224a
LP
1<?xml version="1.0"?>
2<!--*-nxml-*-->
3a54a157
ZJS
3<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
db9ecf05 5<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
4623eecb 6<refentry id="systemd-fsck@.service" xmlns:xi="http://www.w3.org/2001/XInclude">
a32f224a 7
798d3a52
ZJS
8 <refentryinfo>
9 <title>systemd-fsck@.service</title>
10 <productname>systemd</productname>
798d3a52
ZJS
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>systemd-fsck@.service</refentrytitle>
15 <manvolnum>8</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>systemd-fsck@.service</refname>
20 <refname>systemd-fsck-root.service</refname>
5e975053 21 <refname>systemd-fsck-usr.service</refname>
798d3a52
ZJS
22 <refname>systemd-fsck</refname>
23 <refpurpose>File system checker logic</refpurpose>
24 </refnamediv>
25
26 <refsynopsisdiv>
27 <para><filename>systemd-fsck@.service</filename></para>
28 <para><filename>systemd-fsck-root.service</filename></para>
5e975053 29 <para><filename>systemd-fsck-usr.service</filename></para>
12b42c76 30 <para><filename>/usr/lib/systemd/systemd-fsck</filename></para>
798d3a52
ZJS
31 </refsynopsisdiv>
32
33 <refsect1>
34 <title>Description</title>
35
5e975053
YW
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>
798d3a52 43
000680a6
AAF
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>
798d3a52
ZJS
49
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
a108fcba 53 (<filename>fsck.<replaceable>type</replaceable></filename>). These checkers will decide if
798d3a52
ZJS
54 the filesystem should actually be checked based on the time since
55 last check, number of mounts, unclean unmount, etc.</para>
56
5e975053 57 <para><filename>systemd-fsck-root.service</filename> and <filename>systemd-fsck-usr.service</filename>
bf63dadb
ZJS
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>
4b499063
SL
60 returns the "Filesystem errors left uncorrected" condition.</para>
61
62 <para><filename>systemd-fsck@.service</filename> will fail if
bf63dadb 63 <command>fsck</command> returns with either "System should reboot"
4b499063
SL
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>
798d3a52
ZJS
68 </refsect1>
69
70 <refsect1>
71 <title>Kernel Command Line</title>
72
bf63dadb 73 <para><command>systemd-fsck</command> understands these kernel
2dcf2a17 74 command line parameters:</para>
798d3a52
ZJS
75
76 <variablelist class='kernel-commandline-options'>
77 <varlistentry>
78 <term><varname>fsck.mode=</varname></term>
79
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
ec07c3c8
AK
87 checks.</para>
88
89 <xi:include href="version-info.xml" xpointer="v186"/></listitem>
798d3a52
ZJS
90 </varlistentry>
91
92 <varlistentry>
93 <term><varname>fsck.repair=</varname></term>
94
95 <listitem><para>One of <literal>preen</literal>,
96 <literal>yes</literal>, <literal>no</literal>. Controls the
2dcf2a17 97 mode of operation. The default is <literal>preen</literal>,
798d3a52 98 and will automatically repair problems that can be safely
2dcf2a17 99 fixed. <literal>yes</literal> will answer yes to all
798d3a52 100 questions by fsck and <literal>no</literal> will answer no to
ec07c3c8
AK
101 all questions. </para>
102
103 <xi:include href="version-info.xml" xpointer="v213"/></listitem>
798d3a52
ZJS
104 </varlistentry>
105 </variablelist>
106 </refsect1>
107
108 <refsect1>
109 <title>See Also</title>
110 <para>
111 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
a80170f5 112 <citerefentry project='man-pages'><refentrytitle>fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
798d3a52 113 <citerefentry><refentrytitle>systemd-quotacheck.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
a80170f5
DR
114 <citerefentry project='man-pages'><refentrytitle>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>
798d3a52
ZJS
122 </para>
123 </refsect1>
a32f224a
LP
124
125</refentry>