How to prevent system to launch interactive fsck after improper shutdown and reboot?

Polytropon freebsd at
Wed Sep 15 10:10:22 UTC 2010

On Wed, 15 Sep 2010 08:47:38 +0200, "Remko Lodder" <remko at> wrote:
> >> Almost every time after improper shutdown (poweroff) and reboot I get
> >> into interactive fsck.
> >>
> >> I am being asked whole bunch of questions to which I just have to answer
> >> Y (what are my other options?)
> >>
> >> Why drop user into interactive fsck if there is not much choice anyways?
> >> Is there a way to set it up the way it doesn't drop into interactive
> >> mode? Like answer 'Y' to all questions?
> >>
> >> Yuri
> I think this might do your trick:
> fsck_y_enable="NO"      # Set to YES to do fsck -y if the initial preen
> fails.
> fsck_y_flags=""         # Additional flags for fsck -y
> The reason for this to get interactively is because this  might messup
> with your filesystem, and you are the one responsible for your filesystem,
> not us or the autmated system. So in case you want to "play" with that,
> that's entirely up to you.
> In addition, I can imagine that companies (been there done it) do not want
> to fsck -y by default, this because of the mentioned potential corruption
> and dataloss.

Very important point.

As an addition, allow me to mention


as an entry in /etc/rc.conf. This will let the system boot up and perform
fsck checks while the system is running - running on a maybe defective or
inconsistent file system. This is dangerous, but possible. It utilizes a
snapshot mechanism which can cause further trouble (lost / emptyinodes
and disappearing subtrees of files).

Personally, if fsck requires YOUR attention, there's usually a reason for
this. The reason is possible data loss or file system corruption where YOU
take the responsibility of decision, not fsck. By default, fsck does not
do damaging, but under strange circumstances, it can happen. For example,
if you want to do a special kind of data recovery or forensic analysis on
a file system, you potentially DO NOT WANT fsck to assume "y" for all the
questions because that can make your job harder.

A common additional "y flag" is -f (means fsck -yf) to force all operations
suggested by fsck and confirming them.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list