Recently, I tried to install Rocks Cluster to some new computers. The problem is that newly introduced motherboards contain gigabit ethernet controllers whose drivers are not included in Linux installer. This gives a lot of troubles in installing the node.
Rocks documentation suggests re-compiling the kernel roll by putting in the device drivers. Somehow, the compiling process works but the installation has problems in finding in libs.
I found an easy way to insert the drivers, i.e., to modify the initrd.img.
The procedures are, for example,
1) in /tmp, mkdir /tmp/initdproject to create a work directory.
2) gunzip < /tftpboot/pxelinux/initrd.img > /tmp/initrdproject/initrd.img.unzipped
3) cd /tmp/initrdproject; mkdir initrd
4) cd initrd; cpio -idv < ../initrd.img.unzipped
5) mkdir /tmp/initrdproject/modules
6) cd /tmp/initrdproject/initrd/modules
7) gunzip < modules.cgz | (cd /tmp/initrdproject/modules && cpio -idv)
8) cp your driver, in my case r8168.ko: cp /somedir/r8168.ko /tmp/initrdproject/modules/2.6.18-53.1.14.el5/x86_64
9) verify your r8168.ko has the right attrib, if not, chmod 744 r8168.ko
10) cd /tmp/initrdproject/modules; find 2.6.18-53.1.14.el5 | cpio -ov -H crc | gzip > modules.cgz
11) copy back modules.cgz to replace the old one: cp /tmp/initrdproject/modules.cgz /tmp/initrdproject/initrd/modules
12)cd /tmp/initrdproject/initrd/modules, change module configuration files as following steps
13) edit module-info, add
r8168
eth
"RTL8168/8111 Gigabit Ethernet"
14) edit modules.alias, add
alias pci:v000010ECd00008168sv*sd*bc*sc*i* r8168
15) edit pci.ide, find 10ec Realtek ...., and add
8168 RTL8168/8111 Gigabit Ethernet
16) ok, pack things back now.
cd /tmp/initrdproject/initrd
find . | cpio --create --format='newc' > ../newinitrd
cd ..
gzip <> initrd.img
17) copy initrd.img back to replace the origin initrd.img (don't forget to backup).
No comments:
Post a Comment