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

Re: Howto implement device detection without thrashing



On Wed, Mar 17, 1999 at 05:12:03PM -0500, Randolph Chung wrote:
> > 2. Have a small file of, say, 32KByte. Use it as wrap-around tape, e.g. we
> > start writing at the beginning of the file if we reach the end. Combined with
> > 1. we will not have to update the filesystem each time we write something and
> > the writes are very localized. This way even the hard disk cache will help us
> > to avoid a slow down. This cache is not influenced by the system crashing.
> 
> it's a good idea.... for that matter, since we know the ordering of tests,
> even writing the last test that was conducted successfully might be enough
> info to recover, right? what am i missing?

You're missing that you might have TWO (or more) failures which cause a
system crash.

Say for a moment that we create three files durring the detection phase
(and note that there's another issue---where do we create these file?)
The first file is what contains the current device we're looking at. 
Its purpose is to exist if we crash and have to recover the system.  The
next file contains a list of found hardware.  It's written to as we need
to write to it.  The third file is a file containing known bad to test
for hardware.  It's added to after a crash and should be kept in a format
can be edited later if you say ... add the card in question for example!


Other issues...  Where do we put this data?  Durring the installation we
can't just put it on the first disk we find like windoze will because
that disk may be the one the user decides to delete with fdisk!  The
floppy maybe?  We would then have to know which device contains the
floppy and we wouldn't be able to do a 100% floppy-less installation.

Is it possible to figure out what the boot device was?  Unfortunately I
think it's not because the initrd is loaded before the kernel.  We also
cannot use nvram on intel platform.  The floppy seems like it might work
unless we aren't using one(!)  I don't have a good answer yet but I'm
sure beginning to admire the problem!


I think we need to look into devfs.  Only devices that exist actually are
in /dev, I think it's a good thing if we're going to be trying to detect
hardware.  It's also been said that we should look into Tom's PnP
drivers, also a good thing.  I'd like to hear a few more opinions from
the boot floppies people on what's been suggested already.  This is
really their territory we're stepping into.

--
Joseph Carter <knghtbrd@debian.org>            Debian GNU/Linux developer
PGP: E8D68481E3A8BB77 8EE22996C9445FBE            The Source Comes First!
-------------------------------------------------------------------------
Microsoft DNS service terminates abnormally when it recieves a response
to a DNS query that was never made.  Fix Information: Run your DNS
service on a different platform.
        -- BugTraq

Attachment: pgpL6o6s_hoS8.pgp
Description: PGP signature


Reply to: