Ubuntu: Network Problem While Reinstalling Grub


I'm trying to reinstall grub on a second disk, following the instructions at Purge & Reinstall Grub.

After doing sudo chroot /mnt, when I attempt apt-get update, I get lot of failed to fetch messages. Apparently DNS is not working, since running the host command on any hostname times out: no servers could be reached.

If I exit the chroot, host and apt-get update work just fine.


According to your description your chrooted environment has no information about valid nameservers (DNS). You can copy the file /etc/resolv.conf into the etc directory of your chroot environment. You could also edit the file /mnt/etc/resolv.conf (or if you are inside the chroot in /etc/resolv.conf) and add the line


This uses a nameserver from Google.

When your system has valid information about DNS servers it will work again as expected.


Inside the chroot, edit /etc/resolv.conf (nano /etc/resolv.conf) and insert the following line:


Name resolution should work now.

PS: Press Ctrl+O,Enter to save the file in nano and Ctrl+X to exit.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »