Question about forcing fsck at boottime

manish jain invalid.pointer at
Tue Mar 31 03:28:47 PDT 2009

Bruce Cran wrote:
> On Tue, 31 Mar 2009 11:35:11 +0530
> manish jain <invalid.pointer at> wrote:
>> Hi,
>> I am migrating from Linux and am still learning the basics of
>> FreeBSD. One thing that I would to carry over from my Linux days is
>> to force an fsck on all filesystems at system startup. On Linux, this
>> was simply a matter of editing /etc/rc.sysinit. Things seem a bit
>> more complicated in the BSD world. Can somebody please point me in
>> the right direction ?
> I found this from a post last year:
> echo '/sbin/fsck -y -f' >> /etc/rc.early

Hi Bruce/Everyone else,

Thanks for the rc.early tip.

BTW, a lot of people who posted replies thought I was not aware that a 
preen is always executed at startup. When I said I wanted to force an 
fsck, I meant 'fsck -fy'. As for background checks, they are - in my 
opinion - a real nightmare. Even though I am just a learner on FreeBSD 
still, I can assure anyone, putting background_fsck="NO" into your 
rc.conf is one of the best things you can do.

As for the reason why I want to force fsck is that it has now happened 3 
timed that, after a clean and proper shutdown - with no foreign 
filesystems mounted, FreeBSD has complained on system restart (twice on 
a 5.x distribution I had briefly used and now once on 7.1) that / was 
not properly unmounted. Having bgfsck enabled is like inviting a dragon 
to dinner when this happens.

Thank you and Regards
Manish Jain
invalid.pointer at

NB : Laast year I kudn't spell Software Engineer. Now I are won.

More information about the freebsd-questions mailing list