14
May
2022
0:28

Temporary name resolution error in Recovery Mode on Debian

14 May 2022 0:28

Network Manager does not work in recovery mode, which is why name resolution does not occur. Temporary name resolution error:Temporary problem with name resolution.

Description of the situation

The problem is that it is impossible to install the package from the ftp.ru.debian.org repository when executing the apt install command, since in Recovery Mode there is no network, there is no resolution of server names using the DNS service.

Solution

All actions in recovery mode are performed as the root user (enter your password).

Connect the twisted pair network cable (patch cord) of the local network to the network socket of the PC.

1) find out what the Ethernet network card for a wired connection is called:

ip addr

The name of the network card will most likely be enp2s0, but could be eth0.

2) Correct the /etc/network/interfaces file

nano /etc/network/interfaces

add two lines to the file, after “loopback”:

auto lo
iface lo inet loopback
iface enp2s0 inet dhcp
auto enp2s0

Where enp2s0 is the name of the network card from step 1.

Press Ctrl+O, Ctrl+X to save the file and exit the nano editor.

3) in the configuration file for the name resolution service, temporarily add a verified DNS server, and put the symbol next to the old one#comments:

nano /etc/resolv.conf

# nameserver 192.168.1.1

nameserver 8.8.8.8

New option: leave the resolv.conf file unchanged, but create another file "tail":

sudo nano /etc/resolvconf/resolv.conf.d/tail

nameserver 8.8.8.8

Also press Ctrl+O, Ctrl+X

4) Turn on the network with a command that will also start the necessary services:

ifup enp2s0

5) Wait a little, the network will initialize, and a prompt will appear in the terminal - symbol#or $.

6) Check that the network is now working, including name resolution (DNS):

ping ftp.ru.debian.org

Now you can run the command sudo apt install from the console. The package will be downloaded from the Internet.



Related publications