# cd /mnt
# file $(which chroot)
/usr/bin/chroot: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64-ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=1922fc941e62b1cd0954c5fbf22bc37f7ef84870, stripped
# which chroot
/usr/bin/chroot
# ls /mnt/bin/bash
/mnt/bin/bash
# chroot /mnt mnt/bin/bash
-bash: /usr/bin/chroot: No such file or directory
# cp -a /usr /mnt
# chroot /mnt mnt/bin/bash
- bash: /usr/bin/chroot: No such file or directory
我一直在尝试从救援模式中拯救centos 7(debian发行版,托管公司就是这样)。我尝试了互联网上所有可能的解决方案,但无法chroot
收到/mnt
上述消息
PS:我绑定了mounted、proc、dev和sys
最新更新:
root@rescue:/# ls /bin/bash
/bin/bash
root@rescue:/# whereis bin/bash
bash: /bin/bash /etc/bash.bashrc /usr/share/man/man1/bash.1.gz
root@rescue:/# ls mnt/bin/bash
mnt/bin/bash
root@rescue:/# chroot /mnt mnt/bin/bash
chroot: failed to run command ‘mnt/bin/bash’: No such file or directory
root@rescue:/# usr/sbin/chroot /mnt mnt/bin/bash
usr/sbin/chroot: failed to run command ‘mnt/bin/bash’: No such file or directory
root@rescue:/# ^C
root@rescue:/# ls /mnt/lib64/ld-linux-x86-64.so.2
ls: cannot access /mnt/lib64/ld-linux-x86-64.so.2: No such file or directory
root@rescue:/# chroot /mnt /usr/bin/bash?
chroot: failed to run command ‘/usr/bin/bash?’: No such file or directory
root@rescue:/# chroot /mnt
chroot: failed to run command ‘/bin/bash’: No such file or directory
root@rescue:/# ldd /bin/bash
linux-vdso.so.1 (0x00007ffcccbd8000)
libncurses.so.5 => /lib/x86_64-linux-gnu/libncurses.so.5 (0x00007f519ec9e000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f519ea74000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f519e870000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f519e4c5000)
/lib64/ld-linux-x86-64.so.2 (0x00007f519eec3000)
root@rescue:/#