r154 - in trunk/BOOK: . chapter01 chapter02 chapter03 chapter04 chapter05 chapter06 prologue

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Feb 9 12:31:45 PST 2005


Author: manuel
Date: 2005-02-09 13:31:44 -0700 (Wed, 09 Feb 2005)
New Revision: 154

Removed:
   trunk/BOOK/chapter05/environment.xml
Modified:
   trunk/BOOK/chapter01/askforhelp.xml
   trunk/BOOK/chapter01/changelog.xml
   trunk/BOOK/chapter02/pie.xml
   trunk/BOOK/chapter02/ssp.xml
   trunk/BOOK/chapter02/toolchain.xml
   trunk/BOOK/chapter03/patches.xml
   trunk/BOOK/chapter04/aboutlfs.xml
   trunk/BOOK/chapter04/aboutsbus.xml
   trunk/BOOK/chapter04/addinguser.xml
   trunk/BOOK/chapter04/creatingtoolsdir.xml
   trunk/BOOK/chapter04/settingenviron.xml
   trunk/BOOK/chapter05/introduction.xml
   trunk/BOOK/chapter06/introduction.xml
   trunk/BOOK/index.xml
   trunk/BOOK/prologue/typography.xml
Log:
Revised the already migrated XML files.

Modified: trunk/BOOK/chapter01/askforhelp.xml
===================================================================
--- trunk/BOOK/chapter01/askforhelp.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter01/askforhelp.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -8,7 +8,7 @@
 <?dbhtml filename="askforhelp.html"?>
 
 <para>If you run into a problem while working through this book, you should
-first check the FAQ at <ulink url="&faq-root;"/> -- often your question
+first check the FAQ at <ulink url="&faq-root;"/>—often your question
 is already answered there. If it is not, you should try to find the source of
 the problem. The following hint might give you some ideas for your
 troubleshooting: <ulink url="&hints-root;errors.txt"/>.</para>

Modified: trunk/BOOK/chapter01/changelog.xml
===================================================================
--- trunk/BOOK/chapter01/changelog.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter01/changelog.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -16,8 +16,7 @@
 
 <para>This is version &version; of the Hardened Linux From Scratch book, dated
 &releasedate;. This book is still in an alpha state. Please help to make this
-book better by testing it and sending feedback to hlfs-dev at linuxfromscratch.org
-.</para>
+book better by testing it and sending feedback to hlfs-dev at linuxfromscratch.org.</para>
 
 <!--
 <para>Below is a list of differences between the Testing and Unstable versions

Modified: trunk/BOOK/chapter02/pie.xml
===================================================================
--- trunk/BOOK/chapter02/pie.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter02/pie.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -9,12 +9,14 @@
 
 <para>Position-Independent-Executable is a features of Binutils, Libc, and GCC
 that creates an executable which is something between a shared library and a
-normal executable. Programs compiled with these features appear as "shared
-object" with the file(1) command. This allows the executable to behave like a
-shared library so base addresses can be relocatable. The PIE program must be
-linked to Scrt1.o. Scrt1.o is available from the newer versions of Libc.
-Furthermore these programs must be linked with the -pie ld(1) command from a
-Binutils version 2.15 or later. GCC supports this natively with the -fPIE switch
+normal executable. Programs compiled with these features appear as <quote>shared
+object</quote> with the <command>file</command>(1) command. This allows the 
+executable to behave like a shared library so base addresses can be relocatable. 
+The PIE program must be linked to <filename>Scrt1.o</filename>. 
+<filename>Scrt1.o</filename> is available from the newer versions of Libc.
+Furthermore these programs must be linked with the <parameter>-pie</parameter> 
+<command>ld</command>(1) command from a Binutils version 2.15 or later. GCC 
+supports this natively with the <parameter>-fPIE</parameter> switch
 in version 3.4 or later.</para>
 
 <para>When all of the object code is position independent the kernel can
@@ -33,9 +35,10 @@
 Space Layout Randomization (ASLR). This can prevent security bugs from being
 taken advantage of by attackers.</para>
 
-<para>You can search for text relocation in programs with the following command:
-readelf -d /path/to/object | grep TEXTREL</para>
+<para>You can search for text relocation in programs with the following command:</para>
 
+<screen><userinput>readelf -d /path/to/object | grep TEXTREL</userinput></screen>
+
 <para>It is possible for TEXTREL to be present in both executable programs and
 libraries. Further debugging is needed to find the specific code that is not
 position independent, it is most often assembly. If a program errors at compile
@@ -44,47 +47,64 @@
 <para>The coreutils uname patch from LFS also uses assembly code which is not position
 independent.</para>
 
-<para>The man page for ld has a description for -pie. See: 'man 1 ld'.</para>
+<para>The man page for <command>ld</command> has a description for 
+<parameter>-pie</parameter>. See <command>man 1 ld</command>.</para>
  
-<para>Use the "NOELFRELOCS" in PaX or Grsec kernel options to disable text
-relocation.</para>
+<para>Use the <option>NOELFRELOCS</option> in PaX or Grsec kernel options 
+to disable text relocation.</para>
 
-<para>The fPIE flag can only be passed to executables, not libraries. The fPIE
-flag gives some advantages over fPIC in that the compiler can assume the code
+<para>The <parameter>fPIE</parameter> flag can only be passed to executables, not 
+libraries. The <parameter>fPIE</parameter> flag gives some advantages over 
+<parameter>fPIC</parameter> in that the compiler can assume the code
 will stay local to the program. This translates into optimizations having a
-greater effect; non-static functions can be inlined at -O3, etc. The
-hardened-specs used in the book adds filters to the GCC link_command spec to
-distinguish executables from libraries, so the ld -pie switch is only passed
-when linking executables.  The same filters can not be used for cc1, so the cc1
-spec passes -fPIC instead of -fPIE to everything unless the -static or -no-pie
-flags are used. Using 'gcc -fPIC' with 'ld -pie' works fairly well, all the
-PaX/Grsec kernel features will be able to have full advantages. fPIE is known to
-cause text relocation in some programs, so it must be used with care. In this
-book we patch some programs, and use sed(1) commands on others, to add 'gcc -pie
--fpie' on program executables. fPIE must be added surgically, and not to
-environment cflags. The hardened-specs preserves the vanilla 'gcc -pie'
-behaviour, meaning if you use 'gcc -pie' neither -fpic nor -fpie will be
-automatically added, so both '-pie -fpie' must be used together (as per the gcc
-man page). 'gcc -pie' affects which startfiles are used (Scrt.o), so it must be
-used in conjuction with 'ld -pie'. Almost all packages use GCC to do linking, so
-setting environment ldflags is almost never needed.</para>
+greater effect; non-static functions can be inlined at <parameter>-O3</parameter>, etc. The
+hardened-specs used in the book adds filters to the GCC <emphasis>link_command</emphasis>
+spec to distinguish executables from libraries, so the <command>ld</command>
+<parameter>-pie</parameter> switch is only passed when linking executables.  The same 
+filters can not be used for <command>cc1</command>, so the <command>cc1</command>
+spec passes <parameter>-fPIC</parameter> instead of <parameter>-fPIE</parameter>
+to everything unless the <parameter>-static</parameter> or <parameter>-no-pie</parameter>
+flags are used. Using <command>gcc -fPIC</command> with <command>ld -pie</command>
+works fairly well, all the PaX/Grsec kernel features will be able to have full advantages. 
+<parameter>fPIE</parameter> is known to cause text relocation in some programs, so it 
+must be used with care. In this book we patch some programs, and use 
+<command>sed</command>(1) commands on others, to add <command>gcc -pie
+-fpie</command> on program executables. <parameter>fPIE</parameter> must be added 
+surgically, and not to environment cflags. The hardened-specs preserves the vanilla 
+<command>gcc -pie</command> behaviour, meaning if you use <command>gcc -pie</command>
+neither <parameter>-fpic</parameter> nor <parameter>-fpie</parameter> will be
+automatically added, so both <parameter>-pie -fpie</parameter> must be used together 
+(as per the <command>gcc</command> man page). <command>gcc -pie</command> affects 
+which startfiles are used (<filename>Scrt.o</filename>), so it must be used in conjuction with 
+<command>ld -pie</command>. Almost all packages use GCC to do linking, so setting 
+environment ldflags is almost never needed.</para>
 
 <para>Beyond the packages in this book the hardened-specs will work perfectly
-fine with -fPIC. If you wish to use -fPIE to have greater optimization be sure
-to use 'readelf -d' to check for TEXTREL. If -fPIE is passed to one object in a
-library it will cause a TEXTREL section in that library, and it will not work
-correctly. Libraries, private or otherwise, need to be compiled with
--fPIC.</para>
+fine with <parameter>-fPIC</parameter>. If you wish to use <parameter>-fPIE</parameter>
+to have greater optimization be sure to use <command>readelf -d</command> to check 
+for TEXTREL. If <parameter>-fPIE</parameter> is passed to one object in a library it will 
+cause a TEXTREL section in that library, and it will not work correctly. Libraries, private or 
+otherwise, need to be compiled with <parameter>-fPIC</parameter>.</para>
 
-<para>On x86 systems -fPIC and -fpic are exactly the same. Ditto with -fPIE and
--fpie.</para>
+<para>On x86 systems <parameter>-fPIC</parameter> and <parameter>-fpic</parameter>
+are exactly the same. Ditto with <parameter>-fPIE</parameter> and 
+<parameter>-fpie</parameter>.</para>
  
-<para>
-Also see:
-http://pax.grsecurity.net/docs/index.html
-http://netbsd.gw.com/cgi-bin/man-cgi?link+5+NetBSD-current
-http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00140.html
-http://sources.redhat.com/ml/binutils/2003-05/msg00832.html
+<para>See also:
+<itemizedlist>
+<listitem>
+<para><ulink url="http://pax.grsecurity.net/docs/index.html"/></para>
+</listitem>
+<listitem>
+<para><ulink url="http://netbsd.gw.com/cgi-bin/man-cgi?link+5+NetBSD-current"/></para>
+</listitem>
+<listitem>
+<para><ulink url="http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00140.html"/></para>
+</listitem>
+<listitem>
+<para><ulink url="http://sources.redhat.com/ml/binutils/2003-05/msg00832.html"/></para>
+</listitem>
+</itemizedlist>
 </para>
 
 </sect1>

Modified: trunk/BOOK/chapter02/ssp.xml
===================================================================
--- trunk/BOOK/chapter02/ssp.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter02/ssp.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -20,45 +20,74 @@
 <parameter>-fstack-protector</parameter>, and
 <parameter>-fno-stack-protector</parameter> to extensions for C and C++.
 <parameter>-Wstack-protector</parameter> is also available to warn when SSP is
-not used. The patch for Libc adds <emphasis>__guard_setup</emphasis> and
-<emphasis>__stack_smash_handler</emphasis> to <filename>libc.so</filename> and
-<filename>libc.a</filename>. <emphasis> __guard_setup</emphasis> is a function
-used to create a unique and random value for <emphasis>__guard</emphasis> each
-time it is run. The Frandom
-kernel patch was added to solve an entropy starvation bug caused by SSP needing
-a random seed for every program at run time. Frandom adds the Erandom device
-(economical random) which uses the state of Frandom as a seed. Frandom is seeded
-from the kernel's random device. The result is that Erandom does not consume any
+not used. The patch for Libc adds <function>__guard_setup</function> and
+<function>__stack_smash_handler</function> to <filename 
+class="libraryfile">libc.so</filename> and <filename class="libraryfile">libc.a</filename>. 
+<function> __guard_setup</function> is a function
+used to create a unique and random value for <function>__guard</function> each
+time it is run. The Frandom kernel patch was added to solve an entropy starvation bug 
+caused by SSP needing a random seed for every program at run time. Frandom adds the 
+<filename class="devicefile">erandom</filename> device (economical random) which 
+uses the state of <filename class="devicefile">frandom</filename> as a seed. 
+<filename class="devicefile">frandom</filename> is seeded from the kernel's 
+<filename class="devicefile">random</filename> device. The result is that 
+<filename class="devicefile">erandom</filename> does not consume any
 kernel entropy while producing crypto quality output. In the event of a stack
-overflow the __stack_smash_handler function will use the Libc syslog facility to
-record the overflow, which typically depends on /dev/log, and will abort the
-program. The Erandom device is available from the sysctl interface so it will
-work threw chroot. If the Erandom sysctl interface is not working for whatever
-reason the __guard_setup function will attempt to use /dev/urandom or
-gettimeofday to seed the __guard. The use of urandom will cause entropy
-starvation, and gettimeofday is not random, so this fallback is not ideal but
-provided as a safety net.</para>
+overflow the <function>__stack_smash_handler</function> function will use the 
+Libc syslog facility to record the overflow, which typically depends on 
+<filename class="devicefile">/dev/log</filename>, and will abort the
+program. The <filename class="devicefile">erandom</filename> device is available 
+from the sysctl interface so it will work threw chroot. If the Erandom sysctl interface is not 
+working for whatever reason the <function>__guard_setup</function> function will attempt 
+to use <filename class="devicefile">/dev/urandom</filename> or
+<function>gettimeofday</function> to seed the <function>__guard</function>. The use 
+of <filename class="devicefile">urandom</filename> will cause entropy
+starvation, and <function>gettimeofday</function> is not random, so this fallback is not 
+ideal but provided as a safety net.</para>
 
-<para>-fstack-protector only protects functions with arrays of length seven of
-less. -fstack-protector-all protects all functions regardless of array size.
-Because the __guard_setup function is in Libc anything compiled with
--fstack-protector* will need to preload libc.so (or libc.a). Most applications
-already do this. libc.so itself, ld.so, libbsd-compat.so, etc, are exceptions
-which do not preload libc.so, and so they can not be built with this
+<para><parameter>-fstack-protector</parameter> only protects functions with arrays of 
+length seven of less. <parameter>-fstack-protector-all</parameter> protects all functions 
+regardless of array size. Because the <function>__guard_setup</function> function is in 
+Libc anything compiled with <parameter>-fstack-protector*</parameter> will need to preload
+<filename class="libraryfile">libc.so</filename> (or <filename class="libraryfile">libc.a</filename>). 
+Most applications already do this. <filename class="libraryfile">libc.so</filename> itself, 
+<filename class="libraryfile">ld.so</filename>, <filename 
+class="libraryfile">libbsd-compat.so</filename>, etc, are exceptions which do not preload 
+<filename class="libraryfile">libc.so</filename>, and so they can not be built with this
 protection.</para>
  
-<para>
-Also see:
-man 1 gcc
-http://www.research.ibm.com/trl/projects/security/ssp/
-http://frandom.sourceforge.net/
-http://www.immunix.org/stackguard.html
+<para>See also:
+<itemizedlist>
+<listitem>
+<para><command>man 1 gcc</command></para>
+</listitem>
+<listitem>
+<para><ulink url="http://www.research.ibm.com/trl/projects/security/ssp/"/></para>
+</listitem>
+<listitem>
+<para><ulink url="http://frandom.sourceforge.net/"/></para>
+</listitem>
+<listitem>
+<para><ulink url="http://www.immunix.org/stackguard.html"/></para>
+</listitem>
+</itemizedlist>
+</para>
 
-Operating system distributors using SSP (there are many more):
-http://www.adamantix.org/
-http://www.debian-hardened.org/
-http://www.gentoo.org/
-http://www.openbsd.org/
+<para>Operating system distributors using SSP (there are many more):
+<itemizedlist>
+<listitem>
+<para><ulink url="http://www.adamantix.org/"/></para>
+</listitem>
+<listitem>
+<para><ulink url="http://www.debian-hardened.org/"/></para>
+</listitem>
+<listitem>
+<para><ulink url="http://www.gentoo.org/"/></para>
+</listitem>
+<listitem>
+<para><ulink url="http://www.openbsd.org/"/></para>
+</listitem>
+</itemizedlist>
 </para>
 
 </sect1>

Modified: trunk/BOOK/chapter02/toolchain.xml
===================================================================
--- trunk/BOOK/chapter02/toolchain.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter02/toolchain.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -196,7 +196,7 @@
 Educationally, knowing the difference between static and dynamic linking is
 useful. The technical benefit is a gained element of independence from the host,
 meaning that those programs can be used independently of the host system.
-However, it is worth noting that an overall successful LFS build can still be
+However, it is worth noting that an overall successful HLFS build can still be
 achieved when the first two packages are built dynamically.</para>
 
 </sect2>

Modified: trunk/BOOK/chapter03/patches.xml
===================================================================
--- trunk/BOOK/chapter03/patches.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter03/patches.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -11,7 +11,7 @@
 These patches correct any mistakes in the packages that should be
 fixed by the maintainer.  The patches also make small modifications to
 make the packages easier to work with. The following patches will be
-needed to build an LFS system:</para>
+needed to build an HLFS system:</para>
 
 <variablelist role="materials">
 

Modified: trunk/BOOK/chapter04/aboutlfs.xml
===================================================================
--- trunk/BOOK/chapter04/aboutlfs.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter04/aboutlfs.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -7,27 +7,27 @@
 <title>About $LFS</title>
 <?dbhtml filename="aboutlfs.html"?>
 
-<para>Throughout this book, the environment variable <envar>LFS</envar> will
+<para>Throughout this book, the environment variable <envar>HLFS</envar> will
 be used several times. It is paramount that this variable is always defined.
-It should be set to the mount point chosen for the LFS partition.
-Check that the <envar>LFS</envar> variable is set up properly with:</para>
+It should be set to the mount point chosen for the HLFS partition.
+Check that the <envar>HLFS</envar> variable is set up properly with:</para>
 
-<screen><userinput>echo $LFS</userinput></screen>
+<screen><userinput>echo $HLFS</userinput></screen>
 
-<para>Make sure the output shows the path to the LFS partition's mount
-point, which is <filename class="directory">/mnt/lfs</filename> if the
+<para>Make sure the output shows the path to the HLFS partition's mount
+point, which is <filename class="directory">/mnt/hlfs</filename> if the
 provided example was followed. If the output is incorrect, the
 variable can be set with:</para>
 
-<screen><userinput>export LFS=/mnt/lfs</userinput></screen>
+<screen><userinput>export HLFS=/mnt/hlfs</userinput></screen>
 
 <para>Having this variable set is beneficial in that commands such as
-<command>mkdir $LFS/tools</command> can be typed literally. The shell
-will automatically replace <quote>$LFS</quote> with
-<quote>/mnt/lfs</quote> (or whatever the variable was set to) when it
+<command>mkdir $HLFS/tools</command> can be typed literally. The shell
+will automatically replace <quote>$HLFS</quote> with
+<quote>/mnt/hlfs</quote> (or whatever the variable was set to) when it
 processes the command line.</para>
 
-<para>Do not forget to check that <envar>$LFS</envar> is set whenever
+<para>Do not forget to check that <envar>$HLFS</envar> is set whenever
 you leave and reenter the current working environment (as when doing a
 <quote>su</quote> to <emphasis>root</emphasis> or another user).</para>
 

Modified: trunk/BOOK/chapter04/aboutsbus.xml
===================================================================
--- trunk/BOOK/chapter04/aboutsbus.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter04/aboutsbus.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -8,7 +8,7 @@
 <?dbhtml filename="aboutsbus.html"?>
 
 <para>Many people would like to know beforehand approximately how long
-it takes to compile and install each package. Because Linux From
+it takes to compile and install each package. Because Hardened Linux From
 Scratch can be built on many different systems, it is impossible to
 provide accurate time estimates.  The biggest package (Glibc) will
 take approximately 20 minutes on the fastest systems, but could take

Modified: trunk/BOOK/chapter04/addinguser.xml
===================================================================
--- trunk/BOOK/chapter04/addinguser.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter04/addinguser.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -4,21 +4,21 @@
   %general-entities;
 ]>
 <sect1 id="ch-tools-addinguser">
-<title>Adding the LFS User</title>
+<title>Adding the HLFS User</title>
 <?dbhtml filename="addinguser.html"?>
 
 <para>When logged in as user <emphasis>root</emphasis>, making a
 single mistake can damage or destroy a system. Therefore, we recommend
 building the packages in this chapter as an unprivileged user. You
 could use your own user name, but to make it easier to set up a clean
-work environment, create a new user called <emphasis>lfs</emphasis> as
-a member of a new group (also named <emphasis>lfs</emphasis>) and use
+work environment, create a new user called <emphasis>hlfs</emphasis> as
+a member of a new group (also named <emphasis>hlfs</emphasis>) and use
 this user during the installation process. As
 <emphasis>root</emphasis>, issue the following commands to add the new
 user:</para>
 
-<screen><userinput>groupadd lfs
-useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
+<screen><userinput>groupadd hlfs
+useradd -s /bin/bash -g hlfs -m -k /dev/null hlfs</userinput></screen>
 
 <para>The meaning of the command line options:</para>
 
@@ -27,19 +27,19 @@
 <term><parameter>-s /bin/bash</parameter></term>
 <listitem><para>This makes
 <command>bash</command> the default shell for user
-<emphasis>lfs</emphasis>.</para></listitem>
+<emphasis>hlfs</emphasis>.</para></listitem>
 </varlistentry>
 
 <varlistentry>
-<term><parameter>-g lfs</parameter></term>
-<listitem><para>This option adds user <emphasis>lfs</emphasis> to group
-<emphasis>lfs</emphasis>.</para></listitem>
+<term><parameter>-g hlfs</parameter></term>
+<listitem><para>This option adds user <emphasis>hlfs</emphasis> to group
+<emphasis>hlfs</emphasis>.</para></listitem>
 </varlistentry>
 
 <varlistentry>
 <term><parameter>-m</parameter></term>
 <listitem><para>This creates a home
-directory for <emphasis>lfs</emphasis>.</para></listitem>
+directory for <emphasis>hlfs</emphasis>.</para></listitem>
 </varlistentry>
 
 <varlistentry>
@@ -51,37 +51,37 @@
 </varlistentry>
 
 <varlistentry>
-<term><parameter>lfs</parameter></term>
+<term><parameter>hlfs</parameter></term>
 <listitem><para>This is the actual name for the created group and
 user.</para></listitem>
 </varlistentry>
 </variablelist>
 
-<para>To log in as <emphasis>lfs</emphasis> (as opposed to switching
-to user <emphasis>lfs</emphasis> when
+<para>To log in as <emphasis>hlfs</emphasis> (as opposed to switching
+to user <emphasis>hlfs</emphasis> when
 logged in as <emphasis>root</emphasis>, which does not require the
-<emphasis>lfs</emphasis> user to have a
-password), give <emphasis>lfs</emphasis> a password:</para>
+<emphasis>hlfs</emphasis> user to have a
+password), give <emphasis>hlfs</emphasis> a password:</para>
 
-<screen><userinput>passwd lfs</userinput></screen>
+<screen><userinput>passwd hlfs</userinput></screen>
 
-<para>Grant <emphasis>lfs</emphasis> full access to
-<filename class="directory">$LFS/tools</filename> by making
-<emphasis>lfs</emphasis> the directory owner:</para>
+<para>Grant <emphasis>hlfs</emphasis> full access to
+<filename class="directory">$HLFS/tools</filename> by making
+<emphasis>hlfs</emphasis> the directory owner:</para>
 
-<screen><userinput>chown lfs $LFS/tools</userinput></screen>
+<screen><userinput>chown hlfs $HLFS/tools</userinput></screen>
 
 <beginpage/>
 <para>If a separate working directory was created as suggested, give
-user <emphasis>lfs</emphasis> ownership of this directory:</para>
+user <emphasis>hlfs</emphasis> ownership of this directory:</para>
 
-<screen><userinput>chown lfs $LFS/sources</userinput></screen>
+<screen><userinput>chown hlfs $HLFS/sources</userinput></screen>
 
-<para>Next, login as user <emphasis>lfs</emphasis>. This can be done
+<para>Next, login as user <emphasis>hlfs</emphasis>. This can be done
 via a virtual console, through a display manager, or with the
 following substitute user command:</para>
 
-<screen><userinput>su - lfs</userinput></screen>
+<screen><userinput>su - hlfs</userinput></screen>
 
 <para>The <quote><parameter>-</parameter></quote> instructs
 <command>su</command> to start a login shell as opposed to a non-login

Modified: trunk/BOOK/chapter04/creatingtoolsdir.xml
===================================================================
--- trunk/BOOK/chapter04/creatingtoolsdir.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter04/creatingtoolsdir.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -4,15 +4,15 @@
   %general-entities;
 ]>
 <sect1 id="ch-tools-creatingtoolsdir">
-<title>Creating the $LFS/tools Directory</title>
+<title>Creating the $HLFS/tools Directory</title>
 <?dbhtml filename="creatingtoolsdir.html"?>
 
 <para>All programs compiled in <xref
 linkend="chapter-temporary-tools"/> will be installed under <filename
-class="directory">$LFS/tools</filename> to keep them separate from the
+class="directory">$HLFS/tools</filename> to keep them separate from the
 programs compiled in <xref linkend="chapter-building-system"/>. The
 programs compiled here are temporary tools and will not be a part of
-the final LFS system.  By keeping these programs in a separate
+the final HLFS system.  By keeping these programs in a separate
 directory, they can easily be discarded later after their use. This
 also prevents these programs from ending up in the host production
 directories (easy to do by accident in <xref
@@ -21,14 +21,14 @@
 <para>Create the required directory by running the following as
 <emphasis>root</emphasis>:</para>
 
-<screen><userinput>mkdir $LFS/tools</userinput></screen>
+<screen><userinput>mkdir $HLFS/tools</userinput></screen>
 
 <para>The next step is to create a <filename class="symlink">/tools</filename> 
 symlink on the host system.  This will point to the newly-created directory on
-the LFS partition. Run this command as <emphasis>root</emphasis> as
+the HLFS partition. Run this command as <emphasis>root</emphasis> as
 well:</para>
 
-<screen><userinput>ln -s $LFS/tools /</userinput></screen>
+<screen><userinput>ln -s $HLFS/tools /</userinput></screen>
 
 <note><para>The above command is correct. The <command>ln</command>
 command has a few syntactic variations, so be sure to check the info
@@ -39,7 +39,7 @@
 it always refers to <filename class="directory">/tools</filename>,
 meaning that the compiler, assembler, and linker will work both in
 this chapter (when we are still using some tools from the host) and in
-the next (when we are <quote>chrooted</quote> to the LFS
+the next (when we are <quote>chrooted</quote> to the HLFS
 partition).</para>
 
 </sect1>

Modified: trunk/BOOK/chapter04/settingenviron.xml
===================================================================
--- trunk/BOOK/chapter04/settingenviron.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter04/settingenviron.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -9,14 +9,14 @@
 
 <para>Set up a good working environment by creating two new startup
 files for the <command>bash</command> shell. While logged in as user
-<emphasis>lfs</emphasis>, issue the
+<emphasis>hlfs</emphasis>, issue the
 following command to create a new <filename>.bash_profile</filename>:</para>
 
 <screen><userinput>cat > ~/.bash_profile << "EOF"
 <literal>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash</literal>
 EOF</userinput></screen>
 
-<para>When logged on as user <emphasis>lfs</emphasis>, the
+<para>When logged on as user <emphasis>hlfs</emphasis>, the
 initial shell is usually a <emphasis>login</emphasis> shell which reads the
 <filename>/etc/profile</filename> of the host (probably containing
 some settings and environment variables) and then
@@ -39,10 +39,10 @@
 <screen><userinput>cat > ~/.bashrc << "EOF"
 <literal>set +h
 umask 022
-LFS=/mnt/lfs
+HLFS=/mnt/hlfs
 LC_ALL=POSIX
 PATH=/tools/bin:/bin:/usr/bin
-export LFS LC_ALL PATH</literal>
+export HLFS LC_ALL PATH</literal>
 EOF</userinput></screen>
 
 <para>The <command>set +h</command> command turns off
@@ -53,7 +53,7 @@
 should be used as soon as they are installed. By switching off the
 hash function, the shell will always search the <envar>PATH</envar> when a program is
 to be run. As such, the shell will find the newly compiled
-tools in <filename class="directory">$LFS/tools</filename> as soon as
+tools in <filename class="directory">$HLFS/tools</filename> as soon as
 they are available without remembering a previous version of the same
 program in a different location.</para>
 
@@ -64,7 +64,7 @@
 by the open(2) system call, new files will end up with permission mode
 644 and directories with mode 755).</para>
 
-<para>The <envar>LFS</envar> variable should be set to the
+<para>The <envar>HLFS</envar> variable should be set to the
 chosen mount point.</para>
 
 <para>The <envar>LC_ALL</envar> variable controls the

Deleted: trunk/BOOK/chapter05/environment.xml
===================================================================
--- trunk/BOOK/chapter05/environment.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter05/environment.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
-  <!ENTITY % general-entities SYSTEM "../general.ent">
-  %general-entities;
-]>
-<sect1 id="ch-tools-settingenviron">
-<title>Setting Up the Environment</title>
-<?dbhtml filename="environment.html"?>
-
-<para>Set up a good working environment by creating two new startup
-files for the <command>bash</command> shell. While logged in as user
-<emphasis>lfs</emphasis>, issue the
-following command to create a new <filename>.bash_profile</filename>:</para>
-
-<screen><userinput>cat > ~/.bash_profile << "EOF"
-<literal>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash</literal>
-EOF</userinput></screen>
-
-<para>When logged on as user <emphasis>lfs</emphasis>, the
-initial shell is usually a <emphasis>login</emphasis> shell which reads the
-<filename>/etc/profile</filename> of the host (probably containing
-some settings and environment variables) and then
-<filename>.bash_profile</filename>. The <command>exec env
--i.../bin/bash</command> command in the
-<filename>.bash_profile</filename> file replaces the running shell
-with a new one with a completely empty environment, except for the
-<envar>HOME</envar>, <envar>TERM</envar>, and
-<envar>PS1</envar> variables. This ensures that no unwanted and
-potentially hazardous environment variables from the host system leak
-into the build environment. The technique used here achieves the goal
-of ensuring a clean environment.</para>
-
-<para>The new instance of the shell is a <emphasis>non-login</emphasis>
-shell, which does not read the <filename>/etc/profile</filename> or
-<filename>.bash_profile</filename> files, but rather reads the
-<filename>.bashrc</filename> file instead. Create the
-<filename>.bashrc</filename> file now:</para>
-
-<screen><userinput>cat > ~/.bashrc << "EOF"
-<literal>set +h
-umask 022
-LFS=/mnt/lfs
-LC_ALL=POSIX
-PATH=/tools/bin:/bin:/usr/bin
-export LFS LC_ALL PATH</literal>
-EOF</userinput></screen>
-
-<para>The <command>set +h</command> command turns off
-<command>bash</command>'s hash function. Hashing is ordinarily a useful 
-feature—<command>bash</command> uses a hash table to remember the
-full path of executable files to avoid searching the <envar>PATH</envar> time
-and again to find the same executable. However, the new tools
-should be used as soon as they are installed. By switching off the
-hash function, the shell will always search the <envar>PATH</envar> when a program is
-to be run. As such, the shell will find the newly compiled
-tools in <filename class="directory">$LFS/tools</filename> as soon as
-they are available without remembering a previous version of the same
-program in a different location.</para>
-
-<beginpage/>
-<para>Setting the user file-creation mask (umask) to 022 ensures that newly
-created files and directories are only writable by their owner, but
-are readable and executable by anyone (assuming default modes are used
-by the open(2) system call, new files will end up with permission mode
-644 and directories with mode 755).</para>
-
-<para>The <envar>LFS</envar> variable should be set to the
-chosen mount point.</para>
-
-<para>The <envar>LC_ALL</envar> variable controls the
-localization of certain programs, making their messages follow the
-conventions of a specified country.  If the host system uses a version
-of Glibc older than 2.2.4, having <envar>LC_ALL</envar> set to something other than
-<quote>POSIX</quote> or <quote>C</quote> (during this chapter) may
-cause issues if you exit the chroot environment and wish to return
-later. Setting <envar>LC_ALL</envar> to <quote>POSIX</quote>
-or <quote>C</quote> (the two are equivalent) ensures that
-everything will work as expected in the chroot environment.</para>
-
-<para>By putting <filename class="directory">/tools/bin</filename>
-ahead of the standard <envar>PATH</envar>, all the programs installed in <xref
-linkend="chapter-temporary-tools"/> are picked up by the shell
-immediately after their installation. This, combined with turning off 
-hashing, limits the risk that old programs from
-the host are being used when they should not be used any
-longer.</para>
-
-<para>Finally, to have the environment fully prepared for building the
-temporary tools, source the just-created user profile:</para>
-
-<screen><userinput>source ~/.bash_profile</userinput></screen>
-
-</sect1>
-

Modified: trunk/BOOK/chapter05/introduction.xml
===================================================================
--- trunk/BOOK/chapter05/introduction.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter05/introduction.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -9,7 +9,7 @@
 
 <para>This chapter shows how to compile and install a minimal Linux
 system. This system will contain just enough tools to start
-constructing the final LFS system in <xref
+constructing the final HLFS system in <xref
 linkend="chapter-building-system"/> and allow a working environment
 with more user convenience than a minimum environment would.</para>
 
@@ -19,14 +19,14 @@
 step uses this toolchain to build the other essential tools.</para>
 
 <para>The files compiled in this chapter will be installed under the
-<filename class="directory">$LFS/tools</filename> directory to keep
+<filename class="directory">$HLFS/tools</filename> directory to keep
 them separate from the files installed in the next chapter and the
 host production directories. Since the packages compiled here are
-temporary, we do not want them to pollute the soon-to-be LFS
+temporary, we do not want them to pollute the soon-to-be HLFS
 system.</para>
 
 <para>Before issuing the build instructions for a package, the package
-should be unpacked as user <emphasis>lfs</emphasis>, and a
+should be unpacked as user <emphasis>hlfs</emphasis>, and a
 <command>cd</command> into the created directory should be performed. The build
 instructions assume that the <command>bash</command> shell is in use.</para>
 
@@ -56,13 +56,13 @@
 be used by later commands. Pay special attention to these
 reminders.</para>
 
-<para>Check one last time that the <envar>LFS</envar> environment 
+<para>Check one last time that the <envar>HLFS</envar> environment 
 variable is set up properly:</para>
 
-<screen><userinput>echo $LFS</userinput></screen>
+<screen><userinput>echo $HLFS</userinput></screen>
 
-<para>Make sure the output shows the path to the LFS partition's mount
-point, which is <filename class="directory">/mnt/lfs</filename>, using
+<para>Make sure the output shows the path to the HLFS partition's mount
+point, which is <filename class="directory">/mnt/hlfs</filename>, using
 our example.</para>
 
 </sect1>

Modified: trunk/BOOK/chapter06/introduction.xml
===================================================================
--- trunk/BOOK/chapter06/introduction.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/chapter06/introduction.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -8,7 +8,7 @@
 <?dbhtml filename="introduction.html"?>
 
 <para>In this chapter, we enter the building site and start
-constructing the LFS system in earnest. That is, we chroot into the
+constructing the HLFS system in earnest. That is, we chroot into the
 temporary mini Linux system, make a few final preparations, and then
 begin installing the packages.</para>
 
@@ -33,7 +33,7 @@
 been compiled incorrectly because of the complex interactions between
 the code and build tools.  The small potential gains achieved in using
 compiler optimizations are often outweighed by the risks. First-time
-builders of LFS are encouraged to build without custom optimizations.
+builders of HLFS are encouraged to build without custom optimizations.
 The subsequent system will still run very fast and be stable at the
 same time.</para>
 
@@ -60,12 +60,12 @@
 manager can be used. For a general overview of different styles of package
 managers, please refer to <ulink
 url="&blfs-root;view/svn/introduction/important.html"/>.
-For a package management method specifically geared towards LFS, we recommend <ulink
+For a package management method specifically geared towards HLFS, we recommend <ulink
 url="&hints-root;more_control_and_pkg_man.txt"/>.</para>
 
 <note><para>The remainder of this book is to be performed while logged
 in as user <emphasis>root</emphasis> and no longer as user
-<emphasis>lfs</emphasis>.</para></note>
+<emphasis>hlfs</emphasis>.</para></note>
 
 </sect1>
 

Modified: trunk/BOOK/index.xml
===================================================================
--- trunk/BOOK/index.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/index.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -24,7 +24,7 @@
 </part>
 
 <part id="part3">
-<title>Building the LFS System</title>
+<title>Building the HLFS System</title>
 <?dbhtml filename="part3.html"?>
 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chapter06/chapter06.xml"/>
 <!--

Modified: trunk/BOOK/prologue/typography.xml
===================================================================
--- trunk/BOOK/prologue/typography.xml	2005-02-08 23:18:19 UTC (rev 153)
+++ trunk/BOOK/prologue/typography.xml	2005-02-09 20:31:44 UTC (rev 154)
@@ -17,7 +17,7 @@
 in the explanation sections to identify which of the commands is being 
 referenced.</para></blockquote>
 
-<screen><computeroutput>install-info: unknown option `--dir-file=/mnt/lfs/usr/info/dir'</computeroutput></screen>
+<screen><computeroutput>install-info: unknown option `--dir-file=/usr/info/dir'</computeroutput></screen>
 
 <blockquote><para>This form of text (fixed width text) is showing screen 
 output, probably as the result of commands issued, and is also used to 




More information about the hlfs-dev mailing list