How to fsck -CURRENT on next reboot [ext2fs]

Matthias Andree matthias.andree at
Tue Jan 27 16:16:54 PST 2004

On Tue, 27 Jan 2004, Theodore Ts'o wrote:

> > I am wondering how to deal with /etc/fstab. I can of course add a
> > symlink from /sbin/fsck_ext2fs to %D/sbin/e2fsck, so I can type "fsck
> > /linux" and have the file system checked, but this will not work when
> > someone sets the Pass# column in fsck to something non-zero.
> But that's what's supposed to happen when someone sets the Pass# to
> zero, yes?  Or is the problem that in the past, /sbin/fsck_ext2fs
> wasn't available, so some people may have put zero into the column in
> order to prevent errors at boot time?

The problem is that traditionally, /usr was separate from /,
consequentially, /usr is not mounted at the time /etc/fstab-triggered
checks are running. OTOH, FreeBSD ports install into /usr/local, I can
either violate port packaging policies and install everything into /sbin
and /lib (I'd like to avoid that) or symlink true to /sbin/fsck_ext2fs
and run an awk script from /usr/local/etc/rc.d/*

> Can BSD packages in the ports system allowed prompt the user upon
> installation/upgrade?  If so the obvious thing to do is to ask the
> user, when they install the new version of e2fsprogs, whether they
> want the pass # in /etc/fstab to be reset to some sane value, and then
> have the postinstall script do that.

That's possible. Thanks for sharing your idea.

Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95

More information about the freebsd-current mailing list