Hi,
First, some context. On can use either mkinitcpio
or systemd
to fsck
the root file system at boot time.
(see fsck - ArchWiki)
When using systemd
, fsck.repair
can be set to have systemd-fsck
performs repairs and/or optimizations.
(see systemd-fsck@.service(8) — Arch manual pages)
With fsck.repair=preen
, the performed action is e2fsck -p
.
(see e2fsck(8) — Arch manual pages)
With fsck.repair=yes
, the performed action is e2fsck -y
.
(see e2fsck(8) — Arch manual pages)
However, fsck.repair
is only for systemd
.
(see Fsck systemd console fehler - #2 by megavolt)
From the previous link, translated with Google Translate, as the source is not in English:
For security reasons, some repairs are not performed automatically. But to force them (ONLY WITH SYSTEMD), use the following kernel parameters:
fsck.mode=force
fsck.repair=yes
The Arch Wiki is ambiguous on the subject as both mkinitcpio
and systemd
are mentioned in the parent section (section 1. in the next link) but only a solution mentioning systemd
(ie. fsck.repair
) is provided (without an equivalent when using mkinitcpio
).
(see fsck - ArchWiki)
Then, my question is the following:
How to do e2fsck -p
or e2fsck -y
for fsck
run at boot time when using mkinitcpio
instead of systemd
?
Of note, an Arch user seems to have either the same question (fsck.repair
is only for systemd
, not mkinitcpio
) or a related issue (fsck.repair
does not perform optimizations with either preen
or yes
). Either option is possible as the thread is unfinished.
(see fsck.repair doesn't repair all problems / System Administration / Arch Linux Forums)
NB: Links are not clickable because as a new user I cannot have so many links…
Thanks