How to fix a failing grub-pc package installation in Hyper-V virtual machine?
Emily Wong
I am trying to install Ubuntu Server 12.04 64 bit on a Windows Hyper-V virtual machine. I am having issues with the following error:
the grub-pc package failed to install into /target/I have tried the suggestion of doing a "rescue failed system" and doing the apt-get to repair the boot loader, but my virtual machine can't download the updates due to DNS issues (for some reason, it's not getting DNS resolution).
I have also tried reinstalling the boot loader in the rescue failed system, and the loader appears to install correctly (no errors). But after rebooting the system, it will not boot.
I'm including a screenshot.
42 Answers
I found that the "the grub-pc package failed to install" grub installation problem for Ubuntu 12.04.1 Server was related to the degree of network access. If there was no network connection (cable unplugged) Grub-PC installed OK (but then you need to configure the network by hand). If it was connected to an isolated or limited network (LAN access only or bad DNS) that could not contact an external ubuntu server, the Grub-PC installation failed. Only if it had full network access, was Grub-PC able to install correctly, ah including networking.
So my suggestion is to first troubleshoot your local network to make sure that it is providing complete Internet access. If it isn't, fix it, or completely disconnect from the network, do the install and then install and troubleshoot the network after the rest of the installation is complete.
3Indeed it is a problem of network access. I cannot figure it out why. I unplugged the network cable and repeated the installation procedure. With success! Grub installed without any issues.
1