RedHat/CentOS 5 on Intel G33 based MotherBoard

Update: read this post first. Issue was fixed on CentOS 5.1.

This week I had to install CentOS5 on PCs with a new MoBo, having the Intel G33 Express chipset, and encountered two problems:

  • Kernel freezes on boot: after a quick search I found out that I should've added pci=nommconf to the kernel boot arguments. (I couldn't yet realise what this mmconfig means exactly)
  • e1000 ethernet driver:
    • Default kernel's driver is too old: a newer version of the e1000 driver is needed.
    • CentOS 5 installation doesn't recognize the pci Ethernet device as e1000: we should add the new pci id to the list

For those who don't need network at installation, the Ethernet driver may not matter much (they can install it afterwards). Instructions for enabling network (kickstart) are explained below.

1. Compile the new e1000 driver on a system with the exact same kernel of the installation.

2. Find the card's PCI ID - required for auto-discovery of the card at installation boot: modprobe command should realize that this PCI card needs the e1000 driver, automatically. (Choosing the driver manually in anaconda didn't really help me, I didn't figure out why). So, four ways to do that:

a. The accurate way (Thanks to Dan who helped me with this):

* Boot to Linux (yeah, not always trivial on a new PC, but try some live cd)

* Find the ethernet controller with 'lspci'. It has some id at the beginning of the line, such as 02:07.0.

* Find its directory file under /sys/devices, i.e. find /sys/devices -name \*02:07.0\*

* Read the file named modalias in that dir. You should find a string in this format: pci:v0000109Ed00000350sv00000000sd00000000bc04sc00i00

b. (The impossible way?) : Try to find the card in the Linux PCI IDs repository

c. The "let's try" way: Try the ID of my ethernet card (maybe it's the same for all the Intel G33 chipsets?): pci:v00008086d000010C5sv*sd*bc*sc*i*

d. The lazy way: Don't find the PCI ID, force anaconda to load this driver by putting something like: "alias eth0 e1000" in the modules.alias file as explained later. It'll do problems for other NICs though.

3. Last step: update the boot initrd.img: maybe there is a nice way, but I used the surgical way 🙂
What I did was extract the initrd.img, overwrite the old e1000.ko, update modules.alias file, and re-pack it:
(We assume that original initrd.img, and newly created e1000.ko are in /tmp)

Extract the initrd:
linbox:~# cd /tmp
linbox:/tmp# mkdir a
linbox:/tmp# cd a
linbox:/tmp/a# gunzip -c ../initrd.img | cpio -i
12907 blocks

Now we extract the modules archive:
linbox:/tmp/a# cp modules/modules.cgz /tmp
linbox:/tmp/a# mkdir ../b
linbox:/tmp/a# cd ../b
linbox:/tmp/b# gunzip -c ../modules.cgz | cpio -i

(now you get an error of nonexisting directory; maybe there's some flag I forgot, but I just manually did mkdir anyway..)
linbox:/tmp/b# mkdir -p 2.6.18-8.el5/i686
linbox:/tmp/b# gunzip -c ../modules.cgz | cpio -i
17254 blocks

Update the insides; first overwrite the with newly compiled module:

linbox:/tmp/b# cp /tmp/e1000.ko.good 2.6.18-8.el5/i686/e1000.ko

Pack the modules archive:
linbox:/tmp/b# find . | cpio -H newc -o | gzip -c > /tmp/modules.cgz.new
17255 blocks

Ok, we're back to business with the initrd.img contents, let's overwrite the modules archive with the one we've just created:
linbox:/tmp/b# cd ../a/modules
linbox:/tmp/a/modules# cp /tmp/modules.cgz.new modules.cgz

Now put the PCI ID you've found earlier (haven't you?)
linbox:/tmp/a/modules# vim modules.alias

Add the new pci id, i.e.: alias pci:v00008086d0000294Csv*sd*bc*sc*i* e1000

We're done! let's pack initrd.img:
linbox:/tmp/a/modules# cd ..
linbox:/tmp/a# find . | cpio -H newc -o | gzip -c > /tmp/initrd.img.new
12923 blocks

Yey.


3 thoughts on “RedHat/CentOS 5 on Intel G33 based MotherBoard

  1. Pingback: Web 0.2 » Blog Archive » More about the G33 Intel board/chipset and CentOS

Leave a Reply

Your email address will not be published. Required fields are marked *