# 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을 복구 모드에서 구출하려고 했습니다(데비안 배포판, 호스팅 회사는 이렇습니다). 인터넷에서 가능한 모든 해결 방법을 시도했지만 위 메시지를 chroot
받을 수 없습니다./mnt
추신: 나는 마운트, 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:/#