aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/chroot.xml
diff options
context:
space:
mode:
authorAlex Gronenwoud <alex@linuxfromscratch.org>2003-11-13 22:31:27 +0000
committerAlex Gronenwoud <alex@linuxfromscratch.org>2003-11-13 22:31:27 +0000
commitd32239446ba4bfb4f259cf7cef7626cae2283c34 (patch)
tree6857e1b0b2a81e27305f34ab5fae04d298ad5331 /chapter06/chroot.xml
parentcfabeeda7b517f8b7a202113d4c3c645c81579af (diff)
Moving most of chapter 6 intermezzos into a single file.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3081 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06/chroot.xml')
-rw-r--r--chapter06/chroot.xml56
1 files changed, 0 insertions, 56 deletions
diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml
deleted file mode 100644
index f733efda3..000000000
--- a/chapter06/chroot.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<sect1 id="ch06-chroot">
-<title>Entering the chroot environment</title>
-<?dbhtml filename="chroot.html" dir="chapter06"?>
-
-<para>It is time to enter the chroot 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>Just like earlier, ensure the LFS environment variable is set up properly
-by running <userinput>echo $LFS</userinput> and ensuring it shows the path to
-your LFS partition's mount point, which is
-<filename class="directory">/mnt/lfs</filename> if you followed our
-example.</para>
-
-<para>Become <emphasis>root</emphasis> and run the following command
-to enter the chroot environment:</para>
-
-<screen><userinput>chroot $LFS /tools/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:/tools/bin \
-&nbsp;&nbsp;&nbsp;&nbsp;/tools/bin/bash --login</userinput></screen>
-
-<para>The <userinput>-i</userinput> option given to the
-<userinput>env</userinput> command will clear all variables of the chroot
-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 <userinput>vim</userinput> and <userinput>less</userinput> 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 to use the LFS variable anymore,
-because everything you do will be restricted to the LFS file system -- since
-what the shell thinks is <filename class="directory">/</filename> is actually
-the value of <filename class="directory">$LFS</filename>, which was passed to
-the chroot command.</para>
-
-<para>Notice that <filename class="directory">/tools/bin</filename> comes
-last in the PATH. This means that a temporary tool will not be used any more
-as soon as its final version is installed. Well, at least when the shell
-doesn't remember the locations of executed binaries -- for this reason hashing
-is switched off a bit further on.</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 environment.
-If you ever leave this environment for any reason (rebooting for example),
-you must remember to again enter chroot and mount the proc and devpts
-filesystems (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 <filename>/etc/passwd</filename> file has not been
-created yet.</para>
-
-</sect1>
-