linux installer os driver update

installer os driver update

linux system can be simply divided into OS installer OS and runtime installation phase not recognize a hardware device because of the lower probability of large installers OS version, no driver to recognize the new hardware, you can try to update the driver.

Installation installer OS linux-headers corresponding to

In the system interface into Rescue a broken system or interrupted when the system starts the installation, into the command line,

~ # uname -r
3.2.0-23-generic

Get the version

apt-get install linux-headers-3.2.0-23-generic

After installation is complete check

dpkg -l|grep linux-headers
# 输出中含有下面两项即可
ii  linux-headers-3.2.0-23 3.2.0-23.36 Header files related to Linux kernel version 3.2.0
ii  linux-headers-3.2.0-23-generic 3.2.0-23.36 Linux kernel headers for version 3.2.0 on 64 bit x86 SMP

New driver compiled

Http://www.broadcom.com/site-search need to drive search, where the use of the MR Linux Driver - 07.703.05.00 , downloaded to the root directory.

Created under the root megaraid_sas_07.703 after folder

tar -xf ../MR_LINUX_DRIVER_7.3-07.703.05.00.tgz
cd src
rpm2cpio ../generic_srpm/megaraid_sas-07.703.05.00-1.src.rpm | cpio -i

At this time, the following documents catalog generation src

drwxr-xr-x 2 root root 4096 Jan 2 15:40 ./
drwxr-xr-x 16 root root 4096 Jan 2 15:36 ../
-rw-r--r-- 1 root root 142594 Jan 2 15:40 megaraid_sas-07.703.05.00.tar.gz
-rw-r--r-- 1 root root 8049 Jan 2 15:40 megaraid_sas.spec
-rwxr-xr-x 1 root root 25 Jan 2 15:40 Module.supported*
tar -xf megaraid_sas-07.703.05.00.tar.gz

After the files are decompressed directory drivers / scsi / megaraid_sas, here is what we want to compile a file .ko place, execute in that directory

make -j4 CONFIG_DEBUG_INFO=1 -C /usr/src/linux-headers-3.2.0-23-generic M=${PWD} modules

Modify initrd.gz file

First mount our iso, then you can see the contents of the iso, but read-only, copy the entire directory to the root mount under

cp -a galen/. /root/copy_mount_is/

root directory

root@g6:~# mkdir initrd.dir
root@g6:~# cd initrd.dir/
# 将initrd.gz解压出来到initrd.dir文件夹下
root@g6:~/initrd.dir# gzip -d -c < /root/copy_mount_is/install/initrd.gz | cpio -i
# 替换.ko文件
root@g6:~# cp megaraid_sas_07.703/src/drivers/scsi/megaraid_sas/megaraid_sas.ko initrd.dir/lib/modules/3.2.0-23-generic/kernel/drivers/scsi/megaraid_sas.ko
# 将initrd.dir文件压缩回去
root@g6:~/initrd.dir# find . | cpio --create --format='newc' | gzip > ../copy_mount_is/install/initrd.gz

Alternatively, after completion of modifications to initrd.gz copy_mount_is directory md5sum.txt the check code, the first get the current md5 checksum

md5sum initrd.gz

Then replace the check code in FIG.

Repackaging ISO

After the above operation is completed, we will re-combined into iso files on it.

mkisofs -joliet-long -J -l -b isolinux/isolinux.bin -no-emul-boot    -boot-load-size 4 -boot-info-table -z -iso-level 4    -c isolinux/isolinux.cat   -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -o 6.1-scaler-galen-test.iso copy_mount_is

Guess you like

Origin www.cnblogs.com/tongh/p/12158977.html