Skip navigation.
Reports from the fronline in IT

Redhat linux - update the kernel image mkinitrd

Here is the best way that I've found to do a driver change for a RedHat style linux system following kernel changes. I've done mkinitrd commands but have always thought that there should be something that would speed up the process. Here's what I found.

What was I doing?

Moving from having my file systems on a single normal partition to one on a md device so I could mirror it.

I'll write about the change itself, but the hardest part was to work out the easiest way to get the kernel to boot. With the changes required done to the system, there is still the boot process to work out.

mkinitrd - this is the one that will recreate the image, but there must be a more simple method of doing it. This got me to thinking, that when a kernel upgrade is applied the rpm must be updating initrd.img file.

Running an rpm --scripts over a kernel package shows the command that I'm looking for:

rpm -q --scripts -p /var/cache/yum/fedora/packages/kernel-2.6.23.1-42.fc8.i686.rpm

/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install  2.6.23.1-42.fc8

running the new-kernel-pkg with the flags will update kernel drivers, the initrd image file and update the boot menu too.

I do like it when there is something simple that works too!