Date: Wed, 15 Sep 2010 12:10:18 +0200 From: Polytropon <freebsd@edvax.de> To: "Remko Lodder" <remko@elvandar.org> Cc: yuri@rawbw.com, freebsd-questions@freebsd.org Subject: Re: How to prevent system to launch interactive fsck after improper shutdown and reboot? Message-ID: <20100915121018.a3a1f275.freebsd@edvax.de> In-Reply-To: <f960a527c77ce82553c2bc82dc8004fa.squirrel@www.jr-hosting.nl> References: <4C906AB2.3030004@rawbw.com> <f960a527c77ce82553c2bc82dc8004fa.squirrel@www.jr-hosting.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 15 Sep 2010 08:47:38 +0200, "Remko Lodder" <remko@elvandar.org> 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 background_fsck="YES" 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. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100915121018.a3a1f275.freebsd>