Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Linux Planet
Linux Today
More Free Newsletters

Be a Commerce Partner

Send Text Messages
Televisions
Domain registration
SMS Gateway
Holiday Gift Ideas
Remote Online Backup
Shop Online
Computer Deals
Promotional Pens
Compare Prices
Phone Cards
Imprinted Promotions
Prepaid Phone Card
Boat Donations



internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article
Related Items

•  Kernel updates and info site

•  Kernel Compiling Guide

•  The Devtective

•  Linuxplanet discussion board

Better Together: Microsoft System Center & Windows Server 2008. Implement Windows Server 2008 in your organization with less effort & complexity than previous versions of Windows Server.

   LinuxPlanet / Tutorials



  Rethinking the Datacenter
Sponsored by HP
Today's datacenters need to increase utilization, get control over power and cooling costs, and align with business objectives. Download this eBook to learn about the challenges facing the data center in a world where digital information is growing at a torrid pace and costs are being held in check. Learn more. »
 
  Putting the Green into IT
Sponsored by HP
Electricity use in data centers is skyrocketing, sending energy bills through the roof, creating environmental concerns and generating negative publicity. "Going Green" means looking to technologies like virtualization, energy-efficient chips and racks, and implementing policies that extend beyond the data center. Learn more. »
 
  Managing the Modern Network
Sponsored by HP
In a global economy where information crosses the globe in an instant, and where Web-based applications power business, it's more important than ever to ensure your network is safe from threats and optimized to deliver the data your business needs. »
 
  Evaluating Software as a Service for Your Business
Sponsored by Webroot
Is Software as a Service just hype, or is something really going on here? See if your company can benefit as SaaS tries to change the face of the enterprise. »
 
  Is Your Disaster Recovery Plan Good Enough?
Sponsored by HP
Preparing for a disaster is more often than not part of the storage planning process, and it is one of the most difficult tasks, since it includes local hardware and software, networking equipment, and a test plan. Learn how to get disaster recovery right. »
 
Linux Device Drivers Demystified
All About Modules

James Andrews
Thursday, September 23, 1999 12:49:47 PM

Another much-trumpeted advantage of Linux is that it does not need to be rebooted as often as other operating systems. You might think that this is due to its rock solid stability. You may think I am now going to talk about the quality of the device drivers. But you'd be wrong. The reason that Linux device drivers lead to less rebooting is that we can reconfigure, load or unload them without restarting the system.

To do this modular kernel drivers are used.

How to load a module

Most people configure their modules at install time and then leave them alone. All the major distributions have taken to modules because of another advantage they have: size. Distribution makers want to support all the possible cards and devices that Linux can. If we compiled all these into the kernel it would be huge. If several different static kernels for different devices were supplied then they would take up too much space, as well. With the modular system distribution makers supply a stripped down kernel plus a comprehensive set of device drivers. This typically only occupies two or three floppy disks in total.

modprobe, lsmod and insmod

if you want to load a module after system setup time, then the easiest way is as follows:


modprobe hfs

This example loads the Apple Mac disk subsystem driver (called hfs) with the modprobe command. If the module takes parameters, like IRQ numbers, then you can specify them with modprobe too.

To see what modules are loaded and to see information on how they depend on each other we use lsmod. Here is some example output from lsmod.

Module                  Size  Used by
gus                     45016    0
mad16                  6564    0
sb                       31416   0
ad1848                15112    0  [mad16]
uart401                 5588    0  [mad16 sb]
sound                 54368   0  [gus mad16 sb ad1848 uart401]

In this example the mad16 kernel device driver depends on the ad1848 device driver.

Yes, there really is a mad16 device driver. It is a soundcard chipset.

/etc/modules, /etc/conf.modules

In the normal course of events the modules we asked for when Linux was installed are loaded at boot time. To achieve this the file /etc/modules is used. This is a list of modules to be loaded.

The options for the modules are stored in /etc/conf.modules. Recommended practice is to not edit /etc/conf.modules, however, but to use a script like update-modules; see the man pages for more details.

Next: Looking for the driver for a particular device? »

Skip Ahead

1 Introduction
2 All About Modules
3 Looking for the driver for a particular device?





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers