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