Hi,

(installing Bionic here)

a possible solution is to make sure, /target/run is already mounted
(bind-mount to /run) when debootstrap is running which will make systemd
create its resolv.conf copy in the correct /run-filesystem. Otherwise,
it would write to the /target-partition and in-target would hide the
stuff in there when doint its bind-mounts.

For now I create (and make executable) the script /usr/lib/base-
installer.d/41init-run via early_command:

#!/bin/sh
mkdir -p /target/run
mount --bind /run /target/run

IMHO this should be done by the base-installer.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to resolvconf in Ubuntu.
https://bugs.launchpad.net/bugs/1713149

Title:
  resolv.conf symlink is broken after clean debootstrap

Status in resolvconf package in Ubuntu:
  Fix Released
Status in systemd package in Ubuntu:
  Invalid

Bug description:
  Reproducer:
   - debootstrap artful artful

  Expected:
   - "chroot artful cat /etc/resolv.conf" doesn't fail.
   - /etc/resolv.conf is a symlink to something valid in /run

  Actual:
   - "chroot artful cat /etc/resolv.conf" gets you "No such file or directory"
   - /etc/resolv.conf is a symlink to "../run/resolvconf/resolv.conf"
   - "../run/resolvconf/resolv.conf" is a symlink to 
"../run/systemd/resolve/stub-resolv.conf" which is an invalid symlink as that 
points to /run/run/systemd/resolve/stub-resolv.conf" rather than 
"/run/systemd/resolve/stub-resolv.conf"

  This causes all LXC image creation to fail, causing autopkgtest to
  fail (as noticed by the kernel team) and has been causing all images
  to fail building on the upstream build system for the past two days.


  root@vm04:~# chroot artful ls -lh /etc/resolv.conf /run/resolvconf/
  lrwxrwxrwx 1 root root   29 Aug 25 20:20 /etc/resolv.conf -> 
../run/resolvconf/resolv.conf

  /run/resolvconf/:
  total 4.0K
  -rw-r--r-- 1 root root    0 Aug 25 20:21 enable-updates
  drwxr-xr-x 2 root root 4.0K Aug 25 20:20 interface
  lrwxrwxrwx 1 root root   39 Aug 25 20:18 resolv.conf -> 
../run/systemd/resolve/stub-resolv.conf

  root@vm04:~# chroot zesty ls -lh /etc/resolv.conf /run/resolvconf/
  lrwxrwxrwx 1 root root   29 Aug 25 20:20 /etc/resolv.conf -> 
../run/resolvconf/resolv.conf

  /run/resolvconf/:
  total 8.0K
  -rw-r--r-- 1 root root    0 Aug 25 20:20 enable-updates
  drwxr-xr-x 2 root root 4.0K Aug 25 20:20 interface
  -rw-r--r-- 1 root root  357 Aug 25 20:15 resolv.conf

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1713149/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to