Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to setup a chroot environment for myself, and it is failing. This has been reproduced on multiple versions (10.04 and 11.04) of Ubuntu. I set it up by doing:

$ mkdir -p /srv/chroot/squeeze64
$ debootstrap --arch amd64 squeeze /srv/chroot/squeeze64 http://ftp.debian.org/debian/
$ cat /etc/schroot/schroot.conf
    [squeeze64]
    description=Whatever
    directory=/srv/chroot/squeeze64
    users=ajtack
    root-users=ajtack
    type=directory

Entry to the chroot fails as:

$ schroot -c squeeze64
E: Failed to change to directory '/var/lib/schroot/mount/squeeze64-d1d6ed5e-b217-4319-94ee-ff0422a75671': No such file or directory

I'm not sure how to debug this. What's gone wrong?


Additional information: From a verbose run.

$ schroot --verbose -c squeeze64
I: Executing ‘00check setup-start ok’
I: 00check: STAGE=setup-start
I: 00check: STATUS=ok
I: 00check: AUTH_GID=1000
I: 00check: AUTH_HOME=/home/ajtack
I: 00check: AUTH_RGID=1000
I: 00check: AUTH_RGROUP=ajtack
I: 00check: AUTH_RUID=1000
I: 00check: AUTH_RUSER=ajtack
I: 00check: AUTH_SHELL=/bin/bash
I: 00check: AUTH_UID=1000
I: 00check: AUTH_USER=ajtack
I: 00check: AUTH_VERBOSITY=verbose
I: 00check: CHROOT_DESCRIPTION=Squeeze64 (session chroot)
I: 00check: CHROOT_DIRECTORY=/srv/chroot/squeeze64
I: 00check: CHROOT_MOUNT_LOCATION=/var/lib/schroot/mount/squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6
I: 00check: CHROOT_NAME=squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6
I: 00check: CHROOT_PATH=/var/lib/schroot/mount/squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6
I: 00check: CHROOT_SCRIPT_CONFIG=/etc/schroot/default/config
I: 00check: CHROOT_SESSION_CLONE=false
I: 00check: CHROOT_SESSION_CREATE=false
I: 00check: CHROOT_SESSION_PURGE=false
I: 00check: CHROOT_TYPE=directory
I: 00check: CHROOT_UNION_TYPE=none
I: 00check: DATA_DIR=/usr/share/schroot
I: 00check: HOST=x86_64-pc-linux-gnu
I: 00check: HOST_CPU=x86_64
I: 00check: HOST_OS=linux-gnu
I: 00check: HOST_VENDOR=pc
I: 00check: LIBEXEC_DIR=/usr/lib/schroot
I: 00check: MOUNT_DIR=/var/lib/schroot/mount
I: 00check: PID=25954
I: 00check: PLATFORM=linux
I: 00check: PWD=/
I: 00check: SESSION_ID=squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6
I: 00check: SETUP_DATA_DIR=/usr/share/schroot/setup
I: 00check: SYSCONF_DIR=/etc/schroot
I: 00check: VERBOSE=verbose
I: Executing ‘05file setup-start ok’
I: Executing ‘15killprocs setup-start ok’
I: Executing ‘99check setup-start ok’
E: Failed to change to directory ‘/var/lib/schroot/mount/squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6’: No such file or directory
I: Executing ‘99check setup-stop ok’
I: 99check: STAGE=setup-stop
I: 99check: STATUS=ok
I: 99check: AUTH_GID=1000
I: 99check: AUTH_HOME=/home/ajtack
I: 99check: AUTH_RGID=1000
I: 99check: AUTH_RGROUP=ajtack
I: 99check: AUTH_RUID=1000
I: 99check: AUTH_RUSER=ajtack
I: 99check: AUTH_SHELL=/bin/bash
I: 99check: AUTH_UID=1000
I: 99check: AUTH_USER=ajtack
I: 99check: AUTH_VERBOSITY=verbose
I: 99check: CHROOT_DESCRIPTION=Squeeze64 (session chroot)
I: 99check: CHROOT_DIRECTORY=/srv/chroot/squeeze64
I: 99check: CHROOT_MOUNT_LOCATION=/var/lib/schroot/mount/squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6
I: 99check: CHROOT_NAME=squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6
I: 99check: CHROOT_PATH=/var/lib/schroot/mount/squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6
I: 99check: CHROOT_SCRIPT_CONFIG=/etc/schroot/default/config
I: 99check: CHROOT_SESSION_CLONE=false
I: 99check: CHROOT_SESSION_CREATE=false
I: 99check: CHROOT_SESSION_PURGE=false
I: 99check: CHROOT_TYPE=directory
I: 99check: CHROOT_UNION_TYPE=none
I: 99check: DATA_DIR=/usr/share/schroot
I: 99check: HOST=x86_64-pc-linux-gnu
I: 99check: HOST_CPU=x86_64
I: 99check: HOST_OS=linux-gnu
I: 99check: HOST_VENDOR=pc
I: 99check: LIBEXEC_DIR=/usr/lib/schroot
I: 99check: MOUNT_DIR=/var/lib/schroot/mount
I: 99check: PID=25954
I: 99check: PLATFORM=linux
I: 99check: PWD=/
I: 99check: SESSION_ID=squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6
I: 99check: SETUP_DATA_DIR=/usr/share/schroot/setup
I: 99check: SYSCONF_DIR=/etc/schroot
I: 99check: VERBOSE=verbose
I: Executing ‘15killprocs setup-stop ok’
I: 15killprocs: Killing processes run inside /var/lib/schroot/mount/squeeze64-1d8d6547-8c33-4b96-a82e-d97d697d08e6
I: Executing ‘05file setup-stop ok’
I: Executing ‘00check setup-stop ok’
share|improve this question
    
The base system is 64bit right? You aren't trying to run a 64bit chroot on a 32bit OS? –  Zoredache Aug 6 '11 at 5:48
    
Yes, the base system is definitely 64-bit. –  Andres Jaan Tack Aug 6 '11 at 9:18
    
Is there something I can add to this, to help resolve? This is a showstopper for me, and I haven't been able to work around it. –  Andres Jaan Tack Aug 16 '11 at 12:18
    
What happens if you run schroot with the --verbose option? What happens if you run sudo chroot /srv/chroot/squeeze64 /bin/bash? –  Zoredache Aug 25 '11 at 4:28
1  
Which schroot version are you running? What is your current working directory when running schroot? –  quanta Nov 8 '11 at 10:54

2 Answers 2

up vote 4 down vote accepted
+50

as i am see it is a bug

you should try to run the schroot command from the / directory or anyother but not some directory under /home.

share|improve this answer
    
The comments on that bug tracker link seems to indicate that the behavior is intentional, and the only issue, is the errors are not verbose enough. So calling it a bug doesn't seem quite accurate. –  Zoredache Nov 23 '11 at 20:00

Go to the bash binary in your chroot-environment. Use ldd bash to check for the required libaries. Are all those libraries present in your chroot-lib-path?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.