LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 814|回复: 1

求助chroot(已解决)

[复制链接]
发表于 2006-4-11 16:51:55 | 显示全部楼层 |阅读模式
我建了一个目录mychroot
在此目录下有一个bin目录,目录下有bash,ls,详情如下:
-rwxrwxrwx  1 root root 683924 2006-04-11 16:38 bash
-rwxrwxrwx  1 root root  71996 2006-04-11 16:37 ls

可是每次用root用户chroot到mychroot这个目录,总提示
chroot: cannot run command `/bin/bash': No such file or directory

请问这是什么原因
 楼主| 发表于 2006-4-11 17:48:47 | 显示全部楼层
解决了
root ......# ldd bash
        linux-gate.so.1 =>  (0xffffe000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb7ee5000)
        libdl.so.2 => /lib/tls/libdl.so.2 (0xb7ee1000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7da8000)
        /lib/ld-linux.so.2 (0xb7f39000)
root .......# ldd ls
        linux-gate.so.1 =>  (0xffffe000)
        librt.so.1 => /lib/tls/librt.so.1 (0xb7f0f000)
        libacl.so.1 => /lib/libacl.so.1 (0xb7f08000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7dcf000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7dbd000)
        /lib/ld-linux.so.2 (0xb7f28000)
        libattr.so.1 => /lib/libattr.so.1 (0xb7db9000)

然后将这些文件复制到mychroot相应目录下就行了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表