LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   GRUB Error During Debian VM Conversion (https://www.linuxquestions.org/questions/debian-26/grub-error-during-debian-vm-conversion-4175647287/)

khan.zaib 01-30-2019 05:31 AM

GRUB Error During Debian VM Conversion
 
Hi All Experts,

I am facing a problem while migrating my Debian 8 VM from one Esxi Host to another Esxi using VCenter Converter. Vcentner converter start migrating the machine and gives the following error at the end of the conversion job.

Error is: An Error occurred during the conversion: 'GrunInstaller::InstallGrub:Failed to read GRUB configuration from /mnt/p2v-src-root/boot/grub/grub.cfg

When i power On the migrated VM with grub error then VM power on with Grub rescue mode.

Kindly guide me how can i get rid of this situation.

Machine OS : Debian 8
Esxi Version: 6.0
Vcenter Converter Version: 6.2

colorpurple21859 01-30-2019 05:40 AM

http://www.linuxandubuntu.com/home/w...over-grub-menu

khan.zaib 01-31-2019 03:11 AM

1 Attachment(s)
Thanks for the reply.

It is not working. i think the post is related to non migrated VM where grub is making issues, actually in my case the vm is migrated to another host and causing the issues.

As per article i tried the steps but not fruitful. I have also attache the screenshot after applying the steps and result is the same.

colorpurple21859 01-31-2019 05:05 AM

Your not in grub rescue. The grub.cfg isn't loaded does
Code:

ls /
show a /vmlinuz or ls /boot/grub/ have a grub.cfg file?
If you can locate you grub.cfg load it with the configfile <location of grub.cfg>
what is the ouput of
Code:

ls (hd0,msdos1)/

khan.zaib 01-31-2019 05:10 AM

1 Attachment(s)
Yes it is showing. I have also attach the screenshot of this. Kindly have a look

khan.zaib 01-31-2019 05:14 AM

1 Attachment(s)
And also check for grub.cfg file. No file is showing. Kindly have a look at attache screenshot.

khan.zaib 01-31-2019 05:18 AM

1 Attachment(s)
When Entering command ls (hd0,msdos1)/. gives the output attache in the screenshot. Kindly have a lok

colorpurple21859 01-31-2019 05:22 AM

you can also boot with
Code:

linux /vmlinuz root=/dev/mapper/c3us0-vg-root
initrd /initrd.img
boot

or something like that
or maybe
Code:

linux (hd0,1)/vlinuz root =/dev/sda1
initrd (hd0,1)/initrd.img
boot


Brains 02-10-2019 01:52 PM

The simplest way to repair boot issues with Debian is to boot a Debian install CD via optical disk, USB, or the ISO image in the VM. Select rescue/repair mode and after setting keyboard, language, and selecting the root & EFI/boot directory of the failed installation etc. you are presented with options, select "terminal or command prompt", it will automatically put you in a chroot in the failed installation where you can simply issue command: grub-install /dev/whatever, access to internet will be required if appropriate grub packages are not in the cache, or the packages can be transferred to the cache from removable media. The command: update-grub does not require installing anything and may be all that is needed.
A small net install CD image is sufficient.

khan.zaib 02-10-2019 10:07 PM

HI Brain,

I have already tried this option but no luck. After trying all the options i think that the machine is not properly migrated via vcenter convertor. With the same convertor i have migrated all the linux distributions, but only debian distribution is only making issues that is in the end vcenter convertor is unable to migrate the /boot directory of Debian OS.

Brains 02-12-2019 12:21 AM

I've just ran into an similar issue, I did updates on my offline Debian which hasn't been updated in a month. That computer has a boot manager and thus grub is installed to the partition. After updates I got a blinking underscore in top left of the screen, no boot. So had to burn the netinstall ISO to USB key and boot it into rescue mode, it did not see the root partition so had to manually chroot into it and issue the old: grub-install --force /dev/sda1 command, exited the chroot, umounted and rebooted to the grub menu.

I have not been pleased with vcenter converter's abilities and sorry I installed it. But found a nice converter called Starwind Converter, It converts to more if not all VM formats and works great. Found out about it in forums, lot's of kudos from people that used it. It's free, may be worth a try, check out the link.

khan.zaib 02-12-2019 12:27 AM

Hi Brain,

That's perfect dude, i am gonna check it out the starwind converter, and would it might get my issue resolved. Will try and let you know dear. One thing i have research more on this and found that if we copy the vm with rsync utility then this options also works well. let me try out startwind option first!!!


All times are GMT -5. The time now is 10:03 PM.