aboutsummaryrefslogtreecommitdiffstats
path: root/chapter09/theend.xml
diff options
context:
space:
mode:
authorGreg Schafer <greg@linuxfromscratch.org>2003-10-16 01:02:39 +0000
committerGreg Schafer <greg@linuxfromscratch.org>2003-10-16 01:02:39 +0000
commit821f799640e4769281103a44dcf963593230dbaf (patch)
treea1bb07b7d6439835a00994e3763d1ff4ccbe0001 /chapter09/theend.xml
parent1fb160c30c52f09a10133eedf5d9b9bb24c122f6 (diff)
Chapter 9: Reworked final strip command. Relocated paragraphs about directory removal from Chapter 6.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2992 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter09/theend.xml')
-rw-r--r--chapter09/theend.xml27
1 files changed, 22 insertions, 5 deletions
diff --git a/chapter09/theend.xml b/chapter09/theend.xml
index 61e8cfcbb..14c7406e2 100644
--- a/chapter09/theend.xml
+++ b/chapter09/theend.xml
@@ -30,16 +30,33 @@ the strip man page for other strip options you can use. The general idea
is to not run strip on libraries (other than --strip-debug), just to be
on the safe side.</para>
-<screen><userinput>find $LFS/{,usr/,usr/local/}{bin,sbin,lib} -type f \
-&nbsp;&nbsp;&nbsp;-exec /usr/bin/strip --strip-debug '{}' ';'</userinput></screen>
+<para>If you are planning to go ahead and perform the strip, special care is
+needed to ensure you're not running any binaries that are about to be stripped
+-- including the active bash shell. Therefore you'll need to exit the chroot
+environemnt and reenter it using a modified chroot command:</para>
-<para>It may be a good idea to create the $LFS/etc/lfs file. By
+<screen><userinput>logout
+chroot $LFS /tools/bin/env -i \
+&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 --login</userinput></screen>
+
+<para>Now run the following command:</para>
+
+<screen><userinput>/tools/bin/find /{,usr/,usr/local/}{bin,sbin,lib} -type f \
+&nbsp;&nbsp;&nbsp;-exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
+
+<para>Quite a number of files will be reported as having their file format not
+recognized. Most of these are scripts instead of binaries. These warnings can
+be safely ignored.</para>
+
+<para>It's a good idea to create an /etc/lfs file. By
having this file it is very easy for you (and for us if you are going to ask
for help with something at some point) to find out which LFS version
-you have installed on your system. Create the $LFS/etc/lfs file by
+you have installed on your system. Create the /etc/lfs file by
running the following command:</para>
-<screen><userinput>echo &version; > $LFS/etc/lfs</userinput></screen>
+<screen><userinput>echo &version; > /etc/lfs</userinput></screen>
</sect1>