2

In a cleanly installed Ubuntu Raring machine I am trying to perform a debootstrap of another system. Here's the exact command:

http_proxy=http://192.168.122.1:8000/ debootstrap --arch=amd64 raring /mnt/virtfs-test/

It runs fine, but almost at the end it failed:

[...]
I: Extracting zlib1g...
W: Failure trying to run: chroot /mnt/virtfs-test mount -t proc proc /proc
W: See /mnt/virtfs-test/debootstrap/debootstrap.log for details

The log file shows only this:

gpgv: Signature made Thu Apr 25 13:54:39 2013 CEST using DSA key ID 437D05B5
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key <[email protected]>"
gpgv: Signature made Thu Apr 25 13:54:39 2013 CEST using RSA key ID C0B21F32
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <[email protected]>"
chroot: failed to run command 'mount': Permission denied

That made me curious on why this would fail. I noticed I couldn't even chroot into there:

chroot /mnt/virtfs-test 
chroot: failed to run command ‘/bin/bash’: Permission denied

That led me to this ServerFault Q&A and I made this interesting discovery:

# ls -al /mnt/virtfs-test/lib64/
total 8
drwxr-xr-x  2 root root 4096 Aug 21 20:02 .
drwxr-xr-x 20 root root 4096 Feb  7  2013 ..
----------  1 root  123    0 Aug 21 20:02 ld-linux-x86-64.so.2

What? The file is not a link, it is empty and does not have any permission set? This makes no sense. So I linked the file as in the SF Q&A:

ln -s /lib/x86_64-linux-gnu/ld-2.17.so /mnt/virtfs-test/lib64/ld-linux-x86-64.so.2

Now I can chroot:

# chroot /mnt/virtfs-test 
groups: cannot find name for group ID 0
I have no name!@mymachine:/#

However, I am still curious as to why debootstrap failed. I am using debootstrap version 1.0.46ubuntu1 which is the fully updated version in Ubuntu Raring. I am unable to find any bugreport regarding this.

Does anybody have a clue?

Notes:

  • I performed all commands being fully root (sudo -i).
  • The filesystem I try to debootstrap onto is type 9p (VirtFS, inside a Ubuntu KVM virtual machine). I am not seeing any messages on the host machine after enabling this in the apparmor profile (/etc/apparmor.d/abstractions/libvirt-qemu on the host):

    /mnt/vms/virtfs-test/ rwl,
    /mnt/vms/virtfs-test/** rwl,
    
2
  • Seems likely to be a bug, however: It appears that the file (link) you were having trouble with should currently come from /mnt/virtfs-test/var/cache/apt/archives/libc6_2.17-0ubuntu5_amd64.deb after being downloaded from the ubuntu archive. When that file is extracted to a temporary location does it contain the link in its lib64 or an empty file? (Does the file match what's above for libc6?) I assume you are running from an amd64 architecture raring. Sep 8, 2013 at 4:47
  • lib64/ld-linux-x86-64.so.2 is a link rather than an empty file on my system and comes from the above deb. Sep 10, 2013 at 13:06

0

You must log in to answer this question.

Browse other questions tagged .