3. Using the Secondary Distributions

With the secondary distributions installed, the steps to use them are:

  1. It is important to use a 2.4-series or newer Linux kernel in the "primary" Linux distribution in order to take advantage of the multiple mount points feature that the 2.4-series permits. For many tasks, the /proc and /tmp filesystems will have to be remounted in the secondary distribution using:
    mount --bind /proc /opt/distros/redhat_6.2/proc
    mount --bind /tmp /opt/distros/redhat_6.2/tmp

  2. Also, it can be helpful to remount (rather than copy) the source tree from the primary to the secondary distro:
    mount --bind /home/USER/src/PROJECT /opt/distros/redhat_6.2/USER/src/PROJECT

  3. Become root and use:
    xhost +localhost chroot /opt/distros/redhat_6.2
    /bin/bash
    to obtain a shell with one of the secondary distros. Note that the xhost command is only necessary if you intend to use X-windows applications.

  4. Finally, create a user (if necessary) within the chroot-ed shell and develop, build, and/or test your application within this "separate" Linux distribution! Not that you may also have to specify your DISPLAY environment variable if you'd like to use X applications.

Done! You now have a shell that is, for all practical purposes, running within the secondary Linux distribution of your choice.

mirror server hosted at Truenetwork, Russian Federation.