[e0f737f] | 1 | <sect1 id="ch09-theend">
|
---|
[6acc848] | 2 | <title>The End</title>
|
---|
[e12115e] | 3 | <?dbhtml filename="theend.html" dir="chapter09"?>
|
---|
[6acc848] | 4 |
|
---|
[b822811] | 5 | <para>Well done! You have finished installing your LFS system. It may have
|
---|
[a2cd10f] | 6 | been a long process, but we hope it was worth it. We wish you a lot of fun
|
---|
[b822811] | 7 | with your new shiny custom built Linux system.</para>
|
---|
[6acc848] | 8 |
|
---|
[b822811] | 9 | <para>Now would be a good time to strip all debug symbols from
|
---|
[e3a1c58] | 10 | the binaries on your LFS system. If you are not a programmer and don't plan
|
---|
| 11 | on debugging your software, then you will be happy to know that you can
|
---|
| 12 | reclaim a few tens of megs by removing debug symbols. This process causes
|
---|
| 13 | no inconvenience other than not being able to debug the software fully
|
---|
[70364ce] | 14 | anymore, which is not an issue if you don't know how to debug.</para>
|
---|
[921d418f] | 15 |
|
---|
[b822811] | 16 | <para>Disclaimer: 98% of the people who use the command mentioned below don't
|
---|
[f76811f] | 17 | experience any problems. But do make a backup of your LFS system before
|
---|
| 18 | you run this command. There's a slight chance it may backfire on you and
|
---|
| 19 | render your system unusable (mostly by destroying your kernel modules
|
---|
[a2cd10f] | 20 | and dynamic & shared libraries). This is caused more often by typos
|
---|
[70364ce] | 21 | than by a problem with the command used.</para>
|
---|
[f76811f] | 22 |
|
---|
[70364ce] | 23 | <para>Having said that, the --strip-debug option we use to strip is quite
|
---|
| 24 | harmless under normal circumstances. It doesn't strip anything vital from
|
---|
| 25 | the files. It also is quite safe to use --strip-all on regular programs
|
---|
[a2cd10f] | 26 | (don't use that on libraries - they will be destroyed), but it's not as
|
---|
| 27 | safe, and the space you gain is not all that much. But if you're tight on
|
---|
| 28 | disk space every little bit helps, so decide for yourself. Please refer to
|
---|
[f76811f] | 29 | the strip man page for other strip options you can use. The general idea
|
---|
[a2cd10f] | 30 | is to not run strip on libraries (other than --strip-debug), just to be
|
---|
[b822811] | 31 | on the safe side.</para>
|
---|
[f76811f] | 32 |
|
---|
[821f799] | 33 | <para>If you are planning to go ahead and perform the strip, special care is
|
---|
| 34 | needed to ensure you're not running any binaries that are about to be stripped
|
---|
| 35 | -- including the active bash shell. Therefore you'll need to exit the chroot
|
---|
[234c74e] | 36 | environment and reenter it using a modified chroot command:</para>
|
---|
[921d418f] | 37 |
|
---|
[821f799] | 38 | <screen><userinput>logout
|
---|
| 39 | chroot $LFS /tools/bin/env -i \
|
---|
| 40 | HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
---|
| 41 | PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
---|
| 42 | /tools/bin/bash --login</userinput></screen>
|
---|
| 43 |
|
---|
| 44 | <para>Now run the following command:</para>
|
---|
| 45 |
|
---|
| 46 | <screen><userinput>/tools/bin/find /{,usr/,usr/local/}{bin,sbin,lib} -type f \
|
---|
| 47 | -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
|
---|
| 48 |
|
---|
| 49 | <para>Quite a number of files will be reported as having their file format not
|
---|
| 50 | recognized. Most of these are scripts instead of binaries. These warnings can
|
---|
| 51 | be safely ignored.</para>
|
---|
| 52 |
|
---|
[28618789] | 53 | <para>It may be a good idea to create an <filename>/etc/lfs-release</filename>
|
---|
| 54 | file. By having this file it is very easy for you (and for us if you are going
|
---|
| 55 | to ask for help with something at some point) to find out which LFS version
|
---|
| 56 | you have installed on your system. Create this file by running:</para>
|
---|
[6acc848] | 57 |
|
---|
[a92249f] | 58 | <screen><userinput>echo &version; > /etc/lfs-release</userinput></screen>
|
---|
[5ba7054] | 59 |
|
---|
[6acc848] | 60 | </sect1>
|
---|
| 61 |
|
---|