Linux system boot processing method after P2V

Source: Internet
Author: User

Linux processing after P2V


/boot/

sh-3.2# mkinitrd-v-F initrd-2.6.18-164.el5.img $ (uname-r)

Kernel file name kernel version number to package


# #更新当前虚拟机的内核;

#如果修复光盘与系统不一至的情况: $ (uname-r) here directly knocks the kernel version number of the virtual machine;


Problem set:

The "Error loading operating system" message appears on boot, just use the disc to enter recovery mode, fix grub to boot up, and make sure that your virtual machine hard disk type is SCSI LSI Logic. Go to recovery mode


># fdisk-l #查看第几块硬盘上的第几分区挂载到了/boot, corresponding to the following root (hd0,0) here.

># chroot/mnt/sysimage/

># Grub

># Root (hd0,0)

># Setup (hd0)

># quit

># exit

># reboot


If you can see grub after rebooting, "Kernel Panic–not syncing:attempted to kill init!" appears during boot, and the SCSI driver needs to be modified in resume mode if it is not able to be turned on.


The above two reasons are because ESXi virtual machines only support SCSI virtual hard disk, when P2V finished Linux, the original IDE hard disk was replaced by virtual SCSI hard disk, but Linux is still the IDE settings, so it must be manually modified. In the case of Linux system standard processes, there are two ways to modify the IDE for SCSI: one is to fix grub. The second is the boot-loaded SCSI driver. Go to recovery mode again


># chroot/mnt/sysimage/

># vim/etc/modprobe.conf * Add the following line

Alias Scsi_hostadapter Mptscsih

># cd/boot/

># mkinitrd-v-F initrd-' uname-r '. img ' uname-r '

># exit

># reboot



# # #其它P2V转换教程

#http://demo.netfoucs.com/zhaoxu0312/article/details/23278035

1. In the advanced options, Post-conversion's reconfigure destination virtual machine does not choose.

2. Virtual Machine version Please select version 7.

I chose 8 and 9 to have the following conversion mistakes

FAILED:A General system error occurred:

Network error. Host <IP> Key can ' t be retrieved. (Return code 2)


Even adding all:all to the hosts.allow is useless.

Open your Vshpere client and login to your virtual machine, and I'm not kernel panic, it's the error loading operating system.


This is because grub has been hung up, and it must be changed using rescue mode.


After you select Rescue (rescue) and enter shell mode, first use FDISK-L to see which drive you are using now. Like mine is/dev/sda1 so it's the 1th hard drive, and the designation is


Sh>chroot/mnt/sysimage

Sh>grub

Grub>root (hd0,0)

Grub>setup (hd0)

Grub>quit

And then you can re-open the machine, if you and I have the FSCK.EXT4 wrong message, it is because the/etc/fstab, the partition of the UUID ran away. The system stops at the location of the root account password.


Log in, execute the Mount command first, or/etc/fstab is read-only.

Mount-o REMOUNT,RW/

Use the command Blkid to see the UUID of the/boot location, and to memorize this string, I am more lazy, so I use


Blkid>>/etc/fstab

Save the Blkid results in the fstab and then copy the line I want to the mount of/boot.



Finally, the network card was hung out and no device found for connection ' System eth0′.


To/etc/sysconfig/network-scripts/see Ifcfg-eth0, and then to/etc/udev/rules.d/70-persistent-net.rules to see if the Mac ran away.


My situation is, eth0 kidnapped the original physical machine of the network card Mac, after the conversion of a eth2, eth2 using the virtual machine configuration of the Mac, so I took apart from the ifcfg-eth2 of the ETH cut Light, the ifcfg-eth2 renamed Ifcfg-eth0, And then to change the content of/etc/udev/rules.d/70-persistent-net.rules, the eth0 Internet card mac is correct. This way the internet is OK.


Linux system boot processing method after P2V

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.