Chinaunix首页 | 论坛 | 博客
  • 博客访问: 451680
  • 博文数量: 70
  • 博客积分: 3170
  • 博客等级: 中校
  • 技术积分: 756
  • 用 户 组: 普通用户
  • 注册时间: 2007-06-06 16:47
文章分类

全部博文(70)

文章存档

2011年(22)

2010年(33)

2009年(5)

2008年(10)

分类: LINUX

2010-11-07 13:59:34

Q. How do I Load a Linux kernel module automatically at boot time so that my hardware is automatically recognized during system boot sequence?

A. Linux kernel follows modular kernel design. Loadable Kernel Modules (LKM) are object files that contain code to extend the running kernel, or so-called base kernel. LKM's are typically used to add support for new hardware, filesystems etc.

Loading a kernel module is an essential task. File /etc/modules.conf (or /etc/modules - see a note below for more info) is configuration file for loading kernel modules.

The configuration file consists of a set of lines. All empty lines, and all text on a line after a '#', will be ignored.

This file is used - if new hardware is added after installation and the hardware requires a kernel module, the system must be configured to load the proper kernel module for the new hardware.

For example, if a system included an IDE CD-ROM, the module configuration file contains the following 3 lines:
# vi /etc/modules.conf
Append following lines:
ide-cd
ide-core
cdrom

Save and close the file. Reboot the system.

NOTE: If you are using Debian Linux or Ubuntu Linux use file /etc/modules file instead of /etc/modules.conf (which works on Red Hat/Fedora core/Cent OS etc)

阅读(852) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~