uck-gui: cp: not writing through dangling symlink, Failed to copy resolv.conf

Asked by Jean Boucher

Followed https://help.ubuntu.com/community/DebootstrapChroot and found it not to work using MIRROR = file:///... pointing to a mounted ubuntu-14.04.5-desktop-i386.iso (probably because debootstrap isn't meant to be used with ISO CD's, even with --variant=minbase it complained about not finding apt), then I saw the TLDR section at the bottom of that page (too late). I thought uck-remaster-* would be an easier alternative to debootstrap but it gave the following error (see !!! below):

   user@SwDevHost:~$ export BASEDIR=/srv/chroot/Ubuntu_14.04.5
   user@SwDevHost:~$ sudo mkdir -p $BASEDIR
   [sudo] password for user:
   user@SwDevHost:~$ ll $BASEDIR
   total 8
   drwxr-xr-x 2 root root 4096 Aug 29 15:20 ./
   drwxr-xr-x 6 root root 4096 Aug 29 15:20 ../
   user@SwDevHost:~$ sudo uck-remaster-unpack-iso Downloads/ubuntu-14.04.5-desktop-i386.iso "$BASEDIR" && sudo uck-remaster-unpack-rootfs "$BASEDIR" && sudo uck-remaster-unpack-initrd "$BASEDIR"& sudo uck-remaster-unpack-ro
   user@SwDevHost:~$ sudo uck-remaster-chroot-rootfs /srv/chroot/Ubuntu_14.04.5/
   ...
   Copying resolv.conf...
   cp: not writing through dangling symlink '/srv/chroot/Ubuntu_14.04.5//remaster-root/etc/resolv.conf'
   Failed to copy resolv.conf, error=1

I then noticed there was a uck GUI so I gave it a try, but got the same thing (because its scripts just call uck-remaster-* I guess):

user@SwDevHost:/srv/chroot$ uck-gui
Gtk-Message: 09:14:54.801: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:15:06.908: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:15:15.333: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:15:19.202: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:15:21.582: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:15:43.492: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:16:02.466: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:16:50.182: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:16:58.128: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:17:25.673: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:17:34.754: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:17:38.671: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: 09:17:43.432: GtkDialog mapped without a transient parent. This is discouraged.
Preparing build environment...
Creating X authentication cookie...
Running build process...
Build (/usr/bin/uck-gui ) started at 2018-08-30 09:17:46
[sudo] password for user:
>> Ubuntu Customization Kit 2.4.7 on Ubuntu 18.04, 4.15.0-33-generic x86_64
Starting CD remastering on Thu Aug 30 09:17:50 PDT 2018
Customization dir=~/tmp/customization-scripts
Removing remastering root dir...
Removing ISO remastering dir...
Mounting ISO image...
mount: ~/tmp/remaster-iso-mount: WARNING: device write-protected, mounted read-only.
Unpacking ISO image...
Unmounting ISO image...
Mounting SquashFS image...
Unpacking SquashFS image...
Unmounting SquashFS image...
Removing win32 files...
Creating root home...
Mounting /proc
Mounting /sys
Mounting /dev/pts
Mounting /tmp
Mounting ~/tmp/remaster-root-home
Mounting ~/tmp/remaster-apt-cache
Mounting /run
Mounting ~/tmp/customization-scripts
Copying resolv.conf...
cp: not writing through dangling symlink '~/tmp/remaster-root/etc/resolv.conf' <--- !!!
Failed to copy resolv.conf, error=1
Copying fstab/mtab...
Creating DBUS uuid...
Deactivating initctl...
Deactivating update-grub...
Deactivating grub-probe...
Hacking grub-probe postinst/postrm...
Remembering kernel update state...
>> Customizing: Ubuntu 14.04, 4.4.0-31-generic i586
Err http://archive.ubuntu.com trusty InRelease

Err http://archive.ubuntu.com trusty-updates InRelease

Err http://archive.ubuntu.com trusty Release.gpg
  Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com trusty-updates Release.gpg
  Could not resolve 'archive.ubuntu.com'
Err http://security.ubuntu.com trusty-security InRelease

Err http://security.ubuntu.com trusty-security Release.gpg
  Could not resolve 'security.ubuntu.com'
Reading package lists...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/InRelease

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg Could not resolve 'archive.ubuntu.com'

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg Could not resolve 'security.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old ones used instead.
Installing language packs (en)...
Reading package lists...
Building dependency tree...
Reading state information...
language-pack-en is already the newest version.
language-pack-gnome-en-base is already the newest version.
language-pack-en-base is already the newest version.
language-pack-gnome-en is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Removing unnecessary language packages...
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  firefox-locale-de* firefox-locale-es* firefox-locale-pt*
  firefox-locale-zh-hans* language-pack-de* language-pack-de-base*
  language-pack-es* language-pack-es-base* language-pack-gnome-de*
  language-pack-gnome-de-base* language-pack-gnome-es*
  language-pack-gnome-es-base* language-pack-gnome-pt*
  language-pack-gnome-pt-base* language-pack-gnome-zh-hans*
  language-pack-gnome-zh-hans-base* language-pack-pt* language-pack-pt-base*
  language-pack-zh-hans* language-pack-zh-hans-base*
0 upgraded, 0 newly installed, 20 to remove and 0 not upgraded.
After this operation, 108 MB disk space will be freed.
(Reading database ... 176202 files and directories currently installed.)
Removing firefox-locale-de (47.0+build3-0ubuntu0.14.04.1) ...
Removing firefox-locale-es (47.0+build3-0ubuntu0.14.04.1) ...
Removing firefox-locale-pt (47.0+build3-0ubuntu0.14.04.1) ...
Removing firefox-locale-zh-hans (47.0+build3-0ubuntu0.14.04.1) ...
Removing language-pack-gnome-es-base (1:14.04+20160720) ...
Purging configuration files for language-pack-gnome-es-base (1:14.04+20160720) ...
Removing language-pack-es-base (1:14.04+20160720) ...
Purging configuration files for language-pack-es-base (1:14.04+20160720) ...
Removing language-pack-gnome-pt-base (1:14.04+20160720) ...
Purging configuration files for language-pack-gnome-pt-base (1:14.04+20160720) ...
Removing language-pack-gnome-zh-hans-base (1:14.04+20160720) ...
Purging configuration files for language-pack-gnome-zh-hans-base (1:14.04+20160720) ...
Removing language-pack-pt-base (1:14.04+20160720) ...
Purging configuration files for language-pack-pt-base (1:14.04+20160720) ...
Removing language-pack-zh-hans-base (1:14.04+20160720) ...
Purging configuration files for language-pack-zh-hans-base (1:14.04+20160720) ...
Removing language-pack-gnome-de-base (1:14.04+20160720) ...
Purging configuration files for language-pack-gnome-de-base (1:14.04+20160720) ...
Removing language-pack-gnome-de (1:14.04+20160720) ...
Removing language-pack-de-base (1:14.04+20160720) ...
Purging configuration files for language-pack-de-base (1:14.04+20160720) ...
Removing language-pack-gnome-es (1:14.04+20160720) ...
Removing language-pack-es (1:14.04+20160720) ...
Removing language-pack-gnome-pt (1:14.04+20160720) ...
Removing language-pack-gnome-zh-hans (1:14.04+20160720) ...
Removing language-pack-pt (1:14.04+20160720) ...
Removing language-pack-zh-hans (1:14.04+20160720) ...
Removing language-pack-de (1:14.04+20160720) ...
Processing triggers for software-center (13.10-0ubuntu4.1) ...
INFO:softwarecenter.db.update:no translation information in database needed
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
No protocol specified

** (zenity:2885): WARNING **: Could not open X display
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.

(zenity:2885): Gtk-WARNING **: cannot open display: :0
Script cancelled by user
Restoring kernel update state...
Reactivating initctl...
Reactivating update-grub...
Reactivating grub-probe...
Reactivating grub-probe postinst/postrm...
Removing generated machine uuid...
Removing generated fstab/mtab...
Removing crash reports...
Unmounting ~/tmp/remaster-root/var/cache/apt...
Unmounting ~/tmp/remaster-root/tmp/customization-scripts...
Unmounting ~/tmp/remaster-root/tmp...
Unmounting ~/tmp/remaster-root/sys...
Unmounting ~/tmp/remaster-root/run...
Unmounting ~/tmp/remaster-root/root...
Unmounting ~/tmp/remaster-root/proc...
Unmounting ~/tmp/remaster-root/dev/pts...
Cleaning up temporary directories...
Gtk-Message: 09:18:49.558: GtkDialog mapped without a transient parent. This is discouraged.
Build ended at 2018-08-30 09:19:23
user@SwDevHost:/srv/chroot$

I can't figure-out why cp is complain about a "dangling symlink". Should I run uck-gui as root (sudo uck-gui)?
Adding apt to the ISO CD images seems like it would be an easy enough fix to allow debootstrap to work with ISO CD images.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu Customization Kit Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jean Boucher (jbhme) said :
#1

Here's a little more info on my system and the file pointing to by that "dangling symlink" error:

user@SwDevHost:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
user@SwDevHost:~$
user@SwDevHost:~$
user@SwDevHost:~$ uname -a
Linux SwDevHost 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
user@SwDevHost:~$
user@SwDevHost:~$
user@SwDevHost:~$ ll -F /etc/resolv
ls: cannot access '/etc/resolv': No such file or directory
user@SwDevHost:~$ ll -F /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Aug 28 08:42 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
user@SwDevHost:~$ ll -F /run/systemd/resolve/stub-resolv.conf
-rw-r--r-- 1 systemd-resolve systemd-resolve 716 Aug 30 08:58 /run/systemd/resolve/stub-resolv.conf
user@SwDevHost:~$ cat /run/systemd/resolve/stub-resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
search myCompany.com
user@SwDevHost:~$

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Jean Boucher (jbhme) said :
#3

Are uck and uck-gui still supported?

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

Look at https://launchpad.net/uck and you will see

!!!PROJECT DISCONTINUED!!!

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.