/[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.47 - (hide annotations) (download) (as text)
Fri Aug 13 13:34:29 2004 UTC (9 years, 8 months ago) by swift
Branch: MAIN
Changes since 1.46: +3 -3 lines
File MIME type: application/xml
Okay, turning back to the "old" profile system. The thread on -dev@ doesn't give
me a good feeling about cascading profiles (pvdabeel sais that it needs some
updates, beejay sais it needs testing, solar sais the old one is obsoleted and
should be removed, zhen sais an updated catalyst needs to be pushed).

So this doesn't feel like "yes, switch them all over" just yet (especially since
this is a arch-wide part of our installation instructions).

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

  ViewVC Help
Powered by ViewVC 1.1.20