操作系统原理 2026

chroot 失败:找不到 /bin/bash

原片 01:02:50—01:03:34

试试 chroot 到 /tmp/vibe,可能需要 sudo。失败了,因为 chroot 后试图运行 shell,但目标根文件系统中没有 /bin/bash。

图 38:chroot /tmp/vibe 失败:缺少 /bin/bash(01:03:19)。
图 38:chroot /tmp/vibe 失败:缺少 /bin/bash(01:03:19)。

[现场 chroot 命令与失败结果。]

root@rpi500:/tmp/vibe# chroot /tmp/vibe
chroot: failed to run command '/bin/bash': No such file or directory

要先构建完整文件系统,提供 /bin/bash、/home 等内容,才能 chroot。

输入关键词,搜索全部 30 节课。