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

Re: Discovering what devices are already detected by kernel



>>>>> "Ben" == Ben Armstrong <synrg@sanctuary.nslug.ns.ca> writes:

    Ben> I did a potato install demo to a couple of dozen people, mostly newbies,
    Ben> at our LUG meeting yesterday.  It was a success!  People were impressed by
    Ben> how simple it was to just follow the dboostrap dialog and mostly just use
    Ben> defaults.  And it went off without any glitches ... well, almost ...

 Good to hear.

    Ben> It wasn't obvious that the ne2k-pci was detected by the kernel, especially
    Ben> since all the kernel messages flew by while we (the presenters) were
    Ben> distracted by explaining the install process and what was next.  Well, we
    Ben> got to the "configure modules" step and were baffled that "ne" appeared in
    Ben> the list, but not "ne2k-pci".  We hypothesized that the "compact"  drivers
    Ben> disk didn't contain it, and that we were supposed to use "ne"  instead. 
    Ben> Using "ne" gave us resource conflicts: "device already configured" or some
    Ben> such. 

 We already do some device detection, but not a lot.  It's used only
 to limit the choices on the choose medium menu to devices that
 exist...  for instance, if there's no CD-ROM, then "cdrom" isn't
 offered, if there's no network interface, "nfs" and "netfetch" are
 not offered.  After a NIC driver is inserted, "netfetch" shows up,
 and after "nfs" is available then it shows up.  The choose medium
 menu I'm referring to is the one just after you select install kernel
 and modules or install base, where it offers the choice of
 installation media.

 We have functions for "is there a network interface", "is filesystem
 X a supported filesystem", and "does this machine have a cdrom".  I
 haven't done floppy drive detection yet; I think I'll try and hack
 that this week.  If it turns out to be reliable and doesn't provoke
 the kernel to scribble all over the interface, then it can go in.
 Then fd1 won't be offered on the menu unless it actually exists.

    Ben> After poking about with /proc/pci and seeing that yes, the devices is
    Ben> there, and the io port was listed, we went back to try to specify "io="
    Ben> when installing the module.  Still no go.  Aha!  So let's look at dmesg
    Ben> ... doh!  There it is.  We should have known that.  After recovering our
    Ben> dignity, we promised that we'd ask the boot floppy folks if this process
    Ben> couldn't be made a bit easier for newbies, who don't know to look in
    Ben> dmesg, nor how to interpret what is there.

 `dmesg' in a dialog would be an easy way out...  Though I'd rather
 they read the fine manual and it told them how to get to vt2 to type
 "dmesg | more" there.  That puts them one baby step closer to being
 Linux users.

    Ben> I figure there needs to be a step before the modules config to list stuff
    Ben> already detected by the kernel.

 Like when you select modules config, a dialog pops up with a list in
 it?  And make the same listing available from the main menu, right
 below the "display partition table" one.  The contents of the
 detected devices display will need to be recomputed each time it's
 shown so that if you insert a module and thus create a new device, it
 will be shown.

    Ben> Unfortunately, the output from dmesg is very hard to grok in a general
    Ben> way.  Perhaps a better way to approach it is to summarize it from
    Ben> /var/log/dmesg, /proc/devices, /proc/interrupts, and /proc/ioports (or
    Ben> just list these verbatim).  Something like: 

    Ben> "The linux kernel successfully detected and configured the following
    Ben> devices, so you will not need to configure modules for them:"

    Ben> I'd prefer something distilled from these sources rather than
    Ben> the just listing the files themselves.  If this step merely searched for:

    Ben> eth
    Ben> ide
    Ben> hd
    Ben> scsi
    Ben> sd
    Ben> ttyS

    Ben> that would probably suffice.  After a while, it could be made smarter to
    Ben> list other devices.  (You guys know better than I do what is actually in
    Ben> the boot-floppy kernel ... I never bothered to check.)

 There is a thing called `libdetect' and `lothar' that are for
 hardware detection.  A man has packaged it for Debian, and is seeking
 a sponsor pending becoming a registered developer.  I was going to
 download that today, but found I cannot; it says no route to host.
 I'll look for it elsewhere.

    Ben> So there you have it.  I'm not on this list, so please CC me in
    Ben> replies.  Is there something that can be done (presumably for woody)
    Ben> to make it easier for the newbie when they come to this step?

 Please feel free to join the list and assist us in our efforts!  Your
 feedback is very helpful.


Reply to: