aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/chapter06.xml
diff options
context:
space:
mode:
Diffstat (limited to 'chapter06/chapter06.xml')
-rw-r--r--chapter06/chapter06.xml29
1 files changed, 17 insertions, 12 deletions
diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml
index da1ae8126..953fb3233 100644
--- a/chapter06/chapter06.xml
+++ b/chapter06/chapter06.xml
@@ -129,18 +129,21 @@ the following command to enter the small world that is, at the moment,
populated with only the temporary tools:</para>
<screen><userinput>chroot $LFS /tools/bin/env -i \
-&nbsp;&nbsp;&nbsp;&nbsp;TERM=$TERM PS1='\u:\w\$ ' \
+&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 +h</userinput></screen>
-<para>The <emphasis>-i</emphasis> option given to the
-<command>env</command> command will clear all variables of the chroot
-environment. After that, only the 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 <command>less</command> and <command>vim</command> to operate
-properly. If you need other variables present, such as CFLAGS, CXXFLAGS or
-HOME, this is a good place to set them.</para>
+<para>The <emphasis>-i</emphasis> option passed to the <command>env</command>
+command will clear all variables of the chroot environment. After that, only
+the HOME, TERM, PS1 and PATH variables are set again. The HOME variable is set
+mainly to prevent several small warnings during the configure runs of
+Diffutils, Grep and Grub. The TERM variable is set to make programs such as
+<command>less</command> and <command>vim</command>, that make use of the
+Ncurses package, operate properly -- the TERM=$TERM construct sets the TERM
+variable inside chroot to the same value as outside chroot. The main prompt
+(PS1) is set to "username:working-dir# " (since the "\$" becomes "#" for root).
+If you need other variables present, such as CFLAGS, CXXFLAGS or LDFLAGS, this
+is a good place to set them.</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
@@ -402,7 +405,9 @@ Some host distributions contain a <filename class="symlink">ginstall</filename>
symbolic link which takes precedence in the Makefile and thus can cause a
problem here. The above command takes care of this also.</para>
-<para>You can now remove the Binutils source and build directories.</para>
+<para>You must now remove the Binutils source and build directories. (This is
+important, as you should start the next section with a fresh untarring of the
+package.)</para>
<para>The next thing to do is to amend our GCC specs file so that it points
to the new dynamic linker. Just like earlier on, we use a sed to accomplish
@@ -580,7 +585,7 @@ If you're not sure whether you entered chroot with the command given in
<para>Then reenter it with:</para>
<screen><userinput>chroot $LFS /tools/bin/env -i \
-&nbsp;&nbsp;&nbsp;&nbsp;TERM=$TERM PS1='\u:\w\$ ' \
+&nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin \
&nbsp;&nbsp;&nbsp;&nbsp;/tools/bin/bash</userinput></screen>
@@ -610,7 +615,7 @@ destroyed.</para>
it, you should use the following modified chroot command:</para>
<screen><userinput>chroot $LFS /usr/bin/env -i \
-&nbsp;&nbsp;&nbsp;&nbsp;TERM=$TERM PS1='\u:\w\$ ' \
+&nbsp;&nbsp;&nbsp;&nbsp;HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
&nbsp;&nbsp;&nbsp;&nbsp;PATH=/bin:/usr/bin:/sbin:/usr/sbin \
&nbsp;&nbsp;&nbsp;&nbsp;/bin/bash</userinput></screen>