[Bug 1812466] Re: netboot: failed to parse DNS settings set by dhclient
Launchpad Bug Tracker
1812466 at bugs.launchpad.net
Sun Mar 31 23:50:22 UTC 2019
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: dropbear (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1812466
Title:
netboot: failed to parse DNS settings set by dhclient
Status in dropbear package in Ubuntu:
Confirmed
Status in initramfs-tools package in Ubuntu:
Confirmed
Bug description:
I am setting up diskless netboot for Ubuntu LiveCDs, with following
kernel arguments:
```
boot=casper netboot=nfs nfsroot=192.168.89.10:/extracted/livecd toram
```
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=192.168.88.1 202.38.64.56 202.38.64.17
```
The problematic code is in the `netinfo_to_resolv_conf` function of
`scripts/functions`. It sources `/run/net-ens3.conf` (which is
obviously not in correct shell syntax due to the space inserted
between multiple DNS servers) to get network settings:
```
. "$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_to_resolv_conf`.
I can confirm 18.10 LiveCDs are affected.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dropbear/+bug/1812466/+subscriptions
More information about the foundations-bugs
mailing list