SUSE Support

Here When You Need Us

How to add kernel modules to the initrd to be loaded on boot

This document (3111917) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Desktop 11
SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
 

Situation

A kernel module needs to be loaded by the kernel image.

Resolution

The Linux kernel is modular in nature. The RAM disk/kernel image used to boot up Linux holds the initial modules that are used to get the system up; after the initial boot other modules are loaded as needed. In some cases, the kernel modules need to be included in the RAM disk. Examples would include the Fibre Channel Cards, disk controllers and file-system drivers.

general warnings
In case something goes wrong, please have the rescue CD (CD 1 or the DVD) for the appropriate service pack that you are using.

process
  1. Open /etc/sysconfig/kernel for editing
     
  2. Locate the line below starting with:
    INITRD_MODULES="..."
  3. Add the module name within the quotes. Be careful where the module goes within the quotes. If the item being added is a disk controller, Fibre Channel driver, etc, it may prevent the system from booting. Arbitrary kernel device name assignments are made by the order that the driver is loaded and the physical location of the card/device on the bus. Generally, if you are adding a disk controller, add it at the end, unless you have a specific need to load the driver before the native disks.
  4. Save and close the file
  5. Remake the kernel image.
    mkinitrd
  6. Reboot

note on third-party kernel modules
SUSE does not support third-party kernel modules. When performing this process with third-party kernel modules, such as vendor supplied disk controller drivers, caution must be taken. If you update the kernel you will need to remake/reinstall the third-party kernel modules and then follow step 5 before you reboot. If the kernel module is for the disk controller, you may not be able to boot.

In some cases, you may be able to use the kernel-syms package to allow you to use an older kernel module on a newer kernel (i.e. you can use a module compiled against an older kernel. The kernel-syms package will only work if the symbols have not changed from the old kernel to the new kernel. While the kernel-syms package does help, it should not be relied on when you upgrade the kernel to load your third-party kernel module.

Links:
TID 000016506 Troubleshooting common boot problems

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:3111917
  • Creation Date: 03-Jan-2008
  • Modified Date:28-Sep-2022
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.