[systemd-devel] [PATCH] make fsck fix mode a kernel command line option

Lennart Poettering lennart at poettering.net
Mon Sep 9 17:41:33 PDT 2013


On Fri, 06.09.13 14:53, Robert Schiele (rschiele at gmail.com) wrote:

> In some situations it is desirable to set the fsck fix level from "-a"
> to "-y".  This for instance might be a reasonable decision on embedded
> systems where a user dealing with emergency mode is not available and
> we prefer the risk of destroying the file system by an incorrect fsck
> action over the risk of hanging in unhandled file system
> inconsistencies that could be fixed.
> 
> The fix introduces a new kernel command line option
> "fsck.fix=auto|yes|no" with "auto" being the default and thus not
> changing default behavior to previous behavior. "auto" maps to the
> fsck option "-a", "yes" maps to "-y", and "no" maps to "-n".
> ---
> I was choosing the interface described above since according to my
> observation this seems closest to how interfaces were constructed in
> this area before.  I am open to suggestions though for better
> interfaces if someone comes up with one.  Additionally I was not sure
> whether the "no" option is practically useful but since it doesn't
> seem completely out of place for me I included it for completeness.

Hmm, if I get this right, then you'd set this for your images
unconditionally? In that case it probably shouldn't be a kernel cmdline
parameter but rather some kind of configuration file setting
somewhere...

We generally try to empty out the kernel cmdline, so that it doesn't
need any params by default, and is solely used for one-time overrides by
the admin. 

Before systemd, was there any way to trigger this behaviour via
configuration (be it kernel cmdline or configuration file)? 

One possibility might be to add a new extended mount option (i.e. as
listed in fstab's fourth column) that systemd
would interpret. i.e. "x-systemd.yesfsck" or so. That sounds much nicer,
since it would be naturally persistent, and per-mount point.

Opinions?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list