On Sun, Jun 28, 2009 at 09:21:16AM +1000, Aaron Mason wrote:
> Hi,
>
> I made a slight change to the /etc/rc file that looks for the file
> /etc/force-fsck and if found, forces a check. The patch follows:
Can you explain why you want this?
-Otto
>
> --- /etc/rc.old Sat Jun 27 13:33:51 2009
> +++ /etc/rc Sat Jun 27 14:19:06 2009
> @@ -202,7 +202,11 @@
> echo "Fast boot: skipping disk checks."
> elif [ X"$1" = X"autoboot" ]; then
> echo "Automatic boot in progress: starting file system checks."
> - fsck -p
> + if [ -f /etc/force-fsck ]; then
> + fsck -pf
> + else
> + fsck -p
> + fi
> case $? in
> 0)
> ;;
> @@ -240,6 +244,7 @@
> mount -a -t nonfs,vnd
> mount -uw / # root on nfs requires this, others aren't hurt
> rm -f /fastboot # XXX (root now writeable)
> +rm -f /etc/force-fsck # same as above
>
> random_seed
>
>
>
> On Sun, Jun 28, 2009 at 8:11 AM, Joachim
> Schipper<[email protected]> wrote:
> > On Sat, Jun 27, 2009 at 08:37:44PM +0100, Mikolaj Kucharski wrote:
> >> Is it possible?
> >
> > There is no /forcefsck mechanism for OpenBSD as there is for Linux, but
> > fsck does take a -f option to force fsck, even if the filesystem is
> > thought to be clean.
> >
> > You can boot to single user mode ("boot -s") to do this. There are some
> > complications if this is not possible (e.g. a server in a dedicated
> > datacenter); are you in that situation? In other words, what are you
> > *really* trying to do?
> >
> > Joachim
> >
> >
>
>
>
> --
> Aaron Mason - Programmer, open source addict
> - Oh, why does everything I whip leave me?