LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Hardware identification guide for newbies ?? (https://www.linuxquestions.org/questions/linux-hardware-18/hardware-identification-guide-for-newbies-141533/)

massai 02-02-2004 05:10 PM

Hardware identification guide for newbies ??
 
Hello,

Based on some recent personal experience, the one part of a Linux installation (or kernel upgrade) that I dread the most is the kernel configuration during "menuconfig" (or xconfig).

Those things are overwhealming. The names are cryptic (they are meant to be?) and 70% of the time I don't know whether I need something even after reading the help text.

Q1: Is there a "Dictionary of hardware terms" for laypeople, anywhere to be found ??

Example1: It is one thing to know that I have an ethernet card and another thing to know that I should look for "Tulip" support. ("Tulip" doesn't sound anything like "Ethernet" to me; as I found out the hard way)

Example2: It is one thing to know that I have a CD-rw (IDE) and another thing to know that I need to eneble SCSI-emulation (eventhough I have no SCSI devices on the system)

Q1 (re-phrased): What is the authoritative way to identify all hardware requirements before a kernel installation ? Is there any documentation on this for laypeople?

Q2: Are there autoconfiguration/detection methods that generate the right answers for "menuconfig" ?

spuzzzzzzz 02-02-2004 07:14 PM

1. As far as I know, there isn't :(. A good way to find out about your hardware is to look inside your box and do a google search for serial numbers on your hardware. You can also try running (as root) "lspci -vv" or "cat /proc/pci" (if you don't have pciutils installed)

2. Gentoo has created a kernel configuration script called "genkernel". However, I don't know if it works on non-gentoo systems. I also recommend compiling it manually, as this will teach you a lot about your hardware.

Example 1: If you did a google search for the serial numbers on your ethernet cards, you would probably come up with a lot of information about the "tulip" cards.

Example 2: You do _not_ need scsi-emulation if you use recent versions or cd recording software. Recent versions of cdrecord and cdrdao support writing to ATAPI devices.

moxfyre 02-02-2004 08:15 PM

There is a very useful linux program called Discover (http://platform.progeny.com/discover/) which does hardware autodetection and can even load the required modules if they are installed. But you can just run it to find out what hardware you have first.

The way I usually go about figuring out hardware is:
(1) Assume internal disk drives and CD/DVD drives are standard IDE drives unless proven otherwise (true for 99% of desktops).

(2) Run lspci or cat /proc/pci to find out what kind of peripherals there are. If I don't know what driver they need, google for, e.g. "VIA sound card linux". Then I see that it needs the via82cxxx ALSA sound driver, etc.

(3) Do an lsusb and google for the USB drivers needed too.

(4) Put in any pcmcia cards (laptop) and run cardctl ident to find out what they are. Google for those too.

(5) Build a kernel with all the modules for the hardware, as well as modules for the filesystems: linux ext2, linux ext3, CD, DVD, Windows FAT32. Include any modules that I'm unsure about, I can always remove them later if I want.

(6) Install additional utilities that may be needed for some hardware, such as modem dialers, wireless card manager utilities, etc.

It's a fairly long process. I run Debian, which doesn't do a good job of autodetecting hardware. By contrast, If you use Mandrake, it will do a *fantastic* job detecting your hardware. I used to use Mandrake until I felt comfortable doing all that stuff by hand.

massai 02-02-2004 10:13 PM

moxfyre, spuzzzzzzz,

Thank you for the hints/tips.

moxfyre, I am glad you posted that list of steps to follow; it puts some structure to the process (because right now I am haphazardly all over the place; with notes everywhere).

Another thing that bothers me is: how to plan for future functionality ?

For example suppose there is nothing connected to the usb ports right now. So the only thing needed (at present) would be "USB support".... and we go ahead and compile the kernel.
...but then suppose that two weeks from now we go and buy a digital camera (or a usb printer) ? Does this mean that we cannot use those devices until the kernel is recompiled ?

Somehow it has been imprinted in me that a "kernel recompile" is a serious thing to do and should be avoided (handled under clean-room conditions of caution). Am I mistaken ? Are you people recompiling kernels on a daily/weekly basis as naturaly as breathing and sleeping ?

This whole area of hardware and how it interfaces to the kernel is alien to me (never thought of it prior to using Linux). For example, right now I am under the impression that if the kernel can't "see" something, then its "game-over" and time to start from scratch. (at least that is how I do it; being a newbie)
--

spuzzzzzzz 02-03-2004 03:12 AM

There is nothing wrong with kernel compiles. The first few times can be a bit scary, but after that you'll get quite comfortable. There is an excellent how-to in the slackware forums. And as far as future functionality goes, if you compile eveything as a module, you will be ready for whatever the future holds. On the other hand, if your computer is a little slow and you don't want to waste time compiling a bunch of extra modules, you can easily compile the extra modules separately later.

moxfyre 02-03-2004 08:15 AM

I agree with the above post. Kernel recompiles tend to be more tedious than scary.

Obviously, you don't want to be doing them all the time, because they take a few minutes and then you have to reboot, but you can be 99.99% sure that booting a new kernel ISN'T going to break your system, unless you enable something incredibly unstable and experimental, which will be very clearly designated as such in the help text in the kernel configuration menu!

When you build a new kernel, you should *ALWAYS* keep the old one around so that you can boot if the new one fails to load. It's not uncommon that a new kernel fails to boot, but it won't hurt your system. Better yet, just keep a good old baseline kernel, like the one that was originally installed with your distribution, and boot that one when you have trouble.

You can certainly compile modules for USB devices later if you need to. Assuming that the modules you need are part of the standard kernel distribution, basically what you'd do is:

> cd /usr/src/linux-2.4.whatever
> make menuconfig
[ select options for USB modules you want to use ]
> make dep
> make modules
> make modules_install
> modprobe name_of_module_here
[ hopefully it will now detect your device]

If you haven't yet, I would highly recommend trying out a new 2.6.1 kernel! The kernel build process is significantly faster, clearer, and more user-friendly. Plus the kernel configuration in menuconfig is a lot better organized and easy to use.


All times are GMT -5. The time now is 11:18 AM.