虚拟化容器,大数据,DBA,中间件,监控。

Vmware P2V Linux conversion failed with showing grub prompt

21 03月
作者:admin|分类:容器虚拟化

Vmware P2V conversion failed with showing grub prompt

We tried to convert one of our physical machine running fedora15, using vmware tools. It started and failed exactly at 99% showing the following error

“An error occured during the conversion GrubInstaller:InstallGrub: /usr/lib/vmware-converter/installGrub.sh failed with return code:1, and message: FATAL: kernel too old Error running vmware-updateGrub.sh through chroot into /mnt/p2v-src-root”

Solution
1. Boot the virtual machine with the fedora15 DVD and select the ‘rescue’ option.
2. Once it boots chroot the /mnt/sysimage.
3. While giving fdsik -l, im getting the following error
“cannot open /proc/partitions”
Also, mount too get some errors like unable to read etc., So exited the /mnt/sysimage by “exit” command
4. Now, I gave the following
mount -o bind /proc /mnt/sysimage
mount -o bind /dev /mnt/sysimage

If we didn’t mount the second one /dev, we will get blank when we give fdisk -l. Only “/dev/null” is present, nothing else. So, we have to mount /dev also.

5) When you come to the console prompt type: chroot /mnt/sysimage

6) Type grub

7) Set the GRUB’s root device to the partition containing the boot directory like this:

grub> root (hd0,0)

Filesystem type is ext2fs, partition type 0x83

If you are not sure which partition actually holds this directory, use the command ‘find’ like this:

grub> find /boot/grub/stage1

This will search for the file name ‘/boot/grub/stage1’ and show the devices which contain the file.
Once you’ve set the root device correctly, run the command ‘setup’.

8) Then, run the command setup

grub> setup (hd0)

Checking if “/boot/grub/stage1” exists……. no
Checking if “/grub/stage1” exists……. yes
Checking if “/grub/stage2” exists……. yes
Checking if “/grub/e2fs_stage1_5” exists……. yes
Running “embed /grub/e2fs_stage1_5 (hd0)”……. 15 sectors are embedded
succeded
Running “install /grub/stage1 (hd0) (hd0) 1+15 p (hd0,2)/grub/stage2 /grub/grub.conf……. succeded
Done

This command will install GRUB boot loader on the Master Boot Record (MBR) of the first drive.

9) Type quit

grub> quit

GRUB is now in the MBR.

10) Finally, you’ll have to edit your /boot/grub/grub.conf, for example whith nano:

> nano /boot/grub/grub.conf

(/etc/grub.conf or /boot/grub/grub.conf or /boot/grub/menu.lst, they are the same file) This file has the boot partitions of the disk/s.

11) Restart your PC without the Fedora Core CD 1 Installation.

Reference:
http://www.fedoraforum.org/forum/showthread.php?t=975
http://www.sysresccd.org/forums/viewtopic.php?t=1684
http://communities.vmware.com/thread/425786

浏览2195 评论0
返回
目录
返回
首页
Linux P2V注意事项与常用方法 VM ESXI 从Red Hat P2V转换后开机不引导系统