9 users online | 9 Guests and 0 Registered

How do I rebuild the initramfs on Genesis RX that kernel panics when trying to boot?


When an RHEL6 (or equivalent system like a Genesis RX 4.4.x) cannot read the initramfs (inital RAM filesystem) from /boot/, it will typically given an error like:

VFS: Cannot open root device "UUID=$UUID" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Pid: 1, comm: swapper Not tained 2.6.32-573.3.1.el6.x86_64 #1
Call Trace:

You have a few options to boot the system to a point that you can do some troubleshooting and fixing:

  1. Boot into single-user mode. This will load the bare minimum of system utilities, with the goal of just getting you to an interactive root prompt. To do this, hit a at GRUB. This should give you an editable line with the kernel version, as well as some default options. Append the word single to the end of the options, and then follow the instructions to boot.
  2. Boot into emergency mode. Do the same as above, except use the word emergency instead of single
  3. Boot off a CentOS DVD of the same OS version as your system to be rescued, and then follow the menus to do "Rescue installed system" opting to not start network interfaces, and "Continue" to allow it to try to find the installed system and mount it. Keep in mind with this mode that you will be in a rescue environment, and the path to your installed system will be /mnt/sysimage/. Feel free to chroot for convenience and safety.

The differences between these three modes are explained here.

Once at an interactive shell, run the command below:

dracut -f /boot/initramfs-2.6.32-220.7.1.el6.x86_64.img 2.6.32-220.7.1.el6.x86_64

Here is a breakdown of that command:

dracut - The event-driven initramfs infrastructure tool you will use

-f - Specify the path for where to place the initramfs file

/boot/initramfs-2.6.32-220.7.1.el6.x86_64.img - The path we are choosing to use. Be sure that you are specifying the path to the installed system. For example, if you are using a rescue image, this will be at /mnt/sysimage/boot/initramfs-2.6.32-220.7.1.el6.x86_64.img. Consider using a chroot.

2.6.32-220.7.1.el6.x86_64 - The exact kernel version we are building

Average rating:0 (0 Votes)

Login

Please enter your login name and password.

Sign up

Add question

Ask your question below: