on nfsboot 18.04 bionic, internet addresses arn't resolve properly

Bug #1765765 reported by beta-tester
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

since ubuntu 17.10, 18.04, when i nfsboot into ubuntu live an internet address isn't resolved properly.
i always have to put a dns server to the /etc/resolv.conf file by hand to get address resolving to work again.

it wasn't an issue in ubuntu 16.04 and not an issue in ubuntu 17.04.
it began to be an issue starting with ubuntu 17.10 and ist still an issue now 18.04 daily-live.

the different between /etc/resolv.conf of ubuntu <=17.04 and utuntu >=17.10 is, that now only one entry is in the resolv.conf file with IP 127.0.0.53
in the erlier version there was an additional entry on top with the IP of the local DNS server(router).

when i nfsboot ubuntu 18.04, adjust the /etc/resolv.conf file by hand to get internet address resolving to work,
when i then install ubuntu 18.04 from that environment to the local harddrive, the networksettings on the newly installed local harddisk is always setted up to "manual" IP in the /etc/network/interfaces - so it will not get a proper IP from the router.
after a new installation, i always have to set it up "dhcp" to get the IP from the router as usual.

Revision history for this message
beta-tester (alpha-beta-release) wrote :

there is a side note about that issue in report:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1754777

and i asked a question about that issue earlier, but never got a proper answer:
https://answers.launchpad.net/ubuntu/+question/663724

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in casper (Ubuntu):
status: New → Confirmed
Revision history for this message
beta-tester (alpha-beta-release) wrote :

still an issue of ubuntu 18.04.1

Revision history for this message
Guillermo (guillermo-etsetb) wrote :

@beta-tester: Seems to work for me using 18.04.2

Here's my boot line (using iPXE):
kernel ${httpserver}/casper/vmlinuz root boot=casper keyboard-configuration/layoutcode=${layout} locale=${locale} netboot=cifs nfsroot=${server}${nfs_path} NFSOPTS=-ouser=guest,pass=guest,vers=2.0,ro ro

Revision history for this message
Brian Nelson (bhnelson) wrote :

Works for me on 18.04.1

Do you have 'ip=dhcp' included in your kernel boot line?

Revision history for this message
Guillermo (guillermo-etsetb) wrote :

Hi Brian,

No, I had to remove it since including it triggered some errors during boot.
IIRC, one was "failed to raise network interfaces". I've tried with 18.04.2 and networking works, but there's only the raising network interfaces error.

In both cases, gnome says that networking is "unmanaged". Does it make sense?

Here's an extract from syslog under 18.04.2 with ip=dhcp:
Feb 20 07:14:06 ubuntu avahi-daemon[924]: Failed to open /etc/resolv.conf: Invalid argument
Feb 20 07:14:07 ubuntu NetworkManager[909]: <warn> [1550646847.4309] Error: failed to open /run/network/ifstate
Feb 20 07:14:09 ubuntu ifup[1367]:Error: any valid prefix is expected rather than "dhcp/dhcp".
Feb 20 07:14:09 ubuntu ifup[1367]: Failed to bring up dhcp.
Feb 20 07:14:09 ubuntu systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Feb 20 07:14:09 ubuntu systemd[1]: networking.service: Failed with result 'exit-code'.
Feb 20 07:14:09 ubuntu systemd[1]: Failed to start Raise network interfaces.ls -la

The invalid argument error is also present when I boot without ip=dhcp, but that's all.

affects: casper (Ubuntu) → systemd (Ubuntu)
Revision history for this message
beta-tester (alpha-beta-release) wrote :

i never used ip=dhcp in the boot menu entries.

strange i had those resolv issue with ubuntu 19.04 daily (pending) from 2019-02-14 for sure.
now i tried again with ubuntu 19.04 daily (pending) from 2019-02-20, and now it seems to be not an issue.

i also tried the other versions 18.10 and 18.04.2... there it is no issue with resolv anymore.

the only thing i could notice now was, that resolving (ping google.de) takes a bit longer under 19.04 daily than under 18.10 / 18.04.2... or maybe it is only my mind.

at the moment i can not reproduce my ony reported resolv issue. :/

pxe boot menu entries:
    ########################################
    LABEL ubuntu-daily-x64
        MENU LABEL Ubuntu x64 Daily-Live
        KERNEL http://192.168.0.1/nfs/ubuntu-daily-x64/casper/vmlinuz
        INITRD http://192.168.0.1/nfs/ubuntu-daily-x64/casper/initrd
        APPEND nfsroot=192.168.0.1:/srv/nfs/ubuntu-daily-x64 ro netboot=nfs file=/cdrom/preseed/ubuntu.seed boot=casper -- debian-installer/language=de console-setup/layoutcode=de keyboard-configuration/layoutcode=de keyboard-configuration/variant=German
        TEXT HELP
            Boot to Ubuntu x64 Daily-Live
            User: ubuntu
        ENDTEXT

    ########################################
    LABEL ubuntu-x64
        MENU LABEL Ubuntu x64
        KERNEL http://192.168.0.1/nfs/ubuntu-x64/casper/vmlinuz
        INITRD http://192.168.0.1/nfs/ubuntu-x64/casper/initrd
        APPEND nfsroot=192.168.0.1:/srv/nfs/ubuntu-x64 ro netboot=nfs file=/cdrom/preseed/ubuntu.seed boot=casper systemd.mask=tmp.mount -- debian-installer/language=de console-setup/layoutcode=de keyboard-configuration/layoutcode=de keyboard-configuration/variant=German
        TEXT HELP
            Boot to Ubuntu x64 Live
            User: ubuntu
        ENDTEXT

    ########################################
    LABEL ubuntu-lts-x64
        MENU LABEL Ubuntu LTS x64
        KERNEL http://192.168.0.1/nfs/ubuntu-lts-x64/casper/vmlinuz
        INITRD http://192.168.0.1/nfs/ubuntu-lts-x64/casper/initrd
        APPEND nfsroot=192.168.0.1:/srv/nfs/ubuntu-lts-x64 ro netboot=nfs file=/cdrom/preseed/ubuntu.seed boot=casper systemd.mask=tmp.mount -- debian-installer/language=de console-setup/layoutcode=de keyboard-configuration/layoutcode=de keyboard-configuration/variant=German
        TEXT HELP
            Boot to Ubuntu LTS x64 Live
            User: ubuntu
        ENDTEXT

Revision history for this message
Brian Nelson (bhnelson) wrote :

@Guillermo
The OS shouldn't be trying to raise the interface as it's already configured during the boot process. You can't reconfigure the network interface while you're booting from the network :)
You need to modify /etc/network/interfaces on your boot server to set the interface to manual. See step 5 under 'creating your NFS installation' on this page
https://help.ubuntu.com/community/DisklessUbuntuHowto

Related to this, I also set 'net.ifnames=0' in the kernel boot line so the network devices are always named ethX rather than hardware-specific names. That's personal preference though.

@beta-tester
Strange. Without specifying 'ip=dhcp' perhaps it was sometimes getting a bootp or rarp response without a DNS server settings? Just a guess. If 'ip=X' isn't set, it defaults to any autoconfig protocol. I'd suggest setting the ip option specifically to dhcp if that's what you expect it to use.
https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt

Revision history for this message
Brian Brunswick (brian-ithil) wrote :

Just to confirm that for me also, 18.04.2 vs 18.04.1 fixes this issue and the systemd resolver is correctly picking up the dns from the non-managed interface that resulted from the network boot with ip=dhcp.

This is using the casper images with no modification - I still have to supply either 'toram' or 'systemd.mask=dev-hugepages.mount systemd.mask=dev-mqueue.mount systemd.mask=sys-fs-fuse-connections.mount systemd.mask=sys-kernel-config.mount systemd.mask=sys-kernel-debug.mount systemd.mask=tmp.mount' to dodge round the other issues, and note that the initrd has changed name from initrd.lz to initrd between .1 and .2

Just for the record, here my pxelinux configs, for a server at ...212

label bionic2toram
        kernel ubuntu-18.04.2-desktop-amd64/casper/vmlinuz
        append initrd=ubuntu-18.04.2-desktop-amd64/casper/initrd ip=dhcp toram boot=casper netboot=nfs nfsroot=192.168.10.212:/netboot/ubuntu-18.04.2-desktop-amd64

label bionic2
        kernel ubuntu-18.04.2-desktop-amd64/casper/vmlinuz
        append initrd=ubuntu-18.04.2-desktop-amd64/casper/initrd ip=dhcp boot=casper netboot=nfs nfsroot=192.168.10.212:/netboot/ubuntu-18.04.2-desktop-amd64 systemd.mask=dev-hugepages.mount systemd.mask=dev-mqueue.mount systemd.mask=sys-fs-fuse-connections.mount systemd.mask=sys-kernel-config.mount systemd.mask=sys-kernel-debug.mount systemd.mask=tmp.mount

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.