Introduction

Once again, remember what sets off "the hitch-hikers guide to the galaxy" from "the encyclopedia Galactica": It has, written on its top, the phrase: Don't Panic!

The Linux Kernel

The Kernel, The Processes And The Hardware

If we draw an abstract layout of the layout of the operating system, it could look like the following drawing:

Hardware Diagnostics

The lspci Command

Example output:

[choo@simey ~]$ /sbin/lspci 
00:00.0 Host bridge: VIA Technologies, Inc.: Unknown device 3189
00:01.0 PCI bridge: VIA Technologies, Inc.: Unknown device b168
00:0a.0 Communication controller: Conexant HSF 56k HSFi Modem (rev 01)
00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C (rev 10)
00:0c.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 0a)
00:0c.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 0a)
00:10.0 USB Controller: VIA Technologies, Inc. USB (rev 80)
00:10.1 USB Controller: VIA Technologies, Inc. USB (rev 80)
00:10.2 USB Controller: VIA Technologies, Inc. USB (rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc.: Unknown device 3177
00:11.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 06)
00:13.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C (rev 10)
01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4 MX440] (rev a3)
A modem, 2 sound cards, 2 network cards, a USB interface, an IDE controller and a screen controller.

Using Your Eyes

Verification Via The /proc Directory

Device files

The /dev directory

Character Device Vs. Block Device

Kernel Modules

Listing Loaded Modules With lsmod

In order to see the list of currently loaded Modules, use the lsmod command:

[choo@simey ~]$ /sbin/lsmod 
Module                  Size  Used by    Not tainted
ppp_synctty             6368   0 (unused)
ppp_async               8032   1
ppp_generic            23692   3 [ppp_synctty ppp_async]
slhc                    6220   0 [ppp_generic]
ipt_LOG                 4384  19 (autoclean)
ipt_TCPMSS              3168   1 (autoclean)
iptable_nat            19668   1 (autoclean)
ip_conntrack           20268   1 (autoclean) [iptable_nat]
iptable_filter          2464   1 (autoclean)
ip_tables              13632   6 [ipt_LOG ipt_TCPMSS iptable_nat iptable_filter]
vfat                   11804   1 (autoclean)
fat                    36184   0 (autoclean) [vfat]
ext3                   64800   3 (autoclean)
jbd                    47924   3 (autoclean) [ext3]
emu10k1                60832   1
ac97_codec             12256   0 [emu10k1]
sound                  69260   0 [emu10k1]
soundcore               6212   7 [emu10k1 sound]
mousedev                5024   1
hid                    20608   0 (unused)
input                   5696   0 [mousedev hid]
ehci-hcd               16864   0 (unused)
usb-uhci               24292   0 (unused)
usbcore                71104   1 [hid ehci-hcd usb-uhci]

The /lib/modules Directory

Loading And Unloading Kernel Modules - insmod/rmmod

Handling Kernel Module Dependencies - depmod and modprobe

The /etc/modules.conf file

Getting Information About A Kernel Module - modinfo

Standard Kernel Drivers

What If Our Driver Is Not Compiled?

Summary

Originally written by Valid HTML 4.01!guy keren