Re: Using proc in chroot environments

From: DervishD
Date: Fri Nov 07 2003 - 18:34:55 EST


Hi David :)

* David <david@xxxxxxxxxxxx> dixit:
> > 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:
> Have you tried the --bind mount option? It's great to solve this kind
> of problem, accesing to a directory within a chrooted enviroment. I've
> used it successly with a ftp server ;).

I haven't tried, but I'm afraid it won't solve my problem. First,
if I do a 'binded' mount of /proc, any change in the chrooted proc
will reflect in the original one, so I'm in trouble anyway. Second,
if I do 'mount' or 'cat /proc/mounts' the proc filesystem will be
shown twice anyway (correct me here if I'm wrong).

By now I'm going to keep using two independent mounts until I
find a better approach... Thanks for your answer :)

Raúl Núñez de Arenas Coronado

--
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/