How to attach a raid driver to initrd

Source: Internet
Author: User

System Environment: centos release 6.5 (final)

Kernel version: 2.6.32-431.23.3.el6.x86 _ 64

Scenario Description: The system disk on the server is connected to the motherboard through the RAID card. Now you need to install the system on the system disk. Therefore, you must first load the raid driver, then the system can identify the file system on the system disk and mount the real root file system.

Detailed process analysis is as follows:

Solution 1: Compile the raid driver into the kernel

Solution 2: add the raid driver to initrd. img

It will be implemented through solution 2.

Step 1: under normal circumstances, the startup exception prompt is:

Dracut warning: No root device "Block:/dev/mapper/live-RW"

Kernel panic

Note: You can add rdshell in the menu to obtain the console for problem analysis.

Step 2: copy the driver in the megaraid file from other systems, manually load it in init, and copy the insmod command

1) decompress the initrd. imgfile

2) copy the megaraid folder

3) Search for the required dynamic library through LDD insmod

4) edit the init file and load the driver

5) repackage initrd.

Error exception:

Insmod: Error inserting 'megaraid. Ko ':-1 required key not available

Troubleshooting: inconsistent kernel versions:

2.6.32-431. el6.x86 _ 64, causing driver loading failure. The kernel version must be matched.


Step 3: copy/lib/module/'uname-R'/kernel/driver/SCSI/megaraid/to a machine of the same version, and re-Execute step 2.

Exception:

Dracut warning: No root device "Block:/dev/mapper/live-RW"

Kernel panic

Conclusion: after obtaining the kernel panic through rdshell, the console finds that the module has been correctly loaded, but the system disk device cannot be found. Remember that the root file system needs to load the fat driver.


Step 4: Execute depmod-A on other machines that have installed the system, create a dependency table between the driver modules, and then generate an initrd using the dracut command. Replace with the original initrd. Started successfully

# Depmod-

# Dracut-V/initrd. img

How to attach a raid driver to initrd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.