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.

Will this work when booted from the CD in rescue mode?
–
MarcOct 11 '12 at 20:39

I've never used rescue mode. But if you have connection to modem but having dns issues, this should work. For example, if you can ping your IP, but can't ping google, this should work.
–
user91091Oct 11 '12 at 20:49

I got this to work...I have no idea why it worked. I wiped the install and reinstalled without network connectivity (I disabled the virtual network interface). The boot loader installed without issue. After rebooting, Ubuntu Server came up. I shut it down, reconnected the virtual NIC, brought it back up, and we're good!
–
MarcOct 11 '12 at 20:53

2 Answers
2

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.