aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/chroot.xml
diff options
context:
space:
mode:
authorTimothy Bauscher <timothy@linuxfromscratch.org>2002-09-08 21:54:14 +0000
committerTimothy Bauscher <timothy@linuxfromscratch.org>2002-09-08 21:54:14 +0000
commit44c2fd8fabfe36ee9f8464a04e4f2db42d956ab0 (patch)
treef0b7999af8b8df672ef8b32eead12396e7e11022 /chapter06/chroot.xml
parentcb33ea82fe0338e3854a50bb252cbdc818679b36 (diff)
Applied Alex\'s grammar patch
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2082 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06/chroot.xml')
-rw-r--r--chapter06/chroot.xml66
1 files changed, 36 insertions, 30 deletions
diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml
index af525df62..dd220020a 100644
--- a/chapter06/chroot.xml
+++ b/chapter06/chroot.xml
@@ -2,35 +2,41 @@
<title>Entering the chroot'ed environment</title>
<?dbhtml filename="chroot.html" dir="chapter06"?>
-<para>It's time to enter our chroot'ed environment in order to install the
-rest of the software we need. Before you can chroot you need to change to
-the <emphasis>root</emphasis> user since only user
-<emphasis>root</emphasis> can use the <userinput>chroot</userinput>
-command.</para>
-
-<para>Enter the following commands to enter the chroot'ed environment. From
-this point on there's no need to use the $LFS variable anymore, because
-everything a user does will be restricted to the LFS partition (since / is
-actually /mnt/lfs, but the shell doesn't know that).</para>
-
-<para>&c6-chrootcmd;</para>
-
-<para>The -i option will clear all environment variables for as long as you
-are in the chroot'ed environment and only the HOME, TERM, PS1 and PATH
-variables are set. The TERM=$TERM construction will set the TERM variable
-inside chroot to the same value as outside chroot which is needed for
-programs like vim and less to operate properly. If you need other variables
-present, such as CFLAGS or CXXFLAGS, you need to set them again.</para>
-
-<para>Now that we are inside a chroot'ed environment, we can continue to
-install all the basic system software. You have to make sure all the
-following commands in this and following chapters are run from within the
-chroot'ed environment. If you ever leave this environment for any reason
-(when rebooting for example) you must remember to enter chroot and mount
-$LFS/proc again (as will be discussed later) before continuing with the
-book.</para>
-
-<para>Note that the bash prompt will contain "I have no name!" This is
-normal because Glibc hasn't been installed yet.</para>
+<para>It is time to enter the chroot'ed environment in order to begin installing
+the packages we need. Before you can chroot, however, you need to become
+<emphasis>root</emphasis>, since only <emphasis>root</emphasis>
+can execute the <userinput>chroot</userinput> command.</para>
+
+<para>Become <emphasis>root</emphasis> and run the following command
+to enter the chroot'ed environment:</para>
+
+<para><screen><userinput>chroot $LFS /static/bin/env -i \
+&nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
+&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
+&nbsp;&nbsp;&nbsp;&nbsp;/static/bin/bash --login</userinput></screen>
+</para>
+
+<para>The <userinput>-i</userinput> option given to the
+<userinput>env</userinput> command will clear all variables of the chroot'ed
+environment. After that, only the HOME, TERM, PS1 and PATH variables are
+set again. The TERM=$TERM construct will set the TERM variable inside chroot
+to the same value as outside chroot; this variable is needed for programs
+like vim and less to operate properly. If you need other variables present,
+such as CFLAGS or CXXFLAGS, this is a good place to set them again.</para>
+
+<para>From this point on there's no need anymore to use the $LFS variable,
+because everything you do will be restricted to the LFS file system -- since
+what the shell thinks is <filename class="directory">/</filename> is actually
+<filename class="directory">/mnt/lfs</filename>.</para>
+
+<para>You have to make sure all the commands in the rest of this chapter and
+in the following chapters are run from within the chroot'ed environment.
+If you ever leave this environment for any reason (rebooting for example),
+you must remember to again enter chroot and mount proc (discussed later)
+before continuing with the installations.</para>
+
+<para>Note that the bash prompt will say "I have no name!" This is
+normal, as the Glibc package hasn't been installed yet.</para>
</sect1>
+