[Pkg-sysvinit-devel] Bug#497575: Bug#497575: Bug#497575: initscripts: /etc/rcS.d/S30checkfs.sh starts very soon

Petter Reinholdtsen pere at hungry.com
Wed Sep 3 16:23:09 UTC 2008


[Noel David Torres Taño]
> That is what I did at first :) but I tried to create an (elegant)
> solution capable of being used by any people and not only for me
> while the background problem is addressed by "the experienced
> hackers". It's the way I understand I can give to "the community"
> something for all what I've received ;)

And know that it is much appreciated.  But your proposed solution will
only work for some machines, and slow down a lot of others.  I wish
there was a way to figure out if some disk are going to show up soon,
but as far as I know, there is none.  Perhaps a better way is to check
if the root device is available, and if not, wait a bit.  This way,
the boot will be more robust while still being quick in the common
case.

Something like

  while [ ! -f $rootdev ] ; do
    echo "missing root dev $rootdev"
    sleep1
  done

in front of the fsck call.  There should be a timeout or loop
counter to make sure it do not wait forever.

Or, perhaps the boot should be event based and fsck only called when
the event from the kernel for the given device arrive.  Then we get
another issue, which is to wait for the root file system to be mounted
before continuing.

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-sysvinit-devel mailing list