System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to mannually update initrd

 
SOLVED
Go to solution
Highlighted
Regular Advisor

How to mannually update initrd

Hi,
We have a failed Linux blade that will not boot due to a possible incorrect qlogic driver for our EVA4100 SAN, caused by a firmware update for iLO.

At the present time the system is booted into rescue mode, where the existing Linux installation is mounted to /mnt/sysimage. Unknowingly, the /boot partion is not mounted to /boot directory when in rescue mode.

We need to update the Qlogic to a newer version, so I performed 'rpm -e --root=/mnt/sysimage /mnt/sysimage/root/qlogic/hp_qla2x00-2007-10-05b/hp_qla2x00src-8.01.07.25.02-1.linux.rpm' to erase the old rpm. The command seemed to execute well, except the last messeage displayed was 'Your initrd has not been updated. You will need to do that manually'.

I am assuming this message is because the /boot directory was not mounted and rpm could find it.

So, how do I update initrd manually, to finish the rpm erase?

Thanks,
Randy
2 REPLIES 2
Highlighted
Exalted Contributor
Solution

Re: How to mannually update initrd

Shalom,

Number of good docs on this topic:
http://www.ibm.com/developerworks/linux/library/l-initrd.html

http://www.opennet.ru/docs/HOWTO/Kernel-HOWTO-11.html

http://ha.redhat.com/docs/manuals/linux/RHL-7-Manual/ref-guide/s1-sysadmin-build-kernel.html

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Highlighted
Honored Contributor

Re: How to mannually update initrd

Initrd creation is a process that is specific to your Linux distribution: different distributions use different scripts and tools for the job.

I'm taking a wild guess and assuming you're using RedHat Enterprise Linux, or CentOS.

As you're in rescue mode:

chroot /mnt/sysimage /bin/bash
... and suddenly it'll look much more like a normal running system.

Make sure /proc, /sys and /boot are mounted; if they aren't, mount them now. Be aware that files like /etc/mtab will probably have stale data from the last time the system was running normally, so check for mounts with "cat /proc/mounts" instead of using "mount" with no options.

Go to /boot directory: you'll see one or more kernel files, and their corresponding initrds. Identify the kernel version (or versions) whose initrd you'll want to modify.

RedHat's initrd creation command is "mkinitrd". It won't overwrite an existing initrd file, so rename the existing initrd file for your chosen kernel. Remember the name: if something goes wrong, you can edit the boot configuration in the bootloader and substitute the old initrd in place of the standard name.

Then run:
mkinitrd /boot/initrd-.img

MK
MK