vmware official document. KB Article 1002402 Updated Sep. 12, 2008
http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1002402&sliceId=2&docTypeID=DT_KB_1_1&dialogID=14730726&stateId=0%200%204678181After Converting Physical RHEL4 System to a Virtual Machine, System Cannot See Hard Disks and Kernel Panics | KB Article | 1002402 | Updated | Sep. 12, 2008 |
|
|
|
Products
| |
|
|
|
Details
| |
|
|
After using VMware Converter to convert a physical RHEL4 host into a virtual machine running on ESX Server 3.0.x, the RHEL4 guest operating system fails to boot. The following error message is returned:
No volume groups found
Followed by:
Kernel panic - not syncing: Attempted to kill init!
Note: This issue might also apply to other Linux distributions.
|
Solution
| |
|
|
The issue occure because the initial ramdisk image does not include the drivers or modules for the LSILogic virtual SCSI adapter in an ESX Server 3.0.x virtual machine. These modules are not in the initial ramdisk image because the image is originally created on a system that does not use this hardware. To fix this issue, you must replace the existing initial ramdisk image with a new one that includes the proper drivers.
Here are the steps required to do this:
Remember to make a snapshot of your virtual machine before starting, and create a backup copy of any files to be edited.
Because the RHEL4 installation in the virtual machine is not currently bootable, boot the virtual machine from the first RHEL4 installation disk.
At the first prompt, type
linux rescue
and press Enter to boot into rescue mode.
Enter the following command to change root to the mounted RHEL installation:
chroot /mnt/sysimage
If the physical host was IDE-based, check the following files for any cases of /dev/hda, and replace with /dev/sda:
/etc/fstab
/boot/grub/device.map
/boot/grub/grub.conf
Ensure that grub is installed properly with the following command:
grub-install
Edit the file /etc/modules.conf and remove anything it contains. This should be an empty file. If the file does not exist, that is OK (you do not need to create it).
Edit the file /etc/modprobe.conf, remove all existing lines, and replace them with the following 3 lines:
alias eth0 pcnet32
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptscsih
Determine the full path to the initial ramdisk image you are going to rebuild. The initial ramdisk will be located in /boot. List the directory:
ls /boot
You see a file with a name similar to initrd-2.6.9-42.EL.img. In this case, the full path to this file is /boot/initrd-2.6.9-42.EL.img.
Determine the kernel version to use for rebuilding the initial ramdisk image. Each installed kernel has their own folder in /lib/modules. List the directory:
ls /lib/modules
You see a folder with a name similar to 2.6.9-42.EL.
Rebuild the ramdisk with the following command (replacing the path to the initial ramdisk image, and the kernel version with the ones you determined in the previous two steps. If there were multiple options, choose the newest ones, or check /etc/grub.conf to see which version is in use. Be sure the version number in the initial ramdisk image path matches the kernel version.):
mkinitrd -v -f /boot/initrd-2.6.9-42.EL.img 2.6.9-42.EL
Explanation of this command:
mkinitrd: Make initial ramdisk
-v: Be verbose
-f: Force overwrite if file already exists (you want to replace the existing file)
/boot/initrd-2.6.9-42.EL.img: Path to the file to write (which is already pointed to by /etc/grub.conf)
2.6.9-42.EL: Kernel version to use, which tells mkinitrd where to find the modules to include.
Reboot.
Important: After you have booted the system successfully and determined it is working as expected, remember to delete the snapshot you created in step 1.
|
Product Versions
| |
|
|
|
Keywords
| |
|
|
guest OS; RHEL 4
|
Last Modified Date: 09-12-2008ID: 1002402 |
No comments:
Post a Comment