/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-system.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-install-system.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.67 - (show annotations) (download) (as text)
Wed Dec 22 21:54:10 2004 UTC (9 years, 6 months ago) by swift
Branch: MAIN
Changes since 1.66: +10 -4 lines
File MIME type: application/xml
#74609 - Fix for locales

1 <?xml version='1.0' encoding='UTF-8'?>
2 <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3
4 <!-- The content of this document is licensed under the CC-BY-SA license -->
5 <!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6
7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-system.xml,v 1.66 2004/12/16 10:48:42 swift Exp $ -->
8
9 <sections>
10
11 <version>1.62</version>
12 <date>2004-12-22</date>
13
14 <section>
15 <title>Chrooting</title>
16 <subsection>
17 <title>Optional: Selecting Mirrors</title>
18 <body>
19
20 <p>
21 If you have booted from a Gentoo LiveCD, you are able to use <c>mirrorselect</c>
22 to update <path>/etc/make.conf</path> so fast mirrors are used for both Portage
23 and source code (of course this requires a working network connection):
24 </p>
25
26 <pre caption="Selecting fast mirrors">
27 # <i>mirrorselect -a -s4 -o |grep 'GENTOO_MIRRORS=' &gt;&gt; /mnt/gentoo/etc/make.conf</i>
28 </pre>
29
30 <p>
31 If for some reason <c>mirrorselect</c> fails, don't panic. This step is
32 completely optional, the default values suffice.
33 </p>
34
35 </body>
36 </subsection>
37 <subsection>
38 <title>Copy DNS Info</title>
39 <body>
40
41 <p>
42 One thing still remains to be done before we enter the new environment and that
43 is copying over the DNS information in <path>/etc/resolv.conf</path>. You need
44 to do this to ensure that networking still works even after entering the new
45 environment. <path>/etc/resolv.conf</path> contains the nameservers for your
46 network.
47 </p>
48
49 <pre caption="Copy over DNS information">
50 <comment>(The "-L" option is needed to make sure we don't copy a symbolic link)</comment>
51 # <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</i>
52 </pre>
53
54 </body>
55 </subsection>
56 <subsection>
57 <title>Mounting the proc Filesystem</title>
58 <body>
59
60 <p>
61 Mount the <path>/proc</path> filesystem on <path>/mnt/gentoo/proc</path> to
62 allow the installation to use the kernel-provided information even within the
63 chrooted environment.
64 </p>
65
66 <pre caption="Mounting /proc">
67 # <i>mount -t proc none /mnt/gentoo/proc</i>
68 </pre>
69
70 </body>
71 </subsection>
72 <subsection>
73 <title>Entering the new Environment</title>
74 <body>
75
76 <p>
77 Now that all partitions are initialized and the base environment
78 installed, it is time to enter our new installation environment by
79 <e>chrooting</e> into it. This means that we change from the current
80 installation environment (LiveCD or other installation medium) to your
81 installation system (namely the initialized partitions).
82 </p>
83
84 <p>
85 This chrooting is done in three steps. First we will change the root
86 from <path>/</path> (on the installation medium) to <path>/mnt/gentoo</path>
87 (on your partitions) using <c>chroot</c>. Then we will create a new environment
88 using <c>env-update</c>, which essentially creates environment variables.
89 Finally, we load those variables into memory using <c>source</c>.
90 </p>
91
92 <pre caption = "Chrooting into the new environment">
93 # <i>chroot /mnt/gentoo /bin/bash</i>
94 # <i>env-update</i>
95 * Caching service dependencies...
96 # <i>source /etc/profile</i>
97 </pre>
98
99 <p>
100 Congratulations! You are now inside your own Gentoo Linux environment.
101 Of course it is far from finished, which is why the installation still
102 has some sections left :-)
103 </p>
104
105 </body>
106 </subsection>
107 <subsection>
108 <title>Updating the Portage tree</title>
109 <body>
110
111 <p>
112 If you have a working Internet connection and you don't want to install our
113 prebuilt packages later on (also known as GRP packages), you should update your
114 Portage tree to the latest version. <c>emerge --sync</c> does this for you.
115 Other users should <e>only</e> run <c>emerge --metadata</c> to create the cache
116 database Portage usually creates after <c>emerge --sync</c>.
117 </p>
118
119 <pre caption="Updating the Portage tree">
120 <comment>(For users with an Internet connection who do not intend on using GRP packages)</comment>
121 # <i>emerge --sync</i>
122
123 <comment>(For all other users)</comment>
124 # <i>emerge --metadata</i>
125 </pre>
126
127 <p>
128 If you are warned that a new Portage version is available and that you should
129 update Portage, you should ignore it. Portage will be updated for you later
130 on during the installation.
131 </p>
132
133 </body>
134 </subsection>
135 <subsection id="configure_USE">
136 <title>Configuring the USE variable</title>
137 <body>
138
139 <warn>
140 Do not make any modifications to the USE variable if you are performing a stage3
141 with GRP installation. You can alter the USE variable after having installed the
142 packages you want. Gremlins are known to attack your system if you ignore this
143 warning!
144 </warn>
145
146 <p>
147 <c>USE</c> is one of the most powerful variables Gentoo provides to its users.
148 Several programs can be compiled with or without optional support for certain
149 items. For instance, some programs can be compiled with gtk-support, or with
150 qt-support. Others can be compiled with or without SSL support. Some programs
151 can even be compiled with framebuffer support (svgalib) instead of X11 support
152 (X-server).
153 </p>
154
155 <p>
156 Most distributions compile their packages with support for as much as possible,
157 increasing the size of the programs and startup time, not to mention an enormous
158 amount of dependencies. With Gentoo you can define what options a package
159 should be compiled with. This is where <c>USE</c> comes into play.
160 </p>
161
162 <p>
163 In the <c>USE</c> variable you define keywords which are mapped onto
164 compile-options. For instance, <e>ssl</e> will compile ssl-support in the
165 programs that support it. <e>-X</e> will remove X-server support (note the minus
166 sign in front). <e>gnome gtk -kde -qt</e> will compile your programs with gnome
167 (and gtk) support, and not with kde (and qt) support, making your system fully
168 tweaked for GNOME.
169 </p>
170
171 <p>
172 The default <c>USE</c> settings are placed in
173 <path>/etc/make.profile/make.defaults</path>. What you place in
174 <path>/etc/make.conf</path> is calculated against these defaults settings. If
175 you add something to the <c>USE</c> setting, it is added to the default list. If
176 you remove something from the <c>USE</c> setting (by placing a minus sign in
177 front of it) it is removed from the default list (if it was in the default list
178 at all). <e>Never</e> alter anything inside the <path>/etc/make.profile</path>
179 directory; it gets overwritten when you update Portage!
180 </p>
181
182 <p>
183 A full description on <c>USE</c> can be found in the second part of the Gentoo
184 Handbook, <uri link="?part=2&amp;chap=2">USE flags</uri>. A full description on
185 the available USE flags can be found on your system in
186 <path>/usr/portage/profiles/use.desc</path>.
187 </p>
188
189 <pre caption="Viewing available USE flags">
190 # <i>less /usr/portage/profiles/use.desc</i>
191 <comment>(You can scroll using your arrow keys, exit by pressing 'q')</comment>
192 </pre>
193
194 <p>
195 As an example we show a <c>USE</c> setting for a KDE-based system with DVD, ALSA
196 and CD Recording support:
197 </p>
198
199 <pre caption="Opening /etc/make.conf">
200 # <i>nano -w /etc/make.conf</i>
201 </pre>
202
203 <pre caption="USE setting">
204 USE="-gtk -gnome qt kde dvd alsa cdr"
205 </pre>
206
207 <p>
208 You will probably only use one or maybe two locales on your system. Up until now
209 after compiling <c>glibc</c> a full set of all available locales will be
210 created. As of now you can activate the <c>userlocales</c> USE flag and specify
211 only the locales you will need in <path>/etc/locales.build</path>. Only do this
212 if you know what locales to choose.
213 </p>
214
215 <pre caption="Activate the userlocales USE flag especially for glibc">
216 # <i>mkdir /etc/portage</i>
217 # <i>echo "sys-libs/glibc userlocales" >> /etc/portage/package.use</i>
218 </pre>
219
220 <p>
221 Now specify the locales you want to be able to use:
222 </p>
223
224 <pre caption="Opening /etc/locales.build">
225 # <i>nano -w /etc/locales.build</i>
226 </pre>
227
228 <p>
229 The following locales are an example to get both English (United States) and
230 German (Germany) with the accompanying character formats (like UTF-8).
231 </p>
232
233 <pre caption="Specify your locales">
234 en_US/ISO-8859-1
235 en_US.UTF-8/UTF-8
236 de_DE/ISO-8859-1
237 de_DE@euro/ISO-8859-15
238 </pre>
239
240 </body>
241 </subsection>
242 <subsection>
243 <title>Optional: Using Distributed Compiling</title>
244 <body>
245
246 <p>
247 If you are interested in using a collection of systems to help in compiling your
248 system you might want to take a look at our <uri
249 link="/doc/en/distcc.xml">DistCC Guide</uri>. By using <c>distcc</c> you can use
250 the processing power of several systems to aid you with the installation.
251 </p>
252
253 </body>
254 </subsection>
255 </section>
256 <section>
257 <title>Differences between Stage1, Stage2 and Stage3</title>
258 <body>
259
260 <p>
261 Now take a seat and think of your previous steps. We asked you to
262 select a <e>stage1</e>, <e>stage2</e> or <e>stage3</e> and warned you
263 that your choice is important for further installation steps. Well, this
264 is the first place where your choice defines the subsequent steps.
265 </p>
266
267 <ul>
268 <li>
269 If you chose <e>stage1</e>, then you have to follow <e>both</e> steps in
270 this chapter (starting with <uri link="#doc_chap3">Progressing from Stage1
271 to Stage2</uri>)
272 </li>
273 <li>
274 If you chose <e>stage2</e> you only can skip the first step
275 and immediately start with the second one (<uri link="#doc_chap4">Progressing
276 from Stage2 to Stage3</uri>)
277 </li>
278 <li>
279 If you chose <e>stage3</e> (either with or without GRP) then you can skip both
280 steps and continue with <uri link="?part=1&amp;chap=7">Configuring the
281 Kernel</uri>
282 </li>
283 </ul>
284
285 </body>
286 </section>
287 <section>
288 <title>Progressing from Stage1 to Stage2</title>
289 <subsection>
290 <title>Introduction to Bootstrapping</title>
291 <body>
292
293 <p>
294 So, you want to compile everything from scratch? Okay then :-)
295 </p>
296
297 <p>
298 In this step, we will <e>bootstrap</e> your Gentoo system. This takes a
299 long time, but the result is a system that has been optimized from the
300 ground up for your specific machine and needs.
301 </p>
302
303 <p>
304 <e>Bootstrapping</e> means building the GNU C Library, GNU Compiler
305 Collection and several other key system programs.
306 </p>
307
308 <p>
309 Before starting the bootstrap, you might want to download all necessary
310 sourcecode first. If you do not want to do this, continue
311 with <uri link="#bootstrap">Bootstrapping the System</uri>.
312 </p>
313
314 </body>
315 </subsection>
316 <subsection>
317 <title>Optional: Downloading the Sources First</title>
318 <body>
319
320 <p>
321 If you haven't copied over all source code before, then the bootstrap
322 script will download all necessary files. It goes without saying that
323 this only works if you have a working network connnection :-) If you want to
324 download the source code first and later bootstrap the system (for instance
325 because you don't want to have your internet connection open during the
326 compilation) use the <e>-f</e> option of the bootstrap script, which will
327 fetch (hence the letter <e>f</e>) all source code for you.
328 </p>
329
330 <pre caption = "Downloading the necessary sources">
331 # <i>cd /usr/portage</i>
332 # <i>scripts/bootstrap.sh -f</i>
333 </pre>
334
335 </body>
336 </subsection>
337 <subsection id="bootstrap">
338 <title>Bootstrapping the System</title>
339 <body>
340
341 <p>
342 Okay then, take your keyboard and punch in the next commands to start
343 the bootstrap. Then go amuse yourself with something else because this step
344 takes quite some time to finish.
345 </p>
346
347 <pre caption = "Bootstrapping the system">
348 # <i>cd /usr/portage</i>
349 # <i>scripts/bootstrap.sh</i>
350 </pre>
351
352 <p>
353 When you have set the <c>nptl</c> USE flag, rerunning <c>bootstrap.sh</c> might
354 fail with a message that <c>linux-headers</c> blocks <c>linux26-headers</c>.
355 When you receive this error, remove <c>linux-headers</c> and retry:
356 </p>
357
358 <pre caption="Removing linux-headers from your system">
359 # <i>emerge -C linux-headers</i>
360 # <i>emerge --oneshot --nodeps linux26-headers</i>
361 # <i>scripts/bootstrap.sh</i>
362 </pre>
363
364 <p>
365 Now continue with the next step, <uri link="#doc_chap4">Progressing from Stage2
366 to Stage3</uri>.
367 </p>
368
369 </body>
370 </subsection>
371 </section>
372 <section>
373 <title>Progressing from Stage2 to Stage3</title>
374 <subsection>
375 <title>Introduction</title>
376 <body>
377
378 <p>
379 If you are reading this section, then you have a bootstrapped system
380 (either because you bootstrapped it previously, or you are using a
381 <e>stage2</e>). Then it is now time to build all system packages.
382 </p>
383
384 <p>
385 <e>All</e> system packages? No, not really. In this step, you will build
386 the system packages of which there are no alternatives to use.
387 Some system packages have several alternatives (such as system loggers)
388 and as Gentoo is all about choices, we don't want to force one upon you.
389 </p>
390
391 </body>
392 </subsection>
393 <subsection>
394 <title>Optional: Viewing what will be done</title>
395 <body>
396
397 <p>
398 If you want to know what packages will be installed, execute <c>emerge
399 --pretend system</c>. This will list all packages that will be built. As this
400 list is pretty big, you should also use a pager like <c>less</c> or
401 <c>more</c> to go up and down the list.
402 </p>
403
404 <pre caption = "View what 'emerge system' will do">
405 # <i>emerge --pretend system | less</i>
406 </pre>
407
408 </body>
409 </subsection>
410 <subsection>
411 <title>Optional: Downloading the Sources</title>
412 <body>
413
414 <p>
415 If you want <c>emerge</c> to download the sources before you continue
416 (for instance because you don't want the internet connection to be left
417 open while you are building all packages) you can use the <e>--fetchonly</e>
418 option of <c>emerge</c> which will fetch all sources for you.
419 </p>
420
421 <pre caption = "Fetching the sources">
422 # <i>emerge --fetchonly system</i>
423 </pre>
424
425 </body>
426 </subsection>
427 <subsection>
428 <title>Building the System</title>
429 <body>
430
431 <p>
432 To start building the system, execute <c>emerge system</c>. Then go do
433 something to keep your mind busy, because this step takes a long time to
434 complete.
435 </p>
436
437 <pre caption = "Building the System">
438 # <i>emerge system</i>
439 </pre>
440
441 <p>
442 You can for now safely ignore any warnings about updated configuration files
443 (and running <c>etc-update</c>). When your Gentoo system is fully installed and
444 booted, do read our documentation on <uri
445 link="?part=3&amp;chap=2#doc_chap3">Configuration File Protection</uri>.
446 </p>
447
448 <p>
449 When the build process has completed, continue with <uri
450 link="?part=1&amp;chap=7">Configuring the Kernel</uri>.
451 </p>
452
453 </body>
454 </subsection>
455 </section>
456
457 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20