[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: making bootup fsck more user-friendly



On Sunday 15 June 2008 06:16, David wrote:
> Thanks for the continuing replies and suggestions.

> > Why not just run fsck manually (i.e. shutdown -RF now) whenever you
> > want.  If you do it frequently enough, you'll never hit the automatic
> > checking counter: you'll only get caught if you forget.  Set up cron to
> > send you an email reminder every week or something.
>
> This is a decent work-around. However, ideally I should be able to
> configure the scheduled fscks to run at a more conveniant time, and
> automatically, rather than having to work my own schedule around the
> needs of the PC.
>
> Another problem is that I don't know how to setup mail relaying on my
> workstation (so that mail from local accounts get queued, and then
> forwarded to my gmail account when I dial up to the internet). I'm not
> sure if it's worth the trouble to research and set that up :-)
>
> Finally, Exim MTA was setup by default on my PC, but I disabled it's
> init.d script. Reason: My PC is not connected to the internet a lot of
> the time, so I get a "MTA starting..." message that stalls the startup
> for a long time. I really hate long delays during startup :-) (see
> also: Apple Talk service installed by default. wth?)
  
  Now that you've admitted editing an init.d script, I can no longer
resist mentioning my rather involved and hack-ish solution.

  You could add code to the /etc/init.d/checkfs.sh 
and/or /etc/init.d/checkroot.sh scripts to check for a custom 
kernel argument, and "exit 0" if they find it.  
  These scripts run pretty early in rcS.d.  If you're lucky, 
/proc has already been mounted by the time they
run, and you can just grep /proc/cmdline for your argument.
(I *think* /proc is mounted by the initramfs, so it's available
to all the init scripts, but I'm not 100% sure.)

  You could then add your custom argument to the kernel boot line.
Make sure to use one that's unique, so it doesn't confuse the
other init scripts, like maybe "wizzardxfastboot" or something.

  Then, make a special stanza in /boot/grub/menu.lst that has
this argument.

  Then, when you want to boot up quickly and skip the fsck, you 
can just cursor-down to the appropriate line in the grub menu,
hit return, and you're away.

  This relies on a few things being true which I've only guessed
at -- you should have an initramfs, you need to be using grub, 
/proc has to be mounted in time as already mentioned, and it has
to be true that unrecognized kernel options are harmless, which 
I think is the case, although you need to watch out for scripts
which use the argument-count for nefarious purposes.  I'm not aware
of any, but you never know.

  If it works, this seems to solve your problem, if I've understood
it correctly.

				-- A.
-- 
Andrew Reid / reidac@bellatlantic.net


Reply to: