[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 3 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 4 | %general-entities;
|
---|
| 5 | ]>
|
---|
[dcff046] | 6 | <chapter id="chapter-building-system" xreflabel="Chapter 6">
|
---|
[673b0d8] | 7 | <?dbhtml dir="chapter06"?>
|
---|
[6370fa6] | 8 | <title>Installing basic system software</title>
|
---|
[673b0d8] | 9 | <?dbhtml filename="chapter06.html"?>
|
---|
[e421d2e] | 10 |
|
---|
[d322394] | 11 |
|
---|
[673b0d8] | 12 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
|
---|
[342b176] | 13 |
|
---|
| 14 |
|
---|
[673b0d8] | 15 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="proc.xml"/>
|
---|
[342b176] | 16 |
|
---|
| 17 |
|
---|
[673b0d8] | 18 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chroot.xml"/>
|
---|
[342b176] | 19 |
|
---|
| 20 |
|
---|
[673b0d8] | 21 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changingowner.xml"/>
|
---|
[342b176] | 22 |
|
---|
| 23 |
|
---|
[673b0d8] | 24 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingdirs.xml"/>
|
---|
[342b176] | 25 |
|
---|
| 26 |
|
---|
[673b0d8] | 27 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="createfiles.xml"/>
|
---|
[342b176] | 28 |
|
---|
| 29 |
|
---|
[673b0d8] | 30 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pwdgroup.xml"/>
|
---|
[342b176] | 31 |
|
---|
| 32 |
|
---|
[673b0d8] | 33 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="makedev.xml"/>
|
---|
[342b176] | 34 |
|
---|
[d322394] | 35 |
|
---|
[673b0d8] | 36 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernel-headers.xml"/>
|
---|
[d322394] | 37 |
|
---|
| 38 |
|
---|
[673b0d8] | 39 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-pages.xml"/>
|
---|
[d322394] | 40 |
|
---|
| 41 |
|
---|
[673b0d8] | 42 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>
|
---|
[d322394] | 43 |
|
---|
| 44 |
|
---|
| 45 |
|
---|
| 46 |
|
---|
[673b0d8] | 47 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="readjusting.xml"/>
|
---|
[d322394] | 48 |
|
---|
| 49 |
|
---|
[673b0d8] | 50 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils.xml"/>
|
---|
[d322394] | 51 |
|
---|
| 52 |
|
---|
[673b0d8] | 53 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc.xml"/>
|
---|
[d322394] | 54 |
|
---|
| 55 |
|
---|
| 56 |
|
---|
[673b0d8] | 57 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils.xml"/>
|
---|
[d322394] | 58 |
|
---|
[b6f86141] | 59 |
|
---|
[673b0d8] | 60 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="zlib.xml"/>
|
---|
[d322394] | 61 |
|
---|
| 62 |
|
---|
[673b0d8] | 63 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mktemp.xml"/>
|
---|
[d322394] | 64 |
|
---|
| 65 |
|
---|
[673b0d8] | 66 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="iana-etc.xml"/>
|
---|
[d322394] | 67 |
|
---|
[b157558] | 68 |
|
---|
[673b0d8] | 69 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/>
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/>
|
---|
| 73 |
|
---|
| 74 |
|
---|
| 75 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/>
|
---|
| 76 |
|
---|
| 77 |
|
---|
| 78 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="vim.xml"/>
|
---|
| 79 |
|
---|
| 80 |
|
---|
| 81 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="m4.xml"/>
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/>
|
---|
| 85 |
|
---|
| 86 |
|
---|
| 87 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="less.xml"/>
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="groff.xml"/>
|
---|
| 91 |
|
---|
| 92 |
|
---|
| 93 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/>
|
---|
| 94 |
|
---|
| 95 |
|
---|
| 96 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/>
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/>
|
---|
| 100 |
|
---|
| 101 |
|
---|
| 102 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="net-tools.xml"/>
|
---|
| 103 |
|
---|
| 104 |
|
---|
| 105 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="inetutils.xml"/>
|
---|
| 106 |
|
---|
| 107 |
|
---|
| 108 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>
|
---|
| 109 |
|
---|
| 110 |
|
---|
| 111 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/>
|
---|
| 112 |
|
---|
| 113 |
|
---|
| 114 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="autoconf.xml"/>
|
---|
| 115 |
|
---|
| 116 |
|
---|
| 117 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="automake.xml"/>
|
---|
| 118 |
|
---|
| 119 |
|
---|
| 120 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/>
|
---|
| 121 |
|
---|
| 122 |
|
---|
| 123 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="file.xml"/>
|
---|
| 124 |
|
---|
| 125 |
|
---|
| 126 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="libtool.xml"/>
|
---|
| 127 |
|
---|
| 128 |
|
---|
| 129 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bzip2.xml"/>
|
---|
| 130 |
|
---|
| 131 |
|
---|
| 132 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="diffutils.xml"/>
|
---|
| 133 |
|
---|
| 134 |
|
---|
| 135 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ed.xml"/>
|
---|
| 136 |
|
---|
| 137 |
|
---|
| 138 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kbd.xml"/>
|
---|
| 139 |
|
---|
| 140 |
|
---|
| 141 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="e2fsprogs.xml"/>
|
---|
| 142 |
|
---|
| 143 |
|
---|
| 144 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/>
|
---|
| 145 |
|
---|
| 146 |
|
---|
| 147 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grub.xml"/>
|
---|
| 148 |
|
---|
| 149 |
|
---|
| 150 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>
|
---|
| 151 |
|
---|
| 152 |
|
---|
| 153 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man.xml"/>
|
---|
| 154 |
|
---|
| 155 |
|
---|
| 156 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>
|
---|
| 157 |
|
---|
| 158 |
|
---|
| 159 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="modutils.xml"/>
|
---|
| 160 |
|
---|
| 161 |
|
---|
| 162 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patch.xml"/>
|
---|
| 163 |
|
---|
| 164 |
|
---|
| 165 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="procinfo.xml"/>
|
---|
| 166 |
|
---|
| 167 |
|
---|
| 168 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="procps.xml"/>
|
---|
| 169 |
|
---|
| 170 |
|
---|
| 171 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="psmisc.xml"/>
|
---|
| 172 |
|
---|
| 173 |
|
---|
| 174 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="shadow.xml"/>
|
---|
| 175 |
|
---|
| 176 |
|
---|
| 177 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysklogd.xml"/>
|
---|
| 178 |
|
---|
| 179 |
|
---|
| 180 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysvinit.xml"/>
|
---|
| 181 |
|
---|
| 182 |
|
---|
| 183 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/>
|
---|
| 184 |
|
---|
| 185 |
|
---|
| 186 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
|
---|
| 187 |
|
---|
| 188 |
|
---|
| 189 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-2953.xml"/>
|
---|
| 190 |
|
---|
| 191 |
|
---|
| 192 |
|
---|
| 193 |
|
---|
| 194 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutdebug.xml"/>
|
---|
[b157558] | 195 |
|
---|
| 196 |
|
---|
| 197 | <sect1 id="ch-system-strippingagain">
|
---|
| 198 | <title>Stripping again</title>
|
---|
[673b0d8] | 199 | <?dbhtml filename="strippingagain.html"?>
|
---|
[b157558] | 200 |
|
---|
| 201 | <para>If you are not a programmer and don't plan to do any debugging on your
|
---|
| 202 | system software, you can shrink your system by about 200 MB by removing the
|
---|
| 203 | debugging symbols from binaries and libraries. This causes no inconvenience
|
---|
| 204 | other than not being able to debug the software fully any more.</para>
|
---|
| 205 |
|
---|
| 206 | <para>Most people who use the command mentioned below don't experience any
|
---|
| 207 | problems. But it is easy to make a typo and render your new system unusable, so
|
---|
| 208 | before running the strip command it is probably a good idea to make a backup of
|
---|
| 209 | the current situation.</para>
|
---|
| 210 |
|
---|
| 211 | <para>If you are going to perform the stripping, special care is needed to
|
---|
| 212 | ensure you're not running any of the binaries that are about to be stripped.
|
---|
| 213 | If you're not sure whether you entered chroot with the command given in
|
---|
[db9d773c] | 214 | <xref linkend="ch-system-chroot"/>, then first exit from chroot:</para>
|
---|
[b157558] | 215 |
|
---|
[db9d773c] | 216 | <screen><userinput>logout</userinput></screen>
|
---|
| 217 |
|
---|
| 218 | <para>Then reenter it with:</para>
|
---|
| 219 |
|
---|
| 220 | <screen><userinput>chroot $LFS /tools/bin/env -i \
|
---|
[673b0d8] | 221 | HOME=/root TERM=$TERM PS1='\u:\w\$ ' \
|
---|
| 222 | PATH=/bin:/usr/bin:/sbin:/usr/sbin \
|
---|
| 223 | /tools/bin/bash --login</userinput></screen>
|
---|
[b157558] | 224 |
|
---|
| 225 | <para>Now you can safely strip the binaries and libraries:</para>
|
---|
| 226 |
|
---|
| 227 | <screen><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
|
---|
[673b0d8] | 228 | -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>
|
---|
[b157558] | 229 |
|
---|
| 230 | <para>A large number of files will be reported as having their file format not
|
---|
| 231 | recognized. These warnings can be safely ignored, they just mean that those
|
---|
| 232 | files are scripts instead of binaries, no harm is done.</para>
|
---|
| 233 |
|
---|
| 234 | <para>If you are really tight on disk space, you may want to use
|
---|
| 235 | <emphasis>--strip-all</emphasis> on the binaries in
|
---|
| 236 | <filename>/{,usr/}{bin,sbin}</filename> to gain several more megabytes. But do
|
---|
| 237 | <emphasis>not</emphasis> use this option on libraries: they would be
|
---|
| 238 | destroyed.</para>
|
---|
| 239 |
|
---|
| 240 | </sect1>
|
---|
| 241 |
|
---|
| 242 |
|
---|
[673b0d8] | 243 | <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="revisedchroot.xml"/>
|
---|
[d322394] | 244 |
|
---|
[6370fa6] | 245 | </chapter>
|
---|