Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 06/09/17 02:41, darkdragon wrote:
> When using chroot, one usually wants to mount/bind special folders too:
>
> mount -o bind /dev /mnt/dev
> mount -t sysfs sysfs /mnt/sys
> mount -t proc procfs /mnt/proc
>
>
> I was wondering, if there is any reason why there is no additional command
> line switch to chroot to automatically perform these steps?
>
> If not, can someone please add them?
> (maybe it should store a flag in this case and try to unmount them when
> exiting again)
That would be coupling chroot to much with specific system details.
One could easily add those commands to a startup script that
you got chroot to execute instead of the default /bin/sh
cheers,
Pádraig