diff options
Diffstat (limited to 'chapter06/chapter06.xml')
-rw-r--r-- | chapter06/chapter06.xml | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index 6364740be..f97d4d777 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -68,13 +68,12 @@ with a series of short descriptions of these.</para> <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> +can execute the <command>chroot</command> 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> +<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> @@ -84,12 +83,12 @@ to enter the chroot environment:</para> PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ /tools/bin/bash --login +h</userinput></screen> -<para>The <userinput>-i</userinput> option given to the -<userinput>env</userinput> command will clear all variables of the chroot +<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 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 +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> @@ -103,8 +102,8 @@ the chroot command.</para> 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 by passing the <userinput>+h</userinput> option to -<userinput>bash</userinput>.</para> +is switched off by passing the <emphasis>+h</emphasis> option to +<command>bash</command>.</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. @@ -281,15 +280,15 @@ will now work.</para> <screen><userinput>exec /tools/bin/bash --login +h</userinput></screen> -<para>Note the use of the <userinput>+h</userinput> directive. This tells -<userinput>bash</userinput> not to use its internal path hashing. Without this -directive, <userinput>bash</userinput> would remember the paths to binaries it +<para>Note the use of the <emphasis>+h</emphasis> directive. This tells +<command>bash</command> not to use its internal path hashing. Without this +directive, <command>bash</command> would remember the paths to binaries it has executed. Since we want to use our newly compiled binaries as soon as they are installed, we turn off this function for the duration of this chapter.</para> -<para>The <userinput>login</userinput>, <userinput>agetty</userinput> and -<userinput>init</userinput> programs (and some others) use a number of log +<para>The <command>login</command>, <command>agetty</command> and +<command>init</command> programs (and some others) use a number of log files to record information such as who was logged into the system and when. These programs, however, won't write to the log files if they don't already exist. Initialize the log files and give them their proper permissions:</para> @@ -341,7 +340,7 @@ identical.</para></note> <para>From now on every compiled program will link <emphasis>only</emphasis> against the libraries in <filename>/usr/lib</filename> and <filename>/lib</filename>. The extra -<userinput>INSTALL=/tools/bin/install</userinput> is needed because the Makefile +<emphasis>INSTALL=/tools/bin/install</emphasis> is needed because the Makefile created during the second pass still contains the reference to <filename>/usr/bin/install</filename>, which we obviously haven't installed yet. Some host distributions contain a <filename class="symlink">ginstall</filename> |