T
T
Talyan2020-10-03 17:31:15
ubuntu
Talyan, 2020-10-03 17:31:15

How to specify DNS server when installing Ubuntu without GUI?

When installing Debian via a netisnt image in text mode, the installer asks for IP, Mask, Gateway, DNS.

When installing a fresh Ubuntu after unsuccessfully getting settings via DHCP, ubunta offers options such as:
1 - Retry DHCP setup (does not work, no DHCP on the network)
2 - Retry DHCP setup with hostname passed
3 - Configure network manually
4 - Skip network setup

First 2 options are immediately dismissed.
The 3rd option just stupidly does not work. When you select this item, Ubuntu does not offer to enter network settings, but stupidly immediately prompts you to select a mirror for downloading.
Why the 4th option on the netinst distribution?

Okay, I go to TTY2, I drive in
ip add add xxxx dev enp18
ip route add default via xxxy

Internet IP addresses are being pinged. But then how to add DNS?

resolv.conf does not exist at this stage of the installation. I added it myself, but to no avail.

It would be possible, as expected, to configure the netplan file via the yaml file, but at this stage of the installation, there is no netplan either.

The only thing that came to my mind was to put the IP of the mirror ru.archive.ubuntu.com in /etc/hosts

But the question arises - is this generally normal, or am I doing something wrong?

Z.Y.
DHCP is not possible in this option, because due to the location of some specific pieces of iron in the subnet, in which the static changes automatically to the DHCP address, as soon as the piece of iron sees the DHCP network.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Valdemar Smorman, 2020-10-04
@flapflapjack

In Ubuntu, Netplan rules the networks.
His config, and he can be under different names.
After installing the server or the bare system, it will be 01-netcfg.yaml.
If it is DE, then it will already be 01-network-manager-all.yaml.
Here they fit in with your hands, or you can add any network parameters to SED or AWK.
This file is always in the folder:
/etc/netplan
After editing, be sure to do it in the Terminal:
sudo netplan apply
And how and what to write, smoke Netplan mana.
In the open spaces of their shaft!

P
planc, 2020-10-03
@planc

well, the first link in googlezhzhzh:
https://www.tecmint.com/set-permanent-dns-nameserv...

K
ky0, 2020-10-03
@ky0

(does not roll, there is no DHCP on the network)

The most infrastructure-correct way is to fight with this.
DHCP is not possible in this option, because due to the location of some specific pieces of iron in the subnet, in which the static changes automatically to the DHCP address, as soon as the piece of iron sees the DHCP network.

Limit the issuance of addresses by poppies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question