On Thu, Jan 18, 2018 at 12:13:54PM +0100, Otto Moerbeek wrote:
> On Thu, Jan 18, 2018 at 12:12:39PM +0200, Artturi Alm wrote:
>
> > Hi,
> >
> > i think i've never answered "n" to fsck, so to me the lack of -y does
> > mean unnecessary work/boards/VMs left waiting for the F..
> >
> > i would use something like this if it was there:
> >
> > diff --git a/etc/rc b/etc/rc
> > index c88e13ce7ab..e3a269be818 100644
> > --- a/etc/rc
> > +++ b/etc/rc
> > @@ -349,7 +349,11 @@ if [[ -e /fastboot ]]; then
> > echo "Fast boot: skipping disk checks."
> > elif [[ $1 == autoboot ]]; then
> > echo "Automatic boot in progress: starting file system checks."
> > - do_fsck
> > + if [[ -e /failboot ]]; then
> > + do_fsck
> > + else
> > + do_fsck -y
> > + fi
> > fi
> >
> > # From now on, allow user to interrupt (^C) the boot process.
> >
> >
> > but the one below is what i believe should fit&go w/modern sane defaults
> > (think terabytes).
> > no man page diffs, as i guess this won't fly (w/o bikeshedding atleast).
> > -Artturi
> >
> >
> > diff --git a/etc/rc b/etc/rc
> > index c88e13ce7ab..e3a269be818 100644
> > --- a/etc/rc
> > +++ b/etc/rc
> > @@ -349,7 +349,11 @@ if [[ -e /fastboot ]]; then
> > echo "Fast boot: skipping disk checks."
> > elif [[ $1 == autoboot ]]; then
> > echo "Automatic boot in progress: starting file system checks."
> > - do_fsck
> > + if [[ -e /failboot ]]; then
> > + do_fsck
> > + else
> > + do_fsck -y
> > + fi
> > fi
> >
> > # From now on, allow user to interrupt (^C) the boot process.
>
> This has come up before and is not ok.
> It is dangerous becuase it might make things worse.
>
> I want to have a chanche to e.g. save an image or chack cabling.
>
> Again, no.
>
> -Otto
Ok, anyway the first diff was supposed to be this:
diff --git a/etc/rc b/etc/rc
index c88e13ce7ab..c8a25da7b42 100644
--- a/etc/rc
+++ b/etc/rc
@@ -349,7 +349,11 @@ if [[ -e /fastboot ]]; then
echo "Fast boot: skipping disk checks."
elif [[ $1 == autoboot ]]; then
echo "Automatic boot in progress: starting file system checks."
- do_fsck
+ if [[ -e /forceboot ]]; then
+ do_fsck -y
+ else
+ do_fsck
+ fi
fi
# From now on, allow user to interrupt (^C) the boot process.
so only giving user the choice of not editing /etc/rc.
fwiw. i heard FreeBSD has variable named "fsck_y_enable",
but i'm useless w/shell scripts, so i chose above..
-Artturi