Administration
  Home arrow Administration arrow Page 11 - Kernel, Cron, and User Administration,...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Actuate Whitepapers 
Moblin 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Kernel, Cron, and User Administration, Part 1
By: McGraw-Hill/Osborne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 11
    2004-08-25

    Table of Contents:
  • Kernel, Cron, and User Administration, Part 1
  • Certification Objective: Shell Configuration Files
  • Setting Up and Managing Disk Quotas
  • The Quota Package
  • Quota Management Commands
  • Automating Quota Settings
  • The Basics of the Kernel
  • Kernel Concepts
  • Other RHEL 3 Kernels
  • Understanding Kernel Modules
  • /lib/modules/kernel_version/ Directory Structure

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!

    Kernel, Cron, and User Administration, Part 1 - /lib/modules/kernel_version/ Directory Structure


    (Page 11 of 11 )

    All kernel modules are stored in the /lib/modules/kernel_version/ directory. When RHEL 3 is installed, kernel_version=2.4.21-4.EL. If you have recently compiled a new kernel and your modules are not loading properly, then you have probably forgotten to compile and install the modules. In the /usr/src/kernel_version source directory, run the following commands:

    # make modules
    # make modules_install

    The first line compiles the modules, while the second places them under the proper directory tree. In this directory tree, different subdirectories represent different groupings. The following is a sample of a module directory:

    # ls -l /lib/modules/2.4.21-4.EL/kernel/drivers
    total 60
    drwxr-xr-x 7  root root 4096 Oct 23 15:22 addon
    drwxr-xr-x 2  root root 4096 Oct 23 15:22 block
    drwxr-xr-x 2  root root 4096 Oct 23 15:22 cdrom
    drwxr-xr-x 8  root root 4096 Oct 23 15:22 char
    drwxr-xr-x 2  root root 4096 Oct 23 15:22 ide
    drwxr-xr-x 2  root root 4096 Oct 23 15:22 input
    drwxr-xr-x 2  root root 4096 Oct 23 15:22 md
    drwxr-xr-x 3  root root 4096 Oct 23 15:22 message
    drwxr-xr-x 10 root root 4096 Oct 23 15:22 net
    drwxr-xr-x 2  root root 4096 Oct 23 15:22 parport
    drwxr-xr-x 2  root root 4096 Oct 23 15:22 pcmcia
    drwxr-xr-x 5  root root 4096 Oct 23 15:22 scsi
    drwxr-xr-x 5  root root 4096 Oct 23 15:22 sound
    drwxr-xr-x 5  root root 4096 Oct 23 15:22 usb
    drwxr-xr-x 3  root root 4096 Oct 23 15:22 video

    Remember that each /lib/modules/kernel_version directory contains a modules.dep file that lists all the dependencies for all the modules within the directories. Each of these module directories includes a group of kernel modules for a common type of hardware. You might want to become familiar with where to find certain modules when needed. Here are some module types you can find under each directory:

    • addon   High-end cards such as for server racks
    • block   Block devices: parallel port ide drives, network block devices, XT disks, hardware raid devices
    • cdrom   Non-ATAPI CD-ROM drivers: Mitsumi, Sony
    • char   Miscellaneous input and serial devices
    • ide   Hard disk drivers
    • input   Input devices (keyboards, mice)
    • md   raid devices
    • message   Specialized I/O adapters
    • net   Network modules: basic network cards, generic ppp, slip
    • parport   Parallel port devices (not printers)
    • pcmcia   Drivers used by the pcmcia cardmgr daemon (the actual cards use separate drivers)
    • scsi   SCSI tape, RAID, and hard drive modules, video (special video modules for Linux)
    • sound   Sound adapters
    • usb   Universal Serial Bus hubs and devices
    • video   Graphics adapters

    All modules have .o for an extension (such as pcnet32.o). You do not need to specify the full name, just the first part of the module file (pcnet32). Once you know the directory structure, you can have the modprobe command load all modules for a certain category. For instance, if you are on a PC and you don’t know the network card, you can simply type

    modprobe -t net

    This will attempt to load all modules in /lib/modules/kernel_version/net, stopping when a match is found. To remove a module such as pcnet32 and all its dependencies, you can type either

    modprobe -r pcnet32

    or

    rmmod -r pcnet32

    Either of these commands will remove the modules and all their dependencies, provided they are not in use by another module or not currently active. For example, if your network is active, you can’t remove the network pcnet32 driver module. If you want to remove only the module and leave the other dependent drivers, run the rmmod command without the -r switch.

    This is part one from the fifth chapter of Red Hat Certified Engineer Linux Study Guide (Exam RH302), fourth edition, by Michael Jang. (McGraw-Hill/Osborne, 2004, ISBN: 0-07-225365-7). Check it out at your favorite bookstore today. Buy this book now.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

       

    ADMINISTRATION ARTICLES

    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway