2001-06-30 00:30:11 +01:00
|
|
|
<sect1 id="ch09-theend">
|
2001-02-23 19:34:23 +00:00
|
|
|
<title>The End</title>
|
2001-09-26 01:35:10 +01:00
|
|
|
<?dbhtml filename="theend.html" dir="chapter09"?>
|
2001-02-23 19:34:23 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>Well done! You have finished installing your LFS system. It may have
|
2002-06-03 12:27:19 +01:00
|
|
|
been a long process, but we hope it was worth it. We wish you a lot of fun
|
2001-07-22 20:45:10 +01:00
|
|
|
with your new shiny custom built Linux system.</para>
|
2001-02-23 19:34:23 +00:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>Now would be a good time to strip all debug symbols from
|
2001-05-06 17:43:16 +01:00
|
|
|
the binaries on your LFS system. If you are not a programmer and don't plan
|
|
|
|
on debugging your software, then you will be happy to know that you can
|
|
|
|
reclaim a few tens of megs by removing debug symbols. This process causes
|
|
|
|
no inconvenience other than not being able to debug the software fully
|
2001-08-29 21:08:18 +01:00
|
|
|
anymore, which is not an issue if you don't know how to debug.</para>
|
2001-04-21 18:05:11 +01:00
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>Disclaimer: 98% of the people who use the command mentioned below don't
|
2001-05-21 21:07:20 +01:00
|
|
|
experience any problems. But do make a backup of your LFS system before
|
|
|
|
you run this command. There's a slight chance it may backfire on you and
|
|
|
|
render your system unusable (mostly by destroying your kernel modules
|
2002-06-03 12:27:19 +01:00
|
|
|
and dynamic & shared libraries). This is caused more often by typos
|
2001-08-29 21:08:18 +01:00
|
|
|
than by a problem with the command used.</para>
|
2001-05-21 21:07:20 +01:00
|
|
|
|
2001-08-29 21:08:18 +01:00
|
|
|
<para>Having said that, the --strip-debug option we use to strip is quite
|
|
|
|
harmless under normal circumstances. It doesn't strip anything vital from
|
|
|
|
the files. It also is quite safe to use --strip-all on regular programs
|
2002-06-03 12:27:19 +01:00
|
|
|
(don't use that on libraries - they will be destroyed), but it's not as
|
|
|
|
safe, and the space you gain is not all that much. But if you're tight on
|
|
|
|
disk space every little bit helps, so decide for yourself. Please refer to
|
2001-05-21 21:07:20 +01:00
|
|
|
the strip man page for other strip options you can use. The general idea
|
2002-06-03 12:27:19 +01:00
|
|
|
is to not run strip on libraries (other than --strip-debug), just to be
|
2001-07-22 20:45:10 +01:00
|
|
|
on the safe side.</para>
|
2001-05-21 21:07:20 +01:00
|
|
|
|
2003-10-16 02:02:39 +01:00
|
|
|
<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
|
2003-10-16 02:11:05 +01:00
|
|
|
environment and reenter it using a modified chroot command:</para>
|
2001-04-21 18:05:11 +01:00
|
|
|
|
2003-10-16 02:02:39 +01:00
|
|
|
<screen><userinput>logout
|
|
|
|
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>Now run the following command:</para>
|
|
|
|
|
|
|
|
<screen><userinput>/tools/bin/find /{,usr/,usr/local/}{bin,sbin,lib} -type f \
|
|
|
|
-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>
|
|
|
|
|
2003-10-22 23:26:46 +01:00
|
|
|
<para>It's a good idea to create an <filename>/etc/lfs</filename> file. By
|
2001-08-29 21:08:18 +01:00
|
|
|
having this file it is very easy for you (and for us if you are going to ask
|
2001-02-23 19:34:23 +00:00
|
|
|
for help with something at some point) to find out which LFS version
|
2003-10-22 23:26:46 +01:00
|
|
|
you have installed on your system. Create the <filename>/etc/lfs</filename>
|
|
|
|
file by running the following command:</para>
|
2001-02-23 19:34:23 +00:00
|
|
|
|
2003-10-23 16:15:46 +01:00
|
|
|
<screen><userinput>echo &version; > /etc/lfs-release</userinput></screen>
|
2001-08-27 23:17:43 +01:00
|
|
|
|
2001-02-23 19:34:23 +00:00
|
|
|
</sect1>
|
|
|
|
|