1

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.

2 Answers 2

0

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

nameserver 8.8.8.8

This uses a nameserver from Google.

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

0

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

nameserver 8.8.8.8

Name resolution should work now.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .