systemd /etc/resolv.conf setup on new installation breaks in-target package installation.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netcfg (Ubuntu) |
Confirmed
|
Undecided
|
Dimitri John Ledkov |
Bug Description
This Ubuntu systemd commit breaks in-target package installation on netboot installs.
The netboot initrd does not use systemd. /etc/resolv.conf is an actual generated file and there is no /run/systemd/
Package installation in /target is done through in-target. in-target bind mounts the initrd /run to /target/run. After base-installer installs the systemd deb in /target, any subsequent in-target invocation to install a package fails. The repository containing the package cannot be resolved because /target/
non-existent /target/
# chroot /target ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Aug 29 22:32 /etc/resolv.conf -> ../run/
# chroot /target ls -l /run/systemd/
total 4
-rw-r--r-- 1 root root 89 Aug 29 22:32 stub-resolv.conf
# chroot /target cat /etc/resolv.conf
search <redacted>
nameserver <redacted>
# chroot /target ls -l /run
total 12
drwxrwxrwt 2 root root 4096 Aug 29 22:30 lock
drwxr-xr-x 2 root root 4096 Aug 29 22:30 mount
drwxr-xr-x 3 root root 4096 Aug 29 22:32 systemd
-rw-rw-r-- 1 root utmp 0 Aug 29 22:30 utmp
# in-target ls -l /etc/resolv.conf
Aug 29 22:37:04 in-target: lrwxrwxrwx 1 root root 39 Aug 29 22:32 /etc/resolv.conf -> ../run/
# in-target ls -l /run/systemd/
Aug 29 22:40:27 in-target: ls: cannot access '/run/systemd/
Aug 29 22:40:27 in-target: : No such file or directory
# in-target cat /etc/resolv.conf
Aug 29 22:41:48 in-target: cat: /etc/resolv.conf
Aug 29 22:41:48 in-target: : No such file or directory
# in-target ls -l /run/
Aug 29 22:44:32 in-target: total 0
Aug 29 22:44:32 in-target: drwxr-xr-x 2 root root 40 Aug 29 22:26 lock
Aug 29 22:44:32 in-target: drwxr-xr-x 2 root root 60 Aug 29 22:26 mount
Aug 29 22:44:32 in-target: drwxr-xr-x 4 root root 100 Aug 29 22:30 udev
I believe debian-installer has resolvconf integration which used to fake this for us, and this must be extended to fake things for resolved too.