Using proc in chroot environments

From: DervishD
Date: Sun Nov 02 2003 - 15:50:17 EST

Hi all :)

I'm using a chroot environment on my main disk as a 'crash test
dummy', and I need to access the proc filesystem inside it. Since
hard links are not allowed for directories, the only solution I can
think of is to mount proc inside the chroot environment just after
chrooting. This works, I've tested, but I have two problems:

- Any change in the chroot proc happens too in the main one (like
using /proc/sys/kernel variables). Not a big deal, since I want the
chroot environment to mimic the main filesystem where the original
proc is mounted, but is annoying.

- I must mount copies of devpts, usbfs, etc... under the 'second'
proc, too, and this is even more annoying.

The perfect solution for me is to hardlink the proc directory of
the chrooted environment to the proc directory on the true root dir,
but since this is not possible, whan can I do instead of remounting a
second copy of proc (which, by the way, makes /proc/mounts a little
bit weird...)?

Thanks a lot in advance :))

Raúl Núñez de Arenas Coronado

Linux Registered User 88736 &
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at