aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/chapter06.xml
blob: 0de12cb7ac9ed01c075bd2317810d035a3877052 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>
<chapter id="chapter-building-system" xreflabel="Chapter 6">
<?dbhtml dir="chapter06"?>
<title>Installing basic system software</title>
<?dbhtml filename="chapter06.html"?>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="proc.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chroot.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changingowner.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingdirs.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="createfiles.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pwdgroup.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="makedev.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernel-headers.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-pages.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>




<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="readjusting.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc.xml"/>



<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="zlib.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mktemp.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="iana-etc.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="vim.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="m4.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="less.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="groff.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="net-tools.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="inetutils.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="autoconf.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="automake.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="file.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="libtool.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bzip2.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="diffutils.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ed.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kbd.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="e2fsprogs.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grub.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="modutils.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patch.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="procinfo.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="procps.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="psmisc.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="shadow.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysklogd.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysvinit.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-2953.xml"/>




<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutdebug.xml"/>


<sect1 id="ch-system-strippingagain">
<title>Stripping again</title>
<?dbhtml filename="strippingagain.html"?>

<para>If you are not a programmer and don't plan to do any debugging on your
system software, you can shrink your system by about 200 MB by removing the
debugging symbols from binaries and libraries. This causes no inconvenience
other than not being able to debug the software fully any more.</para>

<para>Most people who use the command mentioned below don't experience any
problems. But it is easy to make a typo and render your new system unusable, so
before running the strip command it is probably a good idea to make a backup of
the current situation.</para>

<para>If you are going to perform the stripping, special care is needed to
ensure you're not running any of the binaries that are about to be stripped.
If you're not sure whether you entered chroot with the command given in
<xref linkend="ch-system-chroot"/>, then first exit from chroot:</para>

<screen><userinput>logout</userinput></screen>

<para>Then reenter it with:</para>

<screen><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>Now you can safely strip the binaries and libraries:</para>

<screen><userinput>/tools/bin/find /{,usr/}{bin,lib,sbin} -type f \
   -exec /tools/bin/strip --strip-debug '{}' ';'</userinput></screen>

<para>A large number of files will be reported as having their file format not
recognized. These warnings can be safely ignored, they just mean that those
files are scripts instead of binaries, no harm is done.</para>

<para>If you are really tight on disk space, you may want to use
<emphasis>--strip-all</emphasis> on the binaries in
<filename>/{,usr/}{bin,sbin}</filename> to gain several more megabytes. But do
<emphasis>not</emphasis> use this option on libraries: they would be
destroyed.</para>

</sect1>


<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="revisedchroot.xml"/>

</chapter>