Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
a temporary solution for your dns issue is: sudo echo "nameserver 8.8.8.8" >> /etc/resolv.conf && sudo /etc/init.d/networking restart but this will get overriden on next reboot. –  user91091 Oct 11 '12 at 18:47
    
Will this work when booted from the CD in rescue mode? –  Marc Oct 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. –  user91091 Oct 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! –  Marc Oct 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.

share|improve this answer
2  
I don't see how network/internet access is related to a Grub installation. Please clarify. –  gertvdijk Dec 28 '12 at 15:13

Indeed 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.

share|improve this answer
1  
So why not accept the correct answer by @J.Porter? –  Donal Lafferty Jul 8 '13 at 14:14

protected by Community May 13 '13 at 19:01

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.