Index: BOOK/bootable/arm/kernel.xml
===================================================================
--- BOOK/bootable/arm/kernel.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/bootable/arm/kernel.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -54,5 +54,5 @@
     url="&blfs-root;view/svn/longindex.html#kernel-config-index"/>:</para>
 
-<screen os="i"><userinput>make menuconfig</userinput></screen>
+<screen os="i"><userinput>make ARCH=arm CROSS_COMPILE=${LFS_TARGET}- menuconfig</userinput></screen>
 
     <para os="j">Alternatively, <command>make oldconfig</command> may be more
@@ -69,5 +69,5 @@
     <para os="m">Compile the kernel image and modules:</para>
 
-<screen os="n"><userinput>make</userinput></screen>
+<screen os="n"><userinput>make ARCH=arm CROSS_COMPILE=${LFS_TARGET}-</userinput></screen>
 
     <para os="o">If using kernel modules, an
@@ -97,13 +97,14 @@
     them:</para>
 
-<screen os="t"><userinput>make modules_install</userinput></screen>
+<screen os="t"><userinput>make ARCH=arm CROSS_COMPILE=${LFS_TARGET}- \
+    INSTALL_MOD_PATH=${LFS} modules_install</userinput></screen>
 
     <para os="u">After kernel compilation is complete, additional steps are
     required to complete the installation. Some files need to be copied to
-    the <filename class="directory">/boot</filename> directory.</para>
+    the <filename class="directory">${LFS}/boot</filename> directory.</para>
 
     <para os="v">Issue the following command to install the kernel:</para>
 
-<screen><userinput>cp arch/i386/boot/bzImage /boot/lfskernel-&linux-version;</userinput></screen>
+<screen><userinput>cp arch/i386/boot/bzImage ${LFS}/boot/lfskernel-&linux-version;</userinput></screen>
 
     <para os="w"><filename>System.map</filename> is a symbol file for the kernel.
@@ -112,5 +113,5 @@
     kernel. Issue the following command to install the map file:</para>
 
-<screen os="w1"><userinput>cp System.map /boot/System.map-&linux-version;</userinput></screen>
+<screen os="w1"><userinput>cp System.map ${LFS}/boot/System.map-&linux-version;</userinput></screen>
 
     <para os="x">The kernel configuration file <filename>.config</filename>
@@ -119,24 +120,5 @@
     It is a good idea to keep this file for future reference:</para>
 
-<screen os="x1"><userinput>cp .config /boot/config-&linux-version;</userinput></screen>
-
-    <para os="y">It is important to note that the files in the kernel source
-    directory are not owned by <systemitem class="username">root</systemitem>.
-    Whenever a package is unpacked as user <systemitem
-    class="username">root</systemitem> (like we did
-    inside chroot), the files have the user and group IDs of whatever
-    they were on the packager's computer. This is usually not a problem
-    for any other package to be installed because the source tree is
-    removed after the installation. However, the Linux source tree is
-    often retained for a long time.  Because of this, there is a chance
-    that whatever user ID the packager used will be assigned to somebody
-    on the machine. That person would then have write access to the kernel
-    source.</para>
-
-    <para os="y1">If the kernel source tree is going to retained, run
-    <command>chown -R 0:0</command> on the <filename
-    class="directory">linux-&linux-version;</filename> directory to
-    ensure all files are owned by user <systemitem
-    class="username">root</systemitem>.</para>
+<screen os="x1"><userinput>cp .config ${LFS}/boot/config-&linux-version;</userinput></screen>
 
     <warning os="z">
Index: BOOK/cross-tools/common/file.xml
===================================================================
--- BOOK/cross-tools/common/file.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/cross-tools/common/file.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -14,6 +14,6 @@
     <title>Installation of File</title>
 
-    <note>You only need to install <package>file</package> if your host has
-    a version other then file-&file-version; installed.</note>
+    <note><para>You only need to install <package>file</package> if your host has
+    a version other then file-&file-version; installed.</para></note>
 
     <para>Prepare File for compilation:</para>
@@ -31,3 +31,11 @@
   </sect2>
 
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in <xref
+    linkend="contents-file" role="."/></para>
+
+  </sect2>
+
 </sect1>
Index: BOOK/cross-tools/common/glibc.xml
===================================================================
--- BOOK/cross-tools/common/glibc.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/cross-tools/common/glibc.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -370,5 +370,5 @@
           <para>Can be used to create a stack trace when a program
           terminates with a segmentation fault</para>
-          <indexterm zone="ch-system-glibc catchsegv">
+          <indexterm zone="ch-cross-tools-glibc catchsegv">
             <primary sortas="b-catchsegv">catchsegv</primary>
           </indexterm>
@@ -380,5 +380,5 @@
         <listitem>
           <para>Generates message catalogues</para>
-          <indexterm zone="ch-system-glibc gencat">
+          <indexterm zone="ch-cross-tools-glibc gencat">
             <primary sortas="b-gencat">gencat</primary>
           </indexterm>
@@ -391,5 +391,5 @@
           <para>Displays the system configuration values for file system specific
           variables</para>
-          <indexterm zone="ch-system-glibc getconf">
+          <indexterm zone="ch-cross-tools-glibc getconf">
             <primary sortas="b-getconf">getconf</primary>
           </indexterm>
@@ -401,5 +401,5 @@
         <listitem>
           <para>Gets entries from an administrative database</para>
-          <indexterm zone="ch-system-glibc getent">
+          <indexterm zone="ch-cross-tools-glibc getent">
             <primary sortas="b-getent">getent</primary>
           </indexterm>
@@ -411,5 +411,5 @@
         <listitem>
           <para>Performs character set conversion</para>
-          <indexterm zone="ch-system-glibc iconv">
+          <indexterm zone="ch-cross-tools-glibc iconv">
             <primary sortas="b-iconv">iconv</primary>
           </indexterm>
@@ -422,5 +422,5 @@
           <para>Creates fastloading <command>iconv</command> module configuration
           files</para>
-          <indexterm zone="ch-system-glibc iconvconfig">
+          <indexterm zone="ch-cross-tools-glibc iconvconfig">
             <primary sortas="b-iconvconfig">iconvconfig</primary>
           </indexterm>
@@ -432,5 +432,5 @@
         <listitem>
           <para>Configures the dynamic linker runtime bindings</para>
-          <indexterm zone="ch-system-glibc ldconfig">
+          <indexterm zone="ch-cross-tools-glibc ldconfig">
             <primary sortas="b-ldconfig">ldconfig</primary>
           </indexterm>
@@ -443,5 +443,5 @@
           <para>Reports which shared libraries are required
           by each given program or shared library</para>
-          <indexterm zone="ch-system-glibc ldd">
+          <indexterm zone="ch-cross-tools-glibc ldd">
             <primary sortas="b-ldd">ldd</primary>
           </indexterm>
@@ -453,5 +453,5 @@
         <listitem>
           <para>Assists <command>ldd</command> with object files</para>
-          <indexterm zone="ch-system-glibc lddlibc4">
+          <indexterm zone="ch-cross-tools-glibc lddlibc4">
             <primary sortas="b-lddlibc4">lddlibc4</primary>
           </indexterm>
@@ -464,5 +464,5 @@
           <para>Tells the compiler to enable or disable the use of POSIX locales
           for built-in operations</para>
-          <indexterm zone="ch-system-glibc locale">
+          <indexterm zone="ch-cross-tools-glibc locale">
             <primary sortas="b-locale">locale</primary>
           </indexterm>
@@ -474,5 +474,5 @@
         <listitem>
           <para>Compiles locale specifications</para>
-          <indexterm zone="ch-system-glibc localedef">
+          <indexterm zone="ch-cross-tools-glibc localedef">
             <primary sortas="b-localedef">localedef</primary>
           </indexterm>
@@ -485,5 +485,5 @@
           <para>Reads and interprets a memory trace file and
           displays a summary in human-readable format</para>
-          <indexterm zone="ch-system-glibc mtrace">
+          <indexterm zone="ch-cross-tools-glibc mtrace">
             <primary sortas="b-mtrace">mtrace</primary>
           </indexterm>
@@ -496,5 +496,5 @@
           <para>A daemon that provides a cache for the most common name
           service requests</para>
-          <indexterm zone="ch-system-glibc nscd">
+          <indexterm zone="ch-cross-tools-glibc nscd">
             <primary sortas="b-nscd">nscd</primary>
           </indexterm>
@@ -507,5 +507,5 @@
           <para>Checks whether or not secure mode is necessary for NIS+
           lookup</para>
-          <indexterm zone="ch-system-glibc nscd_nischeck">
+          <indexterm zone="ch-cross-tools-glibc nscd_nischeck">
             <primary sortas="b-nscd_nischeck">nscd_nischeck</primary>
           </indexterm>
@@ -517,5 +517,5 @@
         <listitem>
           <para>Dumps information generated by PC profiling</para>
-          <indexterm zone="ch-system-glibc pcprofiledump">
+          <indexterm zone="ch-cross-tools-glibc pcprofiledump">
             <primary sortas="b-pcprofiledump">pcprofiledump</primary>
           </indexterm>
@@ -528,5 +528,5 @@
           <para>A helper program for <command>grantpt</command> to set the owner,
           group and access permissions of a slave pseudo terminal</para>
-          <indexterm zone="ch-system-glibc pt_chown">
+          <indexterm zone="ch-cross-tools-glibc pt_chown">
             <primary sortas="b-pt_chown">pt_chown</primary>
           </indexterm>
@@ -539,5 +539,5 @@
           <para>Generates C code to implement the Remote Procecure Call (RPC)
           protocol</para>
-          <indexterm zone="ch-system-glibc rpcgen">
+          <indexterm zone="ch-cross-tools-glibc rpcgen">
             <primary sortas="b-rpcgen">rpcgen</primary>
           </indexterm>
@@ -549,5 +549,5 @@
         <listitem>
           <para>Makes an RPC call to an RPC server</para>
-          <indexterm zone="ch-system-glibc rpcinfo">
+          <indexterm zone="ch-cross-tools-glibc rpcinfo">
             <primary sortas="b-rpcinfo">rpcinfo</primary>
           </indexterm>
@@ -559,5 +559,5 @@
         <listitem>
           <para>A statically linked <command>ln</command> program</para>
-          <indexterm zone="ch-system-glibc sln">
+          <indexterm zone="ch-cross-tools-glibc sln">
             <primary sortas="b-sln">sln</primary>
           </indexterm>
@@ -569,5 +569,5 @@
         <listitem>
           <para>Reads and displays shared object profiling data</para>
-          <indexterm zone="ch-system-glibc sprof">
+          <indexterm zone="ch-cross-tools-glibc sprof">
             <primary sortas="b-sprof">sprof</primary>
           </indexterm>
@@ -580,5 +580,5 @@
           <para>Asks the user about the location of the
           system and reports the corresponding time zone description</para>
-          <indexterm zone="ch-system-glibc tzselect">
+          <indexterm zone="ch-cross-tools-glibc tzselect">
             <primary sortas="b-tzselect">tzselect</primary>
           </indexterm>
@@ -591,5 +591,5 @@
           <para>Traces the execution of a program by
           printing the currently executed function</para>
-          <indexterm zone="ch-system-glibc xtrace">
+          <indexterm zone="ch-cross-tools-glibc xtrace">
             <primary sortas="b-xtrace">xtrace</primary>
           </indexterm>
@@ -601,5 +601,5 @@
         <listitem>
           <para>The time zone dumper</para>
-          <indexterm zone="ch-system-glibc zdump">
+          <indexterm zone="ch-cross-tools-glibc zdump">
             <primary sortas="b-zdump">zdump</primary>
           </indexterm>
@@ -611,5 +611,5 @@
         <listitem>
           <para>The time zone compiler</para>
-          <indexterm zone="ch-system-glibc zic">
+          <indexterm zone="ch-cross-tools-glibc zic">
             <primary sortas="b-zic">zic</primary>
           </indexterm>
@@ -621,5 +621,5 @@
         <listitem>
           <para>The helper program for shared library executables</para>
-          <indexterm zone="ch-system-glibc ld.so">
+          <indexterm zone="ch-cross-tools-glibc ld.so">
             <primary sortas="c-ld.so">ld.so</primary>
           </indexterm>
@@ -631,5 +631,5 @@
         <listitem>
           <para>Used by programs, such as Mozilla, to solve broken locales</para>
-          <indexterm zone="ch-system-glibc libBrokenLocale">
+          <indexterm zone="ch-cross-tools-glibc libBrokenLocale">
             <primary sortas="c-libBrokenLocale">libBrokenLocale</primary>
           </indexterm>
@@ -641,5 +641,5 @@
         <listitem>
           <para>The segmentation fault signal handler</para>
-          <indexterm zone="ch-system-glibc libSegFault">
+          <indexterm zone="ch-cross-tools-glibc libSegFault">
             <primary sortas="c-libSegFault">libSegFault</primary>
           </indexterm>
@@ -651,5 +651,5 @@
         <listitem>
           <para>An asynchronous name lookup library</para>
-          <indexterm zone="ch-system-glibc libanl">
+          <indexterm zone="ch-cross-tools-glibc libanl">
             <primary sortas="c-libanl">libanl</primary>
           </indexterm>
@@ -663,5 +663,5 @@
           in order to run certain Berkey Software Distribution (BSD) programs
           under Linux</para>
-          <indexterm zone="ch-system-glibc libbsd-compat">
+          <indexterm zone="ch-cross-tools-glibc libbsd-compat">
             <primary sortas="c-libbsd-compat">libbsd-compat</primary>
           </indexterm>
@@ -673,5 +673,5 @@
         <listitem>
           <para>The main C library</para>
-          <indexterm zone="ch-system-glibc libc">
+          <indexterm zone="ch-cross-tools-glibc libc">
             <primary sortas="c-libc">libc</primary>
           </indexterm>
@@ -683,5 +683,5 @@
         <listitem>
           <para>The cryptography library</para>
-          <indexterm zone="ch-system-glibc libcrypt">
+          <indexterm zone="ch-cross-tools-glibc libcrypt">
             <primary sortas="c-libcrypt">libcrypt</primary>
           </indexterm>
@@ -693,5 +693,5 @@
         <listitem>
           <para>The dynamic linking interface library</para>
-          <indexterm zone="ch-system-glibc libdl">
+          <indexterm zone="ch-cross-tools-glibc libdl">
             <primary sortas="c-libdl">libdl</primary>
           </indexterm>
@@ -703,5 +703,5 @@
         <listitem>
           <para>A runtime library for <command>g++</command></para>
-          <indexterm zone="ch-system-glibc libg">
+          <indexterm zone="ch-cross-tools-glibc libg">
             <primary sortas="c-libg">libg</primary>
           </indexterm>
@@ -714,5 +714,5 @@
           <para>The Institute of Electrical and Electronic Engineers (IEEE)
           floating point library</para>
-          <indexterm zone="ch-system-glibc libieee">
+          <indexterm zone="ch-cross-tools-glibc libieee">
             <primary sortas="c-libieee">libieee</primary>
           </indexterm>
@@ -724,5 +724,5 @@
         <listitem>
           <para>The mathematical library</para>
-          <indexterm zone="ch-system-glibc libm">
+          <indexterm zone="ch-cross-tools-glibc libm">
             <primary sortas="c-libm">libm</primary>
           </indexterm>
@@ -734,5 +734,5 @@
         <listitem>
           <para>Contains code run at boot</para>
-          <indexterm zone="ch-system-glibc libmcheck">
+          <indexterm zone="ch-cross-tools-glibc libmcheck">
             <primary sortas="c-libmcheck">libmcheck</primary>
           </indexterm>
@@ -745,5 +745,5 @@
           <para>Used by <command>memusage</command> to help collect
           information about the memory usage of a program</para>
-          <indexterm zone="ch-system-glibc libmemusage">
+          <indexterm zone="ch-cross-tools-glibc libmemusage">
             <primary sortas="c-libmemusage">libmemusage</primary>
           </indexterm>
@@ -755,5 +755,5 @@
         <listitem>
           <para>The network services library</para>
-          <indexterm zone="ch-system-glibc libnsl">
+          <indexterm zone="ch-cross-tools-glibc libnsl">
             <primary sortas="c-libnsl">libnsl</primary>
           </indexterm>
@@ -767,5 +767,5 @@
           resolving host names, user names, group names, aliases, services,
           protocols, etc.</para>
-          <indexterm zone="ch-system-glibc libnss">
+          <indexterm zone="ch-cross-tools-glibc libnss">
             <primary sortas="c-libnss">libnss</primary>
           </indexterm>
@@ -778,5 +778,5 @@
           <para>Contains profiling functions used to track the amount of CPU
           time spent in specific source code lines</para>
-          <indexterm zone="ch-system-glibc libpcprofile">
+          <indexterm zone="ch-cross-tools-glibc libpcprofile">
             <primary sortas="c-libpcprofile">libpcprofile</primary>
           </indexterm>
@@ -788,5 +788,5 @@
         <listitem>
           <para>The POSIX threads library</para>
-          <indexterm zone="ch-system-glibc libpthread">
+          <indexterm zone="ch-cross-tools-glibc libpthread">
             <primary sortas="c-libpthread">libpthread</primary>
           </indexterm>
@@ -799,5 +799,5 @@
           <para>Contains functions for creating, sending, and interpreting
           packets to the Internet domain name servers</para>
-          <indexterm zone="ch-system-glibc libresolv">
+          <indexterm zone="ch-cross-tools-glibc libresolv">
             <primary sortas="c-libresolv">libresolv</primary>
           </indexterm>
@@ -809,5 +809,5 @@
         <listitem>
           <para>Contains functions providing miscellaneous RPC services</para>
-          <indexterm zone="ch-system-glibc librpcsvc">
+          <indexterm zone="ch-cross-tools-glibc librpcsvc">
             <primary sortas="c-librpcsvc">librpcsvc</primary>
           </indexterm>
@@ -820,5 +820,5 @@
           <para>Contains functions providing most of the interfaces specified by
           the POSIX.1b Realtime Extension</para>
-          <indexterm zone="ch-system-glibc librt">
+          <indexterm zone="ch-cross-tools-glibc librt">
             <primary sortas="c-librt">librt</primary>
           </indexterm>
@@ -831,5 +831,5 @@
           <para>Contains functions useful for
           building debuggers for multi-threaded programs</para>
-          <indexterm zone="ch-system-glibc libthread_db">
+          <indexterm zone="ch-cross-tools-glibc libthread_db">
             <primary sortas="c-libthread_db">libthread_db</primary>
           </indexterm>
@@ -842,5 +842,5 @@
           <para>Contains code for <quote>standard</quote> functions used in
           many different Unix utilities</para>
-          <indexterm zone="ch-system-glibc libutil">
+          <indexterm zone="ch-cross-tools-glibc libutil">
             <primary sortas="c-libutil">libutil</primary>
           </indexterm>
Index: BOOK/final-preps/creatingfiles.xml
===================================================================
--- BOOK/final-preps/creatingfiles.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-preps/creatingfiles.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -9,5 +9,29 @@
   <?dbhtml filename="creatingfiles.html"?>
 
-  <title>Creating Essential Files</title>
+  <title>Creating the passwd, group, and log Files</title>
+
+  <indexterm zone="ch-final-preps-creatingfiles">
+    <primary sortas="e-/etc/passwd">/etc/passwd</primary>
+  </indexterm>
+
+  <indexterm zone="ch-final-preps-creatingfiles">
+    <primary sortas="e-/etc/group">/etc/group</primary>
+  </indexterm>
+
+  <indexterm zone="ch-final-preps-creatingfiles">
+    <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
+  </indexterm>
+
+  <indexterm zone="ch-final-preps-creatingfiles">
+    <primary sortas="e-${LFS}/var/log/btmp">/var/log/btmp</primary>
+  </indexterm>
+
+  <indexterm zone="ch-final-preps-creatingfiles">
+    <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
+  </indexterm>
+
+  <indexterm zone="ch-final-preps-creatingfiles">
+    <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
+  </indexterm>
 
   <para>A proper Linux system maintains a list of the mounted file systems in
Index: BOOK/final-system/common/bash.xml
===================================================================
--- BOOK/final-system/common/bash.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/bash.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -28,7 +28,8 @@
     install HTML documentation, issue the following commands:</para>
 
-<screen os="b"><userinput>tar -xvf ../bash-doc-&bash-doc-version;.tar.gz &amp;&amp;
-sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/bash-&bash-version;|" \
-    Makefile.in</userinput></screen>
+<screen os="b"><userinput>tar -xvf ../bash-doc-&bash-doc-version;.tar.gz
+cp Makefile.in{,.orig}
+sed "s|htmldir = @htmldir@|htmldir = /usr/share/doc/bash-&bash-version;|" \
+    Makefile.in.orig &gt; Makefile.in</userinput></screen>
 
     <para os="p1">The following patch contains updates from the maintainer. The
Index: BOOK/final-system/common/bzip2.xml
===================================================================
--- BOOK/final-system/common/bzip2.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/bzip2.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -48,5 +48,5 @@
 
 <screen os="s2"><userinput>cp Makefile{,.orig}
-sed -e "/^all:/s/ test//" Makefile.orig %gt; Makefile</userinput></screen>
+sed -e "/^all:/s/ test//" Makefile.orig &gt; Makefile</userinput></screen>
 
     <para os="a">The Bzip2 package does not contain a <command>configure</command>
Index: BOOK/final-system/common/gzip.xml
===================================================================
--- BOOK/final-system/common/gzip.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/gzip.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -42,5 +42,6 @@
     that the new location gets placed into the script:</para>
 
-<screen os="d"><userinput>sed -i 's@"BINDIR"@/bin@g' gzexe.in</userinput></screen>
+<screen os="d"><userinput>cp gzexec.in{,.orig}
+sed 's@"BINDIR"@/bin@g' gzexe.in.orig &gt; gzexec.in</userinput></screen>
 
     <para os="e">Compile the package:</para>
Index: BOOK/final-system/common/inetutils.xml
===================================================================
--- BOOK/final-system/common/inetutils.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/inetutils.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -35,4 +35,11 @@
 
 <screen os="p4"><userinput>patch -Np1 -i ../&inetutils-gcc4_fixes-patch;</userinput></screen>
+
+    <para os="s1">The following set of seds prevent binaries from being installed as root</para>
+
+<screen os="s2"><userinput>for dir in ping rcp rlogin rsh; do
+    cp ${dir}/Makefile.in{,.orig}
+    sed '/^SUIDMODE =/s/-o root//' ${dir}/Makefile.in.orig &gt; ${dir}/Makefile.in
+done</userinput></screen>
 
     <para os="a">Prepare Inetutils for compilation:</para>
Index: BOOK/final-system/common/iproute2.xml
===================================================================
--- BOOK/final-system/common/iproute2.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/iproute2.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -26,5 +26,12 @@
     <title>Installation of IPRoute2</title>
 
-    <para os="s1">The <command>arpd</command> binary included in this package is
+    <para os="s1">The following command prevents install trying to strip the binaries</para>
+
+<screen os="s2"><userinput>for dir in ip misc tc; do
+    cp ${dir}/Makefile{,.orig}
+    sed 's/0755 -s/0755/' ${dir}/Makefile.orig &gt; ${dir}/Makefile
+done</userinput></screen>
+
+    <para os="s3">The <command>arpd</command> binary included in this package is
     dependent on Berkeley DB.  Because <command>arpd</command> is not a
     very common requirement on a base Linux system, remove the dependency
@@ -34,5 +41,6 @@
     url="&blfs-root;view/svn/server/databases.html#db"/>.</para>
 
-<screen os="s2"><userinput>sed -i '/^TARGETS/s@arpd@@g' misc/Makefile</userinput></screen>
+<screen os="s4"><userinput>cp misc/Makefile{,.orig}
+sed '/^TARGETS/s@arpd@@g' misc/Makefile.orig &gt; misc/Makefile</userinput></screen>
 
     <para os="a">Compile the package:</para>
Index: BOOK/final-system/common/less.xml
===================================================================
--- BOOK/final-system/common/less.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/less.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -49,5 +49,5 @@
     <para os="f">Install the package:</para>
 
-<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
+<screen os="g"><userinput>make prefixR=${LFS}/usr install</userinput></screen>
 
     <para os="h">Move less to /bin:</para>
Index: BOOK/final-system/common/man.xml
===================================================================
--- BOOK/final-system/common/man.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/man.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -33,5 +33,6 @@
     properly handled by Less:</para>
 
-<screen os="c"><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
+<screen os="c"><userinput>cp configure{,.orig}
+sed 's@-is@&amp;R@g' configure.orig &gt; configure</userinput></screen>
 
     <para os="d">Another <command>sed</command> substitution comments out the
@@ -40,10 +41,12 @@
     <command>whatis</command>:</para>
 
-<screen os="e"><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
+<screen os="e"><userinput>cp src/man.conf.in{,.orig}
+sed 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in.orig &gt; src/man.conf.in</userinput></screen>
 
     <para os="f">Finally, correct a syntax error in the
     <command>makewhatis</command> script:</para>
 
-<screen os="g"><userinput>sed -i 's@)) |@) |@' src/makewhatis.sh</userinput></screen>
+<screen os="g"><userinput>cp src/makewhatis.sh{,.orig}
+sed 's@)) |@) |@' src/makewhatis.sh.orig &gt; src/makewhatis.sh</userinput></screen>
 
     <para os="h">Prepare Man for compilation:</para>
Index: BOOK/final-system/common/mktemp.xml
===================================================================
--- BOOK/final-system/common/mktemp.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/mktemp.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -35,6 +35,6 @@
     will try to strip the installed files:</para>
 
-<screen os="s2"><userinput>cp Makefile{,.orig}
-sed -e 's/-s $(PROG)/$(PROG)/' Makefile.orig &gt; Makefile</userinput></screen>
+<screen os="s2"><userinput>cp Makefile.in{,.orig}
+sed -e 's/-s $(PROG)/$(PROG)/' Makefile.in.orig &gt; Makefile.in</userinput></screen>
 
     <para os="c">Prepare Mktemp for compilation:</para>
Index: BOOK/final-system/common/perl.xml
===================================================================
--- BOOK/final-system/common/perl.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/perl.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -26,5 +26,5 @@
     <title>Installation of Perl</title>
 
-    <para os="w1"><important>Information on cross-compiling perl has not been added yet.</important></para>
+    <important os="w1"><para>Information on cross-compiling perl has not been added yet.</para></important>
 
     <para os="a00">Before starting to configure, create a basic
Index: BOOK/final-system/common/psmisc.xml
===================================================================
--- BOOK/final-system/common/psmisc.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/psmisc.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -51,5 +51,5 @@
     <para os="f">Install the package:</para>
 
-<screen os="g"><userinput>make install</userinput></screen>
+<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
 
     <para os="h">There is no reason for the <command>pstree</command> and
Index: BOOK/final-system/common/shadow.xml
===================================================================
--- BOOK/final-system/common/shadow.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/shadow.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -73,6 +73,8 @@
     program and its man pages, as Coreutils provides a better version:</para>
 
-<screen os="i"><userinput>sed -i 's/groups$(EXEEXT) //' src/Makefile
-sed -i '/groups/d' man/Makefile</userinput></screen>
+<screen os="i"><userinput>cp src/Makefile{,.orig}
+sed 's/groups$(EXEEXT) //' src/Makefile.orig &gt; src/Makefile
+cp man/Makefile{,.orig}
+sed '/groups/d' man/Makefile.orig &gt; man/Makefile</userinput></screen>
 
     <para os="j">Compile the package:</para>
@@ -121,5 +123,6 @@
       dictionary:</para>
 
-<screen><userinput>sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' ${LFS}/etc/login.defs</userinput></screen>
+<screen><userinput>cp {LFS}/etc/login.defs login.defs.orig
+sed 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' login.defs.orig &gt; ${LFS}/etc/login.defs</userinput></screen>
     </note>
 
Index: BOOK/final-system/common/stripping.xml
===================================================================
--- BOOK/final-system/common/stripping.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/stripping.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -23,23 +23,6 @@
   backup of the current situation.</para>
 
-  <para os="c">Before performing the stripping, take special care to ensure that
-  none of the binaries that are about to be stripped are running. If
-  unsure whether the user entered chroot with the command given in
-  <!-- <xref linkend="chapter-chroot" role=","/> --> first exit from
-  chroot:</para>
-
-<screen os="d" role="nodump"><userinput>logout</userinput></screen>
-
-    <para os="e">Then reenter it with:</para>
-
-<screen os="f" role="nodump"><userinput>chroot $LFS /tools/bin/env -i \
-    HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
-    PATH=/bin:/usr/bin:/sbin:/usr/sbin \
-    /tools/bin/bash --login</userinput></screen>
-
-    <para os="g">Now the binaries and libraries can be safely stripped:</para>
-
-<screen os="h"><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
-   -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
+<screen os="c"><userinput>find ${LFS}/{,usr/}{bin,lib,sbin} -type f \
+   -exec ${LFS_TARGET}-strip --strip-debug '{}' ';'</userinput></screen>
 
     <para os="i">A large number of files will be reported as having their file
Index: BOOK/final-system/common/sysklogd.xml
===================================================================
--- BOOK/final-system/common/sysklogd.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/sysklogd.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -43,5 +43,5 @@
     <para os="f">Install the package:</para>
 
-<screen os="g"><userinput>make DESTDIR=${LFS} install</userinput></screen>
+<screen os="g"><userinput>make prefix=${LFS} install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/sysvinit.xml
===================================================================
--- BOOK/final-system/common/sysvinit.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/sysvinit.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -36,6 +36,7 @@
     instead:</para>
 
-<screen os="b"><userinput>sed -i 's@Sending processes@&amp; started by init@g' \
-    src/init.c</userinput></screen>
+<screen os="b"><userinput>cp src/init.c{,.orig}
+sed 's@Sending processes@&amp; started by init@g' \
+    src/init.c.orig &gt; src/init.c</userinput></screen>
 
     <para os="s1">The following sed makes changes in the Makefile required for cross-compiling</para>
@@ -45,4 +46,5 @@
     -e "s@/dev/initctl@${LFS}&amp;@g" \
     -e 's@\(mknod \)-m \([0-9]* \)\(.* \)p@\1\3p; chmod \2\3@g' \
+    -e "s@/usr/lib@${LFS}&amp;@" \
     src/Makefile.orig &gt; src/Makefile</userinput></screen>
 
@@ -54,5 +56,5 @@
     <para os="e">Install the package:</para>
 
-<screen os="f"><userinput>make -C src install</userinput></screen>
+<screen os="f"><userinput>make -C src ROOT=${LFS} INSTALL="install" install</userinput></screen>
 
   </sect2>
Index: BOOK/final-system/common/util-linux.xml
===================================================================
--- BOOK/final-system/common/util-linux.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/util-linux.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -34,6 +34,7 @@
     <command>hwclock</command> program FHS-compliant, run the following:</para>
 
-<screen><userinput>sed -i 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
-    hwclock/hwclock.c
+<screen><userinput>cp hwclock/hwclock.c{,.orig}
+sed 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
+    hwclock/hwclock.c.orig &gt; hwclock/hwclock.c
 mkdir -pv /var/lib/hwclock</userinput></screen>
 
Index: BOOK/final-system/common/vim.xml
===================================================================
--- BOOK/final-system/common/vim.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/vim.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -34,5 +34,5 @@
     <title>Installation of Vim</title>
 
-    <important>The cross-compilation of vim is currently a mystery. Help would be greatly apreciated</important>
+    <important os="w1"><para>The cross-compilation of vim is currently a mystery. Help would be greatly apreciated</para></important>
 
     <para os="a">First, unpack both <filename>vim-&vim-version;.tar.bz2</filename>
Index: BOOK/final-system/common/zlib.xml
===================================================================
--- BOOK/final-system/common/zlib.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/final-system/common/zlib.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -34,5 +34,5 @@
 
 <screen os="s2"><userinput>cp Makefile.in{,.orig}
-sed 's/$(AR) $@/$(AR) r $@/' Makefile.in &gt; Makefile.in</userinput></screen>
+sed 's/$(AR) $@/$(AR) r $@/' Makefile.in.orig &gt; Makefile.in</userinput></screen>
 
     <para os="a">Prepare Zlib for compilation:</para>
@@ -59,5 +59,5 @@
     <para os="i">Now we fix the permissions on the static library:</para>
 
-<screen os="j"><userinput>chmod -v 644 /usr/lib/libz.a</userinput></screen>
+<screen os="j"><userinput>chmod -v 644 ${LFS}/usr/lib/libz.a</userinput></screen>
 
   </sect2>
Index: BOOK/general.ent
===================================================================
--- BOOK/general.ent	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/general.ent	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 
-<!ENTITY version "SVN-20060525">
+<!ENTITY version "SVN-20060527">
 <!ENTITY version-ARM "&version;-ARM">
 
-<!ENTITY releasedate "May 25, 2006">
+<!ENTITY releasedate "May 27, 2006">
 <!ENTITY milestone "0.2">
 <!ENTITY generic-version "svn"> <!-- Use "svn", "testing", or "x.y[-pre{x}]" -->
Index: BOOK/the-end/theend.xml
===================================================================
--- BOOK/the-end/theend.xml	(revision f6c417ff89bc4f472b77f49bae8bef6343367427)
+++ BOOK/the-end/theend.xml	(revision 3349a3acd1c638814bbc17de0aaa18c8dd06a5cd)
@@ -24,5 +24,5 @@
   Create this file by running:</para>
 
-<screen><userinput>echo &version; &gt; /etc/clfs-release</userinput></screen>
+<screen><userinput>echo &version; &gt; ${LFS}/etc/clfs-release</userinput></screen>
 
 </sect1>
