old-www/HOWTO/Multi-Distro-Dev/use.html

244 lines
3.7 KiB
HTML

<HTML
><HEAD
><TITLE
>Using the Secondary Distributions</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
TITLE="Development for Multiple Linux Distributions mini-HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Setup"
HREF="setup.html"><LINK
REL="NEXT"
TITLE="Credits"
HREF="credits.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Development for Multiple Linux Distributions mini-HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="setup.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="credits.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="USE">3. Using the Secondary Distributions</H1
><P
>With the secondary distributions installed, the steps to use
them are: </P
><P
></P
><OL
TYPE="1"
><LI
><P
>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 <TT
CLASS="FILENAME"
>/proc</TT
> and <TT
CLASS="FILENAME"
>/tmp</TT
>
filesystems will have to be remounted in the secondary distribution
using:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>mount --bind /proc /opt/distros/redhat_6.2/proc
mount --bind /tmp /opt/distros/redhat_6.2/tmp</PRE
></FONT
></TD
></TR
></TABLE
>
</P
></LI
><LI
><P
>Also, it can be helpful to remount (rather than copy) the source tree
from the primary to the secondary distro:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>mount --bind /home/USER/src/PROJECT /opt/distros/redhat_6.2/USER/src/PROJECT</PRE
></FONT
></TD
></TR
></TABLE
>
</P
></LI
><LI
><P
>Become root and use:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
>xhost +localhost chroot /opt/distros/redhat_6.2
/bin/bash</PRE
></FONT
></TD
></TR
></TABLE
> to obtain a shell with one of the secondary
distros. Note that the <TT
CLASS="FILENAME"
>xhost</TT
> command is only
necessary if you intend to use X-windows applications.
</P
></LI
><LI
><P
>Finally, create a user (if necessary) within the
<TT
CLASS="FILENAME"
>chroot</TT
>-ed shell and develop, build, and/or test
your application within this "separate" Linux distribution! Not that
you may also have to specify your <TT
CLASS="FILENAME"
>DISPLAY</TT
>
environment variable if you'd like to use X applications.
</P
></LI
></OL
><P
>Done! You now have a shell that is, for all practical
purposes, running within the secondary Linux distribution of your
choice. </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="setup.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="credits.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Setup</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Credits</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>