I suppose you could use either method mentioned below In …

Friday, 26th April 2024

Comment on How to mount /proc and /dev and in chroot on Linux by Mike Gary.

I suppose you could use either method mentioned below In host machine: mount --bind /proc <chroot dir>/proc and another syntax (in chroot environment): mount -t proc none /proc They are both special file systems so they can be recreated any number of times (the bind mount method uses the exact same amount as the host system, whereas the other method uses a new mount). I've always seen the bind mount recommended in guides, so I'd use that. As far as I know, there is no real important difference. However, /dev is usually a tmpfs mount that is managed by udev, so it has to be the actual same file system as on the host machine. That means that you would need to use the bind mount method. If this chroot is going to be around for awhile, you can put these entries in /etc/fstab on the host system to simplify things.

Share this on:

Comments are closed.