将网络文件系统挂载到 schroot

hag*_*i_e 8 mount afs chroot

我正在使用网络文件系统 (AFS),我还想将它安装到我的 schroot 中。在 /etc/schroot/mount-defaults 中添加一行,使用bindrbind在选项中没有帮助:schroot 总是使用 挂载目录bind,并且它在 chroot 中保持为空。

我当前的解决方案是rbind在设置 schroot 后重新挂载 /afs 目录的脚本。

有没有办法让schroot直接使用rbind?

小智 1

# means run with root or sudo

1. Create a mountpoint
# mkdir /mount/point

2. Mount /proc /sys /dev to chroot
# mount -o bind /proc /mount/point/proc
# mount -o bind /dev /mount/point/dev
# mount -o bind /dev/pts /mount/point/dev/pts
# mount -o bind /sys /mount/point/sys

3. Copy resolv.conf to networking
# cp /etc/resolv.conf /mount/point/etc/resolv.conf

4.Open bash in chroot
# chroot /mount/point /bin/bash

5. Do what you have to do and then exit chroot
exit
Run Code Online (Sandbox Code Playgroud)

另请参阅: http: //fermilinux.fnal.gov/documentation/tips/mount-bind-chroot

  • 这基本上就是他想要做的,但重点是 schroot 自动化了这些步骤,并且他还试图自动化安装网络文件系统。 (2认同)