Re: Debian Linux in Chroot



I have also thought heavily about doing this sort of thing, for developing and
testing and such. My understanding is that there would be very close to
having two differant GNU/Linux operating systems running at once, but using
only one kernel. Once inside the chroot, BASH would be using tools
from /linux2/usr/bin, is that correct?

My understanding of chroot is extremely limited, right now. I have searched
around, but can anyone point me to anything specific that they know to be a
good tutorial/explanation or how chroot works and what its capabilities are?

On Tuesday 31 July 2007 7:15 am, koffiejunkie wrote:
Masatran, R. Deepak wrote:
I have two Linux installations in my hard drive, and I want to modify
Linux-2 from Linux-1, using Chroot. Basically "dpkg-reconfigure" and
similar stuff. How do I tell DPKG of Linux-2 to not disturb the daemons
that are running in Linux-1?

Say you are booted into Linux1, and linux 2 is mounted at /linux2, you
need to do this (assuming they are both recent distrobutions):

mount -t proc proc /linux2/proc
chroot /linux2

then inside the chroot, whatever you do should not disturb what's
cooking in Linux-1

Remember to unmount proc from Linux-2 after leaving the chroot.

--
Matthew K Poer <matthewpoer@xxxxxxxxx>
Location: GA, USA Web: http://matthewpoer.freehostia.com
GnuPG Public Key: 4DD0A9A6 Keyserver: subkeys.pgp.net

Attachment: pgpIC6YrjOqx8.pgp
Description: PGP signature



Relevant Pages

  • Re: Debian Linux in Chroot
    ... How do I tell DPKG of Linux-2 to not disturb the daemons that are ... mount -t proc proc /linux2/proc ... then inside the chroot, whatever you do should not disturb what's cooking in Linux-1 ... Remember to unmount proc from Linux-2 after leaving the chroot. ...
    (Debian-User)
  • Re: Chroot bug
    ... This is basically both painfully racy and easily broken with umount and/or access to proc. ...
    (Linux-Kernel)
  • Re: Chroot bug
    ... and/or access to proc. ... /busybox mkdir /proc ... /busybox mount -t proc proc /proc ...
    (Linux-Kernel)
  • Re: Questions about Etch in chroot.
    ... Try mounting /proc within the chroot: ... mount /proc /proc -t proc ... That will get a number of other commands working, too, like ps and top. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: [opensuse] chroot: cannot run command `/bin/bash: No such file or directory
    ... Mi understanding is that trying to run a command that is not local to ... the chroot environment would fail. ... like "su," in that it runs an interactive shell. ...
    (SuSE)