forcefsck on booting stage

Adrian Penisoara ady at freebsd.ady.ro
Mon Jul 28 16:39:29 UTC 2008


Hi,

On Mon, Jul 28, 2008 at 4:32 PM, RW <fbsd06 at mlists.homeunix.com> wrote:

> On Mon, 28 Jul 2008 15:10:11 +0200
> Marc L__rner <marc.loerner at hob.de> wrote:
>
> > On Monday 28 July 2008 15:00, Jeremy Chadwick wrote:
> > > On Mon, Jul 28, 2008 at 04:11:49PM +0400, sam wrote:
> > > > Hello,
> > > >
> > > > How to make 'fsck -f' on booting stage of remote system?
> > >
> > > I believe by setting background_fsck="no" in /etc/rc.conf?  That's
> > > the only way I know of, besides booting single user and doing it
> > > manually.
> >
> > Doesn't this only disable background fsck support?
> > By creating file "/forcefsck" you can force an fsck at next reboot,
> > because some scripts test for existence.
>
> That's in linux AFAIK, but it would be fairly straightforward to
> modify /etc/rc.d/fsck to get that behaviour though.
>
> fsck -f is interactive, so you would want to add the -y option to
> prevent its hanging waiting for console input.
>

Would "fsck -fy" in /etc/rc.early satisfy your needs ? Not sure how much
longer it will be supported this method...

Regards,
Adrian.


More information about the freebsd-hackers mailing list