|
@@ -129,18 +129,18 @@ 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 \
|
|
|
- HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
|
|
+ TERM=$TERM PS1='\u:\w\$ ' \
|
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
|
|
|
- /tools/bin/bash --login +h</userinput></screen>
|
|
|
+ /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 HOME, TERM, PS1 and PATH variables are
|
|
|
+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>vim</command> and <command>less</command> to operate
|
|
|
-properly. If you need other variables present, such as CFLAGS or CXXFLAGS,
|
|
|
-this is a good place to set them again.</para>
|
|
|
+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>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
|
|
@@ -328,7 +328,7 @@ and have just created the <filename>/etc/passwd</filename> and
|
|
|
<filename>/etc/group</filename> files, user name and group name resolution
|
|
|
will now work.</para>
|
|
|
|
|
|
-<screen><userinput>exec /tools/bin/bash --login +h</userinput></screen>
|
|
|
+<screen><userinput>exec /tools/bin/bash +h</userinput></screen>
|
|
|
|
|
|
<para>Note the use of the <emphasis>+h</emphasis> directive. This tells
|
|
|
<command>bash</command> not to use its internal path hashing. Without this
|
|
@@ -580,9 +580,9 @@ 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 \
|
|
|
- HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
|
|
+ TERM=$TERM PS1='\u:\w\$ ' \
|
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
|
|
- /tools/bin/bash --login</userinput></screen>
|
|
|
+ /tools/bin/bash</userinput></screen>
|
|
|
|
|
|
<para>Now you can safely strip the binaries and libraries:</para>
|
|
|
|
|
@@ -610,9 +610,9 @@ destroyed.</para>
|
|
|
it, you should use the following modified chroot command:</para>
|
|
|
|
|
|
<screen><userinput>chroot $LFS /usr/bin/env -i \
|
|
|
- HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
|
|
+ TERM=$TERM PS1='\u:\w\$ ' \
|
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
|
|
- /bin/bash --login</userinput></screen>
|
|
|
+ /bin/bash</userinput></screen>
|
|
|
|
|
|
<para>The reason for this is that, since the programs in <filename
|
|
|
class="directory">/tools</filename> are no longer needed, you may want to
|