如何chroot进入busybox环境?

Pin*_*ngu 3 chroot busybox

我有一个使用 buildroot 构建的文件系统,用于使用旧内核和 uClibc 为设备编译代码。

现在我想chroot进fs。问题是,我没有/bin/bash,只是/bin/busybox
我怎么说要使用 chrootbusybox ash来代替?

我已经尝试创建到 的链接busybox ash,但 chroot 仍然显示failed to run command /bin/bash. no such file or directory.

Sté*_*las 5

chroot /path/to/fs /bin/ash
Run Code Online (Sandbox Code Playgroud)

有关详细信息,请参阅chroot手册页。

  • 您说您有一个链接“ash -> busybox”。无论如何,只需运行`chroot /path/to/fs /bin/busybox ash`即可。 (2认同)