关于U盘加载raid驱动及CENTSO的知识点

2026/1/21 18:35:55

5、解开initrd.img文件(file /root/iso/isolinux/initrd.img查看是gzip文件)

[root@localhost ~]# mkdir /tmp/initrd

[root@localhost ~]# cd /tmp/initrd

[root@localhost initrd]# gzip -dc /root/iso/isolinux/initrd.img | cpio -ivd

[root@localhost initrd]# cd modules

[root@localhost modules]# gzip -dc modules.cgz | cpio -ivd

modules子目录中的modules.cgz是经过gzip压缩过的cpio包,将其解开。

6、解压Logic MegaRAID SAS 1078 raid卡驱动文件megasr.img文件(这里以附件的形式上传到博文后面,请自行解压,导入)

[root@localhost modules]# mkdir /tmp/megasr

[root@localhost modules]# mount -o loop /root/megasr.img /media

[root@localhost modules]# cp /media/* /tmp/megasr

[root@localhost modules]# cd /tmp/megasr/

[root@localhost megasr]# gzip -dc modules.cgz | cpio -ivd

[root@localhost megasr]# cp 2.6.18-194.el5/megasr.ko /tmp/initrd/modules/2.6.18-194.el5/x86_64/

[root@localhost megasr]# cat modules.alias >> /tmp/initrd/modules/modules.alias

mkdir /tmp/megasr

7、生成新的initrd.img文件

就像我们以前所做的,修改了源码包中的内容就势必再次打包恢复,这里我们需要把修改过的内容打包成一个initrd.img文件,不过这里要注意打包时的压缩格式,modules.cgz文件用的是crc格式,而initrd.img文件用的是newc格式,命令参数不要弄错。

[root@localhost megasr]# cd /tmp/initrd/modules

[root@localhost modules]# find 2.6.18-53.el5 | cpio -o -H crc | gzip -9 > modules.cgz

[root@localhost modules]# rm -rf 2.6.18-53.el5

[root@localhost modules]# cd ..

[root@localhost initrd]# find . | cpio -o -H newc | gzip -9 > /tmp/initrd.img

8、将打包好的initrd.img文件复制到 /root/iso/isolinux 目录

[root@localhost initrd]# cp /tmp/initrd.img /root/iso/isolinux

9、上述第3步操作中,在/root/iso/CentOS目录下的软件包仅是我们定制的一些系统自带的rpm软件包;除此之外,我们还需要增加一些系统不自带的软件包,如:MegaCli与nload,并且禁止了ipv6协议。(其中MegaCli-2.00.15-1.i386.rpm与nload-0.7.4.tar.gz软件包详见博文后面的nload与MegaCli工具附件,请自行解压开来,上传到服务器上)

[root@localhost initrd]# cd

[root@localhost ~]# mkdir /root/iso/Custom

[root@localhost ~]# cp MegaCli-2.00.15-1.i386.rpm /root/iso/CentOS

[root@localhost ~]# cp /tmp/megasr/2.6.18-194.el5/megasr.ko /root/iso/Custom

[root@localhost ~]# cp nload-0.7.4.tar.gz /root/iso/Custom

10、安装上述定制的软件包,我们需要配置ks.cfg文件,具体ks.cfg的配置文件如下:

[root@localhost ~]# cd /root/iso

[root@localhost iso]# vi ks.cfg

1. # Kickstart file automatically generated by anaconda. 2. 3. install 4. cdrom

5. lang en_US.UTF-8

6. langsupport --default=en_AU.UTF-8 en_US.UTF-8 zh_CN.UTF-8 zh_HK.UTF-8 zh_CN.UTF-8

zh_SG.UTF-8 zh_TW.UTF-8 en_AU.UTF-8 7. keyboard us

8. # Network information

9. network --device=eth0 --bootproto=dhcp --onboot=on 10. rootpw 123456.

11. authconfig --enableshadow --enablemd5 12. firewall --disabled 13. selinux --disabled 14. timezone Asia/Shanghai 15. bootloader --location=mbr

16. # The following is the partition information you requested 17. # Note that any partitions you deleted are not expressed 18. # here so unless you clear all partitions first, this is 19. # not guaranteed to work 20. clearpart --all --drives=sda

21. # part /boot --fstype ext3 --size=200 22. # part swap --size=8196

23. # part / --fstype ext3 --size=50000

24. # part /movies --fstype ext3 --size=100 --grow 25. # Reboot after installation 26. reboot 27. %packages 28. @base

29. @chinese-support 30. @core

31. @development-libs 32. @development-tools 33. @dialup 34. @editors 35. @ftp-server

36. @legacy-network-server 37. @legacy-software-development 38. @legacy-software-support 39. @server-cfg 40. @system-tools 41. @text-internet 42. keyutils 43. trousers 44. fipscheck

45. device-mapper-multipath 46. perl-Convert-ASN1 47. imake 48. lsscsi 49. audit 50. net-snmp-utils 51. sysstat 52. iptraf 53. dstat 54. expect 55. MegaCli 56. gfs-utils 57. gfs2-utils 58. OpenIPMI-tools 59.

60. %post --nochroot 61.

62. # 挂载光驱

63. mkdir -p /mnt/cdrom

64. mount -r -t iso9660 /tmp/cdrom /mnt/cdrom 65.

66. # 拷贝Logic MegaRAID SAS 1078 raid卡驱动文件到系统驱动目录下

67. cp /mnt/cdrom/Custom/megasr.ko /mnt/sysimage/lib/modules/2.6.18-194.el5/updates/


关于U盘加载raid驱动及CENTSO的知识点.doc 将本文的Word文档下载到电脑
搜索更多关于: 关于U盘加载raid驱动及CENTSO的知识点 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219