≡ Menu

kernel modules

Linux: Find Wireless Driver Chipset Information

How do I find out Wireless driver chipset information under a Linux operating system? How do I get wireless card chipeset information without opening my systems or laptop using a Linux?
[click to continue…]

Fedora Linux Install Linux Kernel Headers And Developer Files

I'm trying to install vmware-tools but Fedora Linux v12 prompting for kernel headers. How do I install kernel headers under Fedora Linux?
[click to continue…]

Linux: Find out what kernel drivers (modules) are loaded

Q. How do I find out what Linux kernel drivers and loaded by my Linux distribution? How do I list device drivers (modules) loaded in memory?

A. Under Linux use the file /proc/modules shows what kernel modules (drivers) are currently loaded.

lsmod command

You need to use lsmod command to show the status of modules in the Linux Kernel. Simply type the lsmod at a shell prompt:
$ lsmod

Module                  Size  Used by
binfmt_misc            12680  1
rfcomm                 40856  0
l2cap                  25856  5 rfcomm
bluetooth              55908  4 rfcomm,l2cap
ppdev                  10116  0
acpi_cpufreq           10056  1
cpufreq_stats           7360  0
cpufreq_userspace       5408  0
cpufreq_conservative     8200  0
cpufreq_ondemand        9228  4
cpufreq_powersave       2688  0
freq_table              5792  3 acpi_cpufreq,cpufreq_stats,cpufreq_ondemand
pcc_acpi               13184  0
dev_acpi               12292  0
tc1100_wmi              8068  0
sony_acpi               6284  0
dock                   10268  0
sbs                    15652  0
asus_acpi              17308  0
ac                      6020  0
battery                10756  0
i2c_ec                  6016  1 sbs
video                  16388  0
backlight               7040  1 asus_acpi
container               5248  0
button                  8720  0
nls_utf8                3072  1
ntfs                  107764  1
eeprom                  8336  0
i2c_i801                9356  0
sbp2                   23812  0
lp                     12452  0
fuse                   46612  0
af_packet              23816  2
snd_hda_intel          21912  4
snd_hda_codec         205056  1 snd_hda_intel
snd_pcm_oss            44544  0
snd_mixer_oss          17408  1 snd_pcm_oss
snd_pcm                79876  4 snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_dummy           4740  0
snd_seq_oss            32896  0
tuner                  61864  0
snd_seq_midi            9600  0
snd_rawmidi            25472  1 snd_seq_midi
bttv                  173684  0
video_buf              26116  1 bttv
snd_seq_midi_event      8448  2 snd_seq_oss,snd_seq_midi
ir_common              31236  1 bttv
nvidia               6224240  24
compat_ioctl32          2304  1 bttv
snd_seq                52592  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
i2c_algo_bit            8712  1 bttv
btcx_risc               5896  1 bttv
snd_timer              23684  3 snd_pcm,snd_seq
snd_seq_device          9100  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
tveeprom               15888  1 bttv
iTCO_wdt               11812  0
iTCO_vendor_support     4868  1 iTCO_wdt
parport_pc             36388  1
agpgart                35400  1 nvidia
tsdev                   8768  0
parport                36936  3 ppdev,lp,parport_pc
snd                    54020  16 snd_hda_intel,snd_hda_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore               8672  1 snd
i2c_core               22656  8 i2c_ec,eeprom,i2c_i801,tuner,bttv,nvidia,i2c_algo_bit,tveeprom
rt61                  245128  1
psmouse                38920  0
snd_page_alloc         10888  2 snd_hda_intel,snd_pcm
videodev               28160  1 bttv
v4l2_common            25216  3 tuner,bttv,videodev
v4l1_compat            15236  1 videodev
serio_raw               7940  0
shpchp                 34324  0
pci_hotplug            32576  1 shpchp
evdev                  11008  3
pcspkr                  4224  0
ipv6                  268960  20
ext3                  133128  1
jbd                    59816  1 ext3
mbcache                 9604  1 ext3
sg                     36252  0
sr_mod                 17060  0
sd_mod                 23428  4
cdrom                  37664  1 sr_mod
generic                 5124  0 [permanent]
ata_generic             9092  0
ohci1394               36528  0
ieee1394              299448  2 sbp2,ohci1394
pata_marvell            7936  0
ata_piix               15492  3
libata                125720  3 ata_generic,pata_marvell,ata_piix
scsi_mod              142348  5 sbp2,sg,sr_mod,sd_mod,libata
e1000                 126016  0
ehci_hcd               34188  0
uhci_hcd               25360  0
usbcore               134280  3 ehci_hcd,uhci_hcd
thermal                14856  0
processor              31048  2 acpi_cpufreq,thermal
fan                     5636  0
fbcon                  42656  0
tileblit                3584  1 fbcon
font                    9216  1 fbcon
bitblit                 6912  1 fbcon
softcursor              3200  1 bitblit
vesafb                  9220  0
capability              5896  0
commoncap               8192  1 capability

Get more information about driver

To get more information about specific driver, enter:
modinfo {driver-name}
$ modinfo e1000

filename:       /lib/modules/2.6.20-16-generic/kernel/drivers/net/e1000/e1000.ko
version:        7.3.15-k2-NAPI
license:        GPL
description:    Intel(R) PRO/1000 Network Driver
author:         Intel Corporation, 
srcversion:     037027F24F37E1AAEFC4360
alias:          pci:v00008086d000010C5sv*sd*bc*sc*i*

Suse Linux install vmware tools

Q. I’m using OpenSuse as Guest OS (VPS). Installing SUSE Linux as a VMware Workstation guest operating system was easy task. But how do I setup and install SUSE Linux as a VMware Guest? How do I install vmware tools to improve performance?

A. In order to install Vmware tools, you need to build kernel modules. Building kernel modules is easy provided that following packages are installed on the guest OpenSuse / Suse Linux (VPS):

=> kernel-source

=> binutils

=> make

=> gcc

=> gcc-c++

Install required software

Login to guest oses using SSH or Vmware server console. Use yast command (yast control center) to install required software:
# yast
Select Software > Software management > Add above packages > Accept and install the softwares
The Software Management tool in YaST text mode
(YaST text mode software installation)

If you are using a GUI, you should see screen as follows (YaST2 screen):

Start VMWARE Tools installation

You need to start VMware tools installation from Vmware server console or Vmware Workstation VM menu.
Click on VM Menu > Select Install Vmware Tools... > Click on Install
Start VMWARE Tools installation

Mount the VMware Tools virtual CD

If you are using guest system’s desktop, you should have mounted a CD. If you are using text mode, run mount command as follows:
# mount /dev/hdc /media

mount: block device /dev/hdc is write-protected, mounting read-only

Replace /dev/hdc with actual virtual cd rom drive.

Install the VMware Tools RPM

Finally install rpm file,
cd /media
rpm -ivh VMwareTools-1.0.3-44356.i386.rpm

Configure Vmware tools

Next you need to run the VMware Tools configuration script. You must run script from VMWare server console / Workstation and not from SSH session:
# vmware-config-tools.pl
# vmware-config-tools.pl -default

Sun Solaris UNIX display list for loaded kenel device driver / modules

Q. How do I display information about loaded kernel modules under Sun Solaris UNIX operating system?

A. You need to use modinfo command which is a trivial program to display information about the loaded modules. The format of the information is as follows:

Id Loadaddr Size Info Rev Module Name

where Id is the module ID, Loadaddr is the starting text address in hexadecimal, Size is the size of text, data, and bss in hexadecimal bytes, Info is module specific information, Rev is the revision of the loadable modules system, and Module Name is the filename and description of the module.

Task: Displaying the status of kernel modules

Just enter modinfo command:
You can pass -c option to modinfo command to display the number of instances of the module loaded and the module's current state:
modinfo -c

Display information about particular module / driver only

You can also display information about particular module only by specifying its ID #:
modinfo -i 5
The above example displays the status of module # 5.

Read modinfo man page for other information and options.

Howto: Linux Add or Remove a Linux Kernel Modules / Drivers

How do I add or remove hardware device driver (module) from running Linux kernel?
[click to continue…]

Linux Kernel panic VFS Unable to mount root fs and solution

Q. I am using Linux on HP server and I am getting error that read as follows:
Linux Kernel panic: VFS: Unable to mount root fs

How do I solve this problem?

A. Most modern distributions including Debian uses loadable kernel module for ext3 file system. So to read ext3/ext2 file system kernel must load ext3 kernel module (ext3.ko).

This module is included in an initrd image. If an initrd image is missing or that image does not include suitable kernel modules to access the ext3 filesystem on the partition, an error message (Linux Kernel panic: VFS: Unable to mount root fs) will be displayed to you.

To solve this problem you need to use mkinitrd script that constructs a directory structure that can serve as an initrd root file system.

The instructions for creating initrd images are here on our site.

Linux rebuild the initial ramdisk image

Q: I think I am missing some driver or my initial ramdisk is corrupted for running kernel how do I Rebuild the initial ramdisk image under Linux?

A: You need ramdisk if you have added new hardware devices such as SCSI or FibreChannel controller to your server as the ramdisk contains the necessary modules (i.e. drivers) to initialize hardware driver. If you modified the /etc/modprob.conf (or modules.conf) file then you need to execute special script called mkinitrd.

The mkinitrd script constructs a directory structure that can serve as an initrd root file system. It then generates an image containing that directory structure using mkcramfs, which can be loaded using the initrd mechanism. The kernel modules for the specified kernel version will be placed in the directory structure. If version is omitted, it defaults to the version of the kernel that is currently running.

Find out your kernel version:
# uname -r
Make backup of existing ram disk:
# cp /boot/initrd.$(uname -r).img /root
To create initial ramdisk image type following command as the root user:
# mkinitrd -o /boot/initrd.$(uname -r).img $(uname -r)
# ls -l /boot/initrd.$(uname -r).img

You may need to modify grub.conf to point out to correct ramdisk image, make sure following line existing in grub.conf file:
initrd /boot/initrd.img-
When the system boots using an initrd image created by mkinitrd command, the linuxrc will wait for an amount of time which is configured through mkinitrd.conf, during which it may be interrupted by pressing ENTER. After that, the modules specified in will be loaded.