old-www/LDP/LG/issue88/tag/2.html

492 lines
20 KiB
HTML

<!--startcut ==============================================-->
<!-- *** BEGIN HTML header *** -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD>
<META NAME="generator" CONTENT="lgazmail v1.4G.d">
<TITLE>The Answer Gang 88: There's More Than One Way To Detect It</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000">
<!-- *** END HTML header *** -->
<!--endcut ==============================================-->
<!-- begin 2 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>There's More Than One Way To Detect It</H3>
<H4 ALIGN="center">TMT1WTDI: not just for perl hackers anymore</H4>
<p><strong>From Joydeep Bakshi
</strong></p>
<p></strong></p>
<!-- ::
There's More Than One Way To Detect It
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TMT1WTDI: not just for perl hackers anymore
:: -->
<p align="right"><strong>Answered By Rick Moen, Dave Bechtel, Heather Stern
</strong></p>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] All this is in response to last month's
<a href="../../issue87/lg_mail.html#wanted.1">Help Wanted #1</a>
</blockquote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
1) kudzu is the DEFAULT H/W detection tool in RH &amp; harddrake in MDK.
is there anything in debian?
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Rick]
As usual, the <A HREF="http://www.debian.org/">Debian</A> answer is "Sure, which ones do you want?"
</blockQuote>
<blockQuote><dl><dt>
discover
<dd>
Hardware identification system (thank you, Progeny Systems, Inc.),
for various PCI, PCMCIA, and USB devices.
</dl></blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Dave]
</blockQuote>
<blockquote><pre>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
</pre></blockquote>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [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.
</blockquote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
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).
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="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.
</blockQuote>
<blockQuote>
What problem are you trying to solve?
</blockQuote>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [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.
</blockquote>
<blockquote>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.
</blockquote>
<blockquote>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)
</blockquote>
<blockquote>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.
</blockquote>
<blockquote>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.
</blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Rick]
<dl><dt>
kudzu, kudzu-vesa
<dd>
Hardware-probing tool (thank you, <A HREF="http://www.redhat.com/">Red Hat</A> Software, Inc.) intended to
be run at boot time. Requires hwdata package. kudzu-vesa is the
VBE/DDC stuff for autodetecting monitor characteristics.
</dl></blockQuote>
<blockQuote><dl><dt>
mdetect
<dd>
Mouse device autodetection tool. If present, it will be used to aid
XFree86 configuration tools.
</dl></blockQuote>
<blockQuote><dl><dt>
printtool
<dd>
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).
</dl></blockQuote>
<blockQuote><dl><dt>
read-edid
<dd>
Hardware information-gathering tool for VESA PnP monitors. If
present, it will be used to aid XFree86 configuration tools.
</dl></blockQuote>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [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.
</blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Rick]
<dl><dt>
sndconfig
<dd>
Sound configuration (thank you, Red Hat Software, Inc.), using isapnp
detection. Requires kernel with OSS sound modules. Uses kudzu,
aumix, and sox.
</dl></blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Dave]
BTW, Knoppix also has excellent detection, and is also free and
Debian-based:
<A HREF="ftp://ftp.uni-kl.de/pub/linux/knoppix"
>ftp://ftp.uni-kl.de/pub/linux/knoppix</A>
</blockQuote>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] Personally I found his sound configuration to be the best I've
encountered; SuSE does a pretty good job <EM>if</EM> your card is supported
under ALSA.
</blockquote>
<blockquote>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.
</blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Rick]
<dl><dt>
hotplug
<dd>
USB/PCI device hotplugging support, and network autoconfig.
</dl></blockQuote>
<blockQuote><dl><dt>
nictools-nopci
<dd>
Diagnostic and setup tools for many non-PCI ethernet cards
</dl></blockQuote>
<blockQuote><dl><dt>
nictools-pci
<dd>
Diagnostic and setup tools for many PCI ethernet cards.
</dl></blockQuote>
<blockQuote><dl><dt>
mii-diag
<dd>
"A little tool to manipulate network cards" (examines and sets the MII
registers of network cards).
</dl></blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
2) I have installed <EM>kudzu</EM> in debian 3.0 , but it is not running as a
service. it needs to execute the command <EM>kudzu</EM> manually.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [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 <TT>/etc/init.d/skeleton</TT>
to <TT>/etc/init.d/kudzu</TT> and modify it to do kudzu stuff. Then, use
update-rc.d to populate the <TT>/etc/rc?.d/</TT> runlevel directories.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Finally the exact solution. I was searching 4 this looong.
Rick, can't understand howto give u thanks.
take care.
</STRONG></P>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
moreover it couldn't detect my epson C21SX printer. but under MDK 9.0
kudzu detected the printer .
</STRONG></P>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [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.
</blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Rick]
Would that be an Epson Stylus C21SX? I can't find anything quite like
that name listed at:
</blockQuote>
<blockQuote><BLOCKQuote>
<A HREF="http://www.linuxprinting.org/printer_list.cgi?make=Epson"
>http://www.linuxprinting.org/printer_list.cgi?make=Epson</A>
</BLOCKQuote></blockQuote>
<blockQuote>
I would guess this must be a really new, low-end inkjet printer.
</blockQuote>
<blockQuote>
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
<TT>/etc/apt/sources.list</TT> like this:
</blockQuote>
<blockquote><pre>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
</pre></blockquote>
<blockQuote>
Then, do "apt-get update &amp;&amp; apt-get dist-upgrade". Hilarity ensues.
<IMG SRC="../../gx/dennis/smily.gif" ALT=";-&gt;"
height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
(OK, I'll be nice: This takes you <em>off</em> 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.)
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
a nice discussion. thanks a lot.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Rick]
All of those information items are now in my cumulative Debian Tips
collection, <A HREF="http://linuxmafia.com/debian/tips"
>http://linuxmafia.com/debian/tips</A> . (Pardon the dust.)
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
ok, thanks a lot. u have clarified evrything very well. now I must not have
any prob. regarding auto-detection in deb..
</STRONG></P>
<P><STRONG>
Great site !
</STRONG></P>
<blockquote><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [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.
</blockquote>
<blockquote><dl><dt>Libranet
<dd><A HREF="http://www.libranet.com"
>http://www.libranet.com</A>
<br>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.
</dL></blockquote>
<blockquote><dl><dt>Xandros
<dd><A HREF="http://www.xandros.com"
>http://www.xandros.com</A>
<br>The current bearer of the torch that Corel Linux first lit. Reviews
about it sing its newbie-friendly praises.
</dl></blockquote>
<blockquote><dl><dt>Lindows
<dd><A HREF="http://www.lindows.com"
>http://www.lindows.com</A>
<br>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.
</dl></blockquote>
<blockquote><dl><dt>Progeny
<dd><A HREF="http://www.progenylinux.com"
>http://www.progenylinux.com</A>
<br>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.
</dl></blockquote>
<blockquote>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.
</blockquote>
<blockquote>In a slightly less commercial vein,
</blockquote>
<blockquote><dl><dt>Knoppix
<dd><A HREF="http://www.knopper.net/knoppix"
>http://www.knopper.net/knoppix</A>
<br>[Base page in German, multiple languages available] while not strictly
designed as a distro for people to install, has <EM>great</EM> 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.
</dl></blockquote>
<blockquote><dl><dt>Good-Day GNU-Linux
<dd><A HREF="http://ggl.good-day.net"
>http://ggl.good-day.net</A>
<br>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.
</dl></blockquote>
<blockquote>And of course the usual Debian installer discs.
</blockquote>
<blockquote>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.
</blockquote>
<blockquote>There's a stack more at the LWN Distributions page
(<A HREF="http://old.lwn.net/Distributions"
>http://old.lwn.net/Distributions</A>) 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.
</blockquote>
<!-- end 2 -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
<h5>
<br>Copyright &copy; 2003
<br>Copying license <A HREF="">http://www.linuxgazette.com/copying.html</A>
<BR>Published in Issue 88 of <i>Linux Gazette</i>, March 2003</H5>
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<SMALL><CENTER><H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6></SMALL></CENTER>
<HR>
<!--startcut ======================================================= -->
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="../index.html"
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
<A HREF="../../tag/bios.html">Meet&nbsp;the&nbsp;Gang</A> &nbsp;
<A HREF="1.html">1</A> &nbsp;
<A HREF="2.html">2</A> &nbsp;
<A HREF="3.html">3</A>
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
</BODY></HTML>
<!--endcut ========================================================= -->