ALINK="#FF0000">

(?) There's More Than One Way To Detect It

TMT1WTDI: not just for perl hackers anymore

From Joydeep Bakshi

Answered By Rick Moen, Dave Bechtel, Heather Stern

(!) [Heather] All this is in response to last month's Help Wanted #1

(?) 1) kudzu is the DEFAULT H/W detection tool in RH & harddrake in MDK. is there anything in debian?

(!) [Rick] As usual, the Debian answer is "Sure, which ones do you want?"
discover
Hardware identification system (thank you, Progeny Systems, Inc.), for various PCI, PCMCIA, and USB devices.
(!) [Dave]
apt-get update; apt-get install discover

(' apt-cache search discover ': )
discover - hardware identification system
discover-data - hardware lists for libdiscover1
libdiscover-dev - hardware identification library development files
libdiscover1 - hardware identification library
(!) [Heather] Worthwhile to also search on the words "detect" and "config" and "cfg" since many of the configurators or their helper apps have those words in their package names.

(?) discover only detects the h/w, but kudzu does one task extra that is it also configure the h/w. do u have any info. whether the latest version of discover do this auto-config. ? ( I am in debian 3.0).

(!) [Rick] I'm unclear on what you mean by "configure the hardware". Discover scans the PCI, USB, IDE, PCMCIA, and SCSI buses. (Optionally, it scans ISA devices, and the parallel and serial ports.) It looks (by default) for all of these hardware types at boot time: bridge cdrom disk ethernet ide scsi sound usb video. Based on those probes, it does appropriate insmods and resetting of some device symlinks.
What problem are you trying to solve?
(!) [Heather] For many people there's a bit of a difference between "the machine notices the hardware" and "my apps which want to use a given piece of hardware work without me having to touch them." In fact, finishing up the magic that makes the second part happen is the province of various apps that help configure XFree86 (SaX2/SuSE, Xconfigurator/RedHat, XF86Setup and their kindred) - some of which are better at having that magical "just works" feeling than others. Others are surely called on by the fancier installation systems too. Thus Rick has a considerable list below.
For ide, scsi, cdrom it all seems rather simple; either the drives work, or they don't. I haven't seen any distros auto-detect that I have a cd burner and do any extra work for that, though.
PCMCIA and USB are both environments that are well aware of the hot swapping uses they're put to - generally once your cardbus bridge and usb hub types are detected everything else goes well. or your device is too new to have a driver for its part of the puzzle. You must load up (or have automatically loaded by runlevels) the userland half of the sypport, though. (package names: pcmcia-cs, usbmgr)
There are apps to configure X and one can hope that svgalib "just works" on its own since it has some effort to video detection built-in. If you don't like what you get, try using a framebuffer enabled kernel, then tell X to use the framebuffer device - slower, but darn near guaranteed to work. svgalib will spot your framebuffer and use it. My favorite svgalib app is zgv, and there are some games that use it too.
I know of no app which is sufficiently telepathic to decide what your network addresses should be, the first time through. However, if you're a mobile user, there are a number of apps that you can train to look for your few favorite hosting gateways and configure the rest magically from there, using data you gave them ahead of time. PCMCIA schemes can also be used to handle this.
(!) [Rick]
kudzu, kudzu-vesa
Hardware-probing tool (thank you, Red Hat Software, Inc.) intended to be run at boot time. Requires hwdata package. kudzu-vesa is the VBE/DDC stuff for autodetecting monitor characteristics.
mdetect
Mouse device autodetection tool. If present, it will be used to aid XFree86 configuration tools.
printtool
Autodetection of printers and PPD support, via an enhanced version of Red Hat Software's Tk-based printtool. Requires the pconf-detect command-line utility for detecting parallel-port, USB, and network-connected printers (which can be installed separately as package pconf-detect).
read-edid
Hardware information-gathering tool for VESA PnP monitors. If present, it will be used to aid XFree86 configuration tools.
(!) [Heather] Used alone, it's an extremely weird way to ask the monitor what its preferred modelines are. Provided your monitor is bright enough to respond with an EDID block, the results can then be used to prepare an optimum X configuration. I say "be used" for this purpose because the results are very raw and you really want one of the apps that configure X to deal with this headache for you. Trust me - I've used it directly a few times.
(!) [Rick]
sndconfig
Sound configuration (thank you, Red Hat Software, Inc.), using isapnp detection. Requires kernel with OSS sound modules. Uses kudzu, aumix, and sox.
(!) [Dave] BTW, Knoppix also has excellent detection, and is also free and Debian-based: ftp://ftp.uni-kl.de/pub/linux/knoppix
(!) [Heather] Personally I found his sound configuration to be the best I've encountered; SuSE does a pretty good job if your card is supported under ALSA.
When you decide to roll your own kernel, it's critical to doublecheck which of the three available methods for sound setup you're using, so that you can compile the right modules in - ALSA, OSS, or kernel-native drivers. Debian's make-kpkg facility makes keeping extra packages that depend directly on kernel parts - like pcmcia and alsa - able to keep in sync with your customizations, by making it easy for you to prepare the modules .deb file to go with your new kernel.
(!) [Rick]
hotplug
USB/PCI device hotplugging support, and network autoconfig.
nictools-nopci
Diagnostic and setup tools for many non-PCI ethernet cards
nictools-pci
Diagnostic and setup tools for many PCI ethernet cards.
mii-diag
"A little tool to manipulate network cards" (examines and sets the MII registers of network cards).

(?) 2) I have installed kudzu in debian 3.0 , but it is not running as a service. it needs to execute the command kudzu manually.

(!) [Rick] No, pretty much the same thing in both cases. You're just used to seeing it run automatically via a System V init script in Red Hat. If you'd like it to be done likewise in Debian, copy /etc/init.d/skeleton to /etc/init.d/kudzu and modify it to do kudzu stuff. Then, use update-rc.d to populate the /etc/rc?.d/ runlevel directories.

(?) Finally the exact solution. I was searching 4 this looong. Rick, can't understand howto give u thanks. take care.

(?) moreover it couldn't detect my epson C21SX printer. but under MDK 9.0 kudzu detected the printer .

(!) [Heather] Perhaps it helpfully informed you what it used to get the printer going? Many of the rpm based systems are using CUPS as their print spooler; it's a little smoother under cups than some of its competitors, to have it auto-configure printers by determining what weird driver they need under the hood. My own fancy Epson color printer needed gimp-print, which I used the linuxprinting.org "foomatic" entries to link into my boring little lpd environment happily. Some printers are supported directly by ghostscript... which you will need anyway, since many GUI apps produce postscript within their "print" or "print to file" features.
(!) [Rick] Would that be an Epson Stylus C21SX? I can't find anything quite like that name listed at:
http://www.linuxprinting.org/printer_list.cgi?make=Epson
I would guess this must be a really new, low-end inkjet printer.
The version of kudzu (and hwdata) you have in Debian's stable branch (3.0) is probably a bit old. That's an inherent part of what you always get on the stable branch. If you want versions that are a bit closer to the cutting edge, you might want to switch to the "testing" branch, which is currently the one named "sarge". To do that, edit /etc/apt/sources.list like this:
deb http://http.us.debian.org/debian testing main contrib non-free
deb http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free
deb http://security.debian.org testing/updates main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free
Then, do "apt-get update && apt-get dist-upgrade". Hilarity ensues. ;->
(OK, I'll be nice: This takes you off Debian-stable and onto a branch with a lower commitment on behalf the Debian project to keep everything rock-solid, let alone security-updated. But you might like it.)

(?) a nice discussion. thanks a lot.

(!) [Rick] All of those information items are now in my cumulative Debian Tips collection, http://linuxmafia.com/debian/tips . (Pardon the dust.)

(?) ok, thanks a lot. u have clarified evrything very well. now I must not have any prob. regarding auto-detection in deb..

Great site !

(!) [Heather] For anyone looking at this and thinking "Oy, I don't already have debian installed, can I avoid this headache?" - Yes, you probably can, for a price. While debian users from both commercial and homegrown computing environments alike get the great upgrade system, this is where getting one of the commercial variants of Debian can be worth the bucks for some people. Note that commercial distros usually come with a bunch of software which is definitely not free - and not legal to copy for your pals. How easy they make it to seperate out what you could freely tweak, rewrite, or give away varies widely.
Libranet
http://www.libranet.com
Canadian company, text based installer based on but just a little more tuned up than the generic debian one. Installs about a 600 MB "base" that's very usable then offers to add some worthwhile software kits on your first boot.
Xandros
http://www.xandros.com
The current bearer of the torch that Corel Linux first lit. Reviews about it sing its newbie-friendly praises.
Lindows
http://www.lindows.com
Mostly arriving pre-installed in really cheap Linux machines near you in stores that you just wouldn't think of as computer shops. But it runs MSwin software out of the box too.
Progeny
http://www.progenylinux.com
More into offering professional services for your corporate or perhaps even industrial Linux needs than particularly a distribution anymore, they committed their installer program to the auspices of the Debian project. So it should be possible for someone to whip up install discs that use that instead of the usual geek-friendly textmenu installer.
If you find any old Corel Linux or Stormix discs lying around, they'll make an okay installer, provided your video card setup is old enough for them to deal with. After they succeed you'll want to poke around, see what they autodetected, takes some notes, then upgrade the poor beasties to current Debian.
In a slightly less commercial vein,
Knoppix
http://www.knopper.net/knoppix
[Base page in German, multiple languages available] while not strictly designed as a distro for people to install, has great hardware detection in its own accord, and a crude installer program available. At minimum, you can boot from its CD, play around a bit, and take notes now that it has detected and configured itself. A runs-from-CD distribution. If you can't take the hit from downloading a 700 MB CD all at once - it takes hours and hours on my link, and I'm faster than most modems - he lists a few places that will sell a recent disc and ship it to you.
Good-Day GNU-Linux
http://ggl.good-day.net
LWN's pointer went stale but this is where it moved to; the company produced sylpheed and has some interesting things bundled in this. It also looks like they preload notebooks, but I can't read japanese to tell you more.
And of course the usual Debian installer discs.
Anytime you can ask a manufacturer to preload linux - even if you plan to replace it with another flavor - let them. You will tell them that you're a Linux and not a Windows user, and you'll get to look at the preconfiguration they put in. If they had to write any custom drivers, you can preserve them for your new installation. Likewise whatever time they put into the config files.
There's a stack more at the LWN Distributions page (http://old.lwn.net/Distributions) if you search on the word Debian, although many are localize, some are specialty distros, and a few are based on older forms of the distro.


Copyright © 2003
Copying license http://www.linuxgazette.net/copying.html
Published in Issue 88 of Linux Gazette, March 2003
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/


[ Table Of Contents ][ Answer Guy Current Index ] greetings   Meet the Gang   1   2   3 [ Index of Past Answers ]