schroot 无法在进入时挂载

schroot 无法在进入时挂载

我正在尝试为自己设置一个 chroot 环境,但失败了。此问题已在 Ubuntu 的多个版本(10.04 和 11.04)上重现。我通过以下方式进行设置:

$ 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

进入 chroot 失败,原因如下:

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

我不确定如何调试它。出了什么问题?


附加信息:来自详细运行。

$ 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’

答案1

正如我所见,这是一个错误

您应该尝试从 / 目录或任何其他目录(但不是 /home 下的某些目录)运行 schroot 命令。

答案2

转到bashchroot 环境中的二进制文件。用来ldd bash检查所需的库。所有这些库都存在于您的 chroot-lib-path 中吗?

相关内容