The motivation for this question is that I am no longer able to create a functioning chroot with debootstrap on my Red Hat machine. About a year, and many Red Hat updates ago I was able to.
sudo debootstrap --arch amd64 trusty trusty http://archive.ubuntu.com/ubuntu
sudo chroot trusty
results in:
groups: cannot find name for group ID 0
groups: cannot find name for group ID 1027
I have no name!@wsdev66:/#
which is unexpected behavior, as well as a non-functional chroot. Expected output is root@wsdev66:/#. Google has lead me to believe that running /debootstrap/debootstrap --second-stage would resolve this, but no script or binary with that name exists there. There is a log file named debootstrap.log with the contents:
gzip: /usr/share/debootstrap/devices.tar.gz: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
which appears to be the source of the failed chroot.
ls indicates read permissions for all:
ll /usr/share/debootstrap/devices.tar.gz
-rw-r--r--. 1 root root 3518 Apr 6 09:33 /usr/share/debootstrap/devices.tar.gz
Checking for ACLs even though there shouldn't be any, judging from the results of the previous command:
getfacl /usr/share/debootstrap/devices.tar.gz
getfacl: Removing leading '/' from absolute path names
# file: usr/share/debootstrap/devices.tar.gz
# owner: root
# group: root
user::rw-
group::r--
other::r--
All parent directories are owned by root:root, and have permissions: drwxr-xr-x.
cp /usr/share/debootstrap/devices.tar.gz ~
cp: cannot open `/usr/share/debootstrap/devices.tar.gz' for reading: Permission denied
which I believe is incorrect/unexpected. Why can I not copy this file or successfully create a chroot?
System information:
Linux hostname 2.6.32-431.11.2.el6.x86_64 #1 SMP Mon Mar 3 13:32:45 EST 2014 x86_64 x86_64 x86_64 GNU/Linux
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: RedHatEnterpriseWorkstation
Description: Red Hat Enterprise Linux Workstation release 6.5 (Santiago)
Release: 6.5
Codename: Santiago
mount:
/dev/mapper/vg_ngdw-lv_root on / type ext4 (rw)