netboot: failed to parse DNS settings set by dhclient
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dropbear (Ubuntu) |
Fix Committed
|
Undecided
|
Unassigned | ||
initramfs-tools (Ubuntu) |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
I am setting up diskless netboot for Ubuntu LiveCDs, with following kernel arguments:
```
boot=casper netboot=nfs nfsroot=
```
I have noticed the following strange error messages after dhcp (also see the attachment):
```
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
no search or nameservers found in /run/net-ens3.conf /run/net-ens3.conf /run/net6-*.conf
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
/init: /run/net-ens3.conf: line 8: 202.38.64.56: not found
```
I manually broke the init process, and found line 8 of /run/net-ens3.conf is:
```
IPV4DNS0=
```
The problematic code is in the `netinfo_
```
. "$f" || { echo "WARN: failed '. \"$f\"'" 1>&2; return 1; }
```
The bug is introduced by commit a77729e9, which replaced IP-config with dhclient. While IP-config seems to write each DNS in `IPV4DNS0`, `IPV4DNS1`, etc., dhclient write all DNS in `IPV4DNS0`, which is not expected by `netinfo_
I can confirm 18.10 LiveCDs are affected.
Changed in initramfs-tools (Ubuntu): | |
status: | Confirmed → Fix Committed |
Changed in dropbear (Ubuntu): | |
status: | Confirmed → Fix Committed |
Another reasonable solution is to ask isc-dhcp packagers to change the dhclient hook script `/etc/initramfs -tools/ lib/etc/ dhcp/dhclient- enter-hooks. d/config` .
Currently it writes all DNS in IPV4DNS0: $new_domain_ name_servers" >> /run/net- $interface. conf
```
echo "IPV4DNS0=
```