Question

This should be simple. Yet, it's giving me Hell.

Problem
I have compiled the latest kernel and when I reboot my box, it generates a kernel panic related to the filesystem.

Question
How do I get the new kernel to recognize the VMWare filesystem? There must be some setting somewhere that lets the Linux installation know that the "hard drive" is not really a drive but actually a file that represents a virtual machine.

Background
First and foremost, I am no Linux guru. This is my first time compiling the kernel. What I've done to get this problem:

  • Downloaded kernel version 2.6.34 from kernel.org
  • Unpacked the source into a directory
  • Followed the installation instructions here:
  • http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html
  • Basically, ran: make menuconfig, make, make modules, make modules_install, make install, reboot
  • I didn't really change anything in the make menuconfig section

Upon reboot, it failed with an error along the lines of:

No volume groups found
Volume group "VolGroup00" not found
Unable to access resume device (/dev/VolGroup00/LogVol01)
mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!

Environment
I am running Red Hat Enterprise Linux Server (2.6.18-194.3.1.el5PAE) under VMWare Fusion Version 3.1.0 (261058) running on a MacBook Pro with OS X v10.5.8 running a 2.8 GHz Intel Core Duo processor with 4GB 1067 MHz DDR3 memory. The virtual machine is allocated 2 processor cores and 2048 MB of memory. The VM hard disk setting points to the file "Red Hat Enterprise Linux 5.vmdk" with "Bus Type" set to "SCSI", "Disk Size" set to 40Gb and "Split into 2Gb Files" option checked.

When I use the following /boot/grub/menu.lst file, everything works perfectly except that it boots into the wrong kernel (2.6.18-194.3.1.el5PAE instead of 2.6.34):

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.34)
    root (hd0,0)
    kernel /vmlinuz-2.6.34 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    initrd /initrd-2.6.34.img
title Red Hat Enterprise Linux Server (2.6.18-194.3.1.el5PAE)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-194.3.1.el5PAE ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    initrd /initrd-2.6.18-194.3.1.el5PAE.img
title Red Hat Enterprise Linux Server (2.6.18-194.el5PAE)
    root (hd0,0)
    kernel /vmlinuz-2.6.18-194.el5PAE ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    initrd /initrd-2.6.18-194.el5PAE.img

When I use the following file (with the last lines commented out and a couple other small edits), it attempts to boot the correct kernel but the boot fails with the kernel panic described above:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.34)
    root (hd0,0)
    kernel /vmlinuz-2.6.34 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    initrd /initrd-2.6.34.img
    savedefault
    boot
#title Red Hat Enterprise Linux Server (2.6.18-194.3.1.el5PAE)
#   root (hd0,0)
#   kernel /vmlinuz-2.6.18-194.3.1.el5PAE ro root=/dev/VolGroup00/LogVol00 rhgb quiet
#   initrd /initrd-2.6.18-194.3.1.el5PAE.img
#title Red Hat Enterprise Linux Server (2.6.18-194.el5PAE)
#   root (hd0,0)
#   kernel /vmlinuz-2.6.18-194.el5PAE ro root=/dev/VolGroup00/LogVol00 rhgb quiet
#   initrd /initrd-2.6.18-194.el5PAE.img

I don't understand how, in one case, it can figure out VMWare's filesystem just fine while in the other case, it cannot. What am I missing? Is there some special VMWare-related compile option I should be choosing? Is there something on the VMWare Fusion side that I need to change? I can't figure this out!

Any and all suggestions are greatly appreciated!

Was it helpful?

Solution

Your kernel is probably unable to load the modules needed to locate your volumes.

My best guess is your initrd is not in the right place. It needs to be in the same directory as the installed kernel.

Also, it's not a good idea to follow Debian instructions for a RedHat system. In general it's ok, but you are doing something that is relatively distribution specific.

OTHER TIPS

I had a similar problem.

The kernel was much older than hardware. Hard drive was attached by SATA default. I reconfigured (in BIOS or in VM.Properties) hardware to connect by IDE. It worked for me, i'm happy :)

I received the kernel panic in a different situation. I had a RHEL 5.5 workstation in which the BIOS/motherboard failed. Therefore, I moved the OS drive to another PC which is identical (Dell T5500) and to another which is one generation back (Dell T5400). I have done this in the past, since Linux contains drivers for many motherboards, and the PC usually boots right up. Both kernel panics were identical. I was very surprised. I mentioned your resolution to a friend, and he remembered a BIOS Setting which could cause this to occur. We changed the BIOS->Drives ->SATA Operation-> RAID SATA to RAID AHCI. After changing this BIOS Setting, both PCs booted up with the RHEL5.5 OS HD!! The replacement PCs had Windows prior. He told me that Windows needs the ATA BIOS Setting while Linux requires the other. Who knew!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top