/[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.13 - (hide annotations) (download) (as text)
Sun Nov 23 14:21:50 2003 UTC (10 years, 7 months ago) by swift
Branch: MAIN
Changes since 1.12: +10 -1 lines
File MIME type: application/xml
Fix #33977: Inform users about portage upgrade after running emerge sync

1 swift 1.6 <!-- The content of this document is licensed under the CC-BY-SA license -->
2     <!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
3    
4 swift 1.13 <!-- $Header: /home/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-system.xml,v 1.12 2003/11/16 15:14:57 swift Exp $ -->
5 swift 1.11
6 swift 1.3 <sections>
7 swift 1.1 <section>
8 swift 1.3 <title>Chrooting</title>
9 swift 1.1 <subsection>
10 swift 1.2 <title>Optional: Selecting Mirrors</title>
11     <body>
12    
13     <p>
14     If you are booted from a Gentoo LiveCD, you are able to use <c>mirrorselect</c>
15     to update <path>/etc/make.conf</path> so fast mirrors are used for both Portage
16     as source code:
17     </p>
18    
19     <pre caption="Selecting fast mirrors">
20     # <i>mirrorselect -a -s4 -o &gt;&gt; /mnt/gentoo/etc/make.conf</i>
21     </pre>
22    
23     <p>
24     If for some reason <c>mirrorselect</c> fails, don't panic. This step is
25     completely optional. If <c>mirrorselect</c> fails, the default values suffice.
26     </p>
27    
28     </body>
29 swift 1.3 </subsection>
30     <subsection>
31 swift 1.5 <title>Copy DNS Info</title>
32     <body>
33    
34     <p>
35     One thing still remains to be done before we enter the new environment, and that
36     is copy over the DNS information in <path>/etc/resolv.conf</path>. You need
37     to do this to ensure that networking still works even after entering the new
38     environment. <path>/etc/resolv.conf</path> contains the nameservers for your
39     network.
40     </p>
41    
42     <pre caption="Copy over DNS information">
43     # <i>cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</i>
44     </pre>
45    
46     </body>
47     </subsection>
48     <subsection>
49 swift 1.2 <title>Entering the new Environment</title>
50 swift 1.1 <body>
51    
52     <p>
53     Now that all partitions are initialised and the base environment
54     installed, it is time to enter our new installation environment by
55 swift 1.9 <e>chrooting</e> into it. This means that we change from the current
56 swift 1.2 installation environment (LiveCD or other installation medium) to your
57 swift 1.1 installation system (namely the initialised partitions).
58     </p>
59    
60     <p>
61     This chrooting is done in three steps. First we will change the root
62 swift 1.2 from <path>/</path> (on the installation medium) to <path>/mnt/gentoo</path>
63     (on your partitions) using <c>chroot</c>. Then we will create a new environment
64     using <c>env-update</c>, which essentially creates environment variables.
65 swift 1.1 Finally, we load those variables into memory using <c>source</c>.
66     </p>
67    
68     <pre caption = "Chrooting into the new environment">
69     # <i>chroot /mnt/gentoo /bin/bash</i>
70     # <i>env-update</i>
71     Regenerating /etc/ld.so.cache...
72     # <i>source /etc/profile</i>
73     </pre>
74    
75     <p>
76     Congratulations! You are now inside your own Gentoo Linux environment.
77 swift 1.10 Of course it is far from finished, which is why the installation still
78 swift 1.1 has some sections left :-)
79     </p>
80    
81     </body>
82 swift 1.3 </subsection>
83     <subsection>
84 swift 1.2 <title>Optional: Updating Portage</title>
85     <body>
86    
87     <p>
88     If you are <e>not</e> using GRP, you must download a recent Portage snapshot
89 swift 1.4 from the Internet. <c>emerge sync</c> does this for you. GRP-users should skip
90 swift 1.8 this and continue with <uri link="#doc_chap1_sect5">Optional: Using Distributed
91     Compiling</uri> or <uri link="#doc_chap2">Differences between
92 swift 1.4 Stage1, Stage2 and Stage3</uri>.
93 swift 1.2 </p>
94    
95     <pre caption="Updating Portage">
96     # <i>emerge sync</i>
97 swift 1.13 </pre>
98    
99     <p>
100     If you are warned that a new Portage version is available and that you should
101     update Portage, run <c>emerge -u portage</c> to get your Portage up to date:
102     </p>
103    
104     <pre caption="Updating Portage">
105     # <i>emerge -u portage</i>
106 swift 1.2 </pre>
107 swift 1.8
108     </body>
109     </subsection>
110     <subsection>
111     <title>Optional: Using Distributed Compiling</title>
112     <body>
113    
114     <p>
115     If you are interested in using a collection of systems to help in compiling your
116     system you might want to take a look at our <uri
117     link="/doc/en/distcc.xml">DistCC Guide</uri>. By using <c>distcc</c> you can use
118     the processing power of several systems to aid you with the installation.
119     </p>
120 swift 1.2
121     </body>
122 swift 1.1 </subsection>
123 swift 1.3 </section>
124     <section>
125 swift 1.1 <title>Differences between Stage1, Stage2 and Stage3</title>
126     <body>
127    
128     <p>
129     Now take a seat and think of your previous steps. We asked you to
130     select a <e>stage1</e>, <e>stage2</e> or <e>stage3</e> and warned you
131     that your choice is important for further installation steps. Well, this
132     is the first place where your choice defines the further steps.
133     </p>
134    
135     <ul>
136     <li>
137 swift 1.4 If you chose <e>stage1</e>, then you have to follow <e>both</e> steps in
138     this chapter (starting with <uri link="#doc_chap3">Progressing from Stage1
139     to Stage2</uri>)
140 swift 1.1 </li>
141     <li>
142 swift 1.4 If you chose <e>stage2</e> you only can skip the first step
143     and immediately start with the second one (<uri link="#doc_chap4">Progressing
144     from Stage2 to Stage3</uri>)
145 swift 1.1 </li>
146     <li>
147 swift 1.4 If you chose <e>stage3</e> (either with or without GRP) then you can skip both
148     steps and continue with the next section: <uri
149     link="?part=1&amp;chap=7">Configuring the Kernel</uri>
150 swift 1.1 </li>
151     </ul>
152    
153     </body>
154 swift 1.3 </section>
155     <section>
156     <title>Progressing from Stage1 to Stage2</title>
157 swift 1.1 <subsection>
158     <title>Introduction to Bootstrapping</title>
159     <body>
160    
161     <p>
162     So, you want to compile everything from scratch? Okay then :-)
163     </p>
164    
165     <p>
166     In this step, we will <e>bootstrap</e> your Gentoo system. This takes a
167     long time, but the result is a system that has been optimized from the
168     ground up for your specific machine and needs.
169     </p>
170    
171     <p>
172     <e>Bootstrapping</e> means building the GNU C Library, GNU Compiler
173     Collection and several other key system programs. The GNU Compiler
174     Collection even has to be built twice: first with the "generic" compiler
175     we provide, and a second time with the compiler you then just built.
176     </p>
177    
178     <p>
179     Before starting the bootstrap, we list a couple of options you might or
180 swift 1.4 might not want. If you do not want to read those, continue with <uri
181     link="#doc_chap3_sect4">Bootstrapping the System</uri>.
182 swift 1.1 </p>
183    
184     </body>
185 swift 1.3 </subsection>
186     <subsection>
187 swift 1.1 <title>Optional: Decreasing Compilation Time</title>
188     <body>
189    
190     <p>
191     If you want to speed up the bootstrapping, you can temporarily deselect
192     java-support. This means that the GNU Compiler Collection and the GNU C
193     Library will be compiled without java-support (which decreases
194     compilation time considerably). Although this means that you wont have
195     the GNU Java Compiler (<c>gjc</c>) this does <e>not</e> mean that your
196     system won't be able to use java applets and other java-related stuff.
197     </p>
198    
199     <p>
200     To deselect java-support temporarily, define <e>USE="-java"</e> before
201     firing up the bootstrap script.
202     </p>
203    
204     <pre caption = "Deselecting java support">
205     # <i>export USE="-java"</i>
206     </pre>
207    
208 swift 1.7 <p>
209     Don't forget to unset the variable after bootstrapping:
210     </p>
211    
212     <pre caption="Unsetting USE">
213     # <i>unset USE</i>
214     </pre>
215    
216 swift 1.1 </body>
217 swift 1.3 </subsection>
218     <subsection>
219 swift 1.1 <title>Optional: Downloading the Sources First</title>
220     <body>
221    
222     <p>
223     If you haven't copied over all sourcecode before, then the bootstrap
224     script will download all necessary files. It goes without saying that
225     this only works if you have a working network connnection :-) If you want to
226     download the sourcecode first and later bootstrap the system (for instance
227     because you don't want to have your internet connection open during the
228     compilation) use the <e>-f</e> option of the bootstrap script, which will
229     fetch (hence the letter <e>f</e>) all sourcecode for you.
230     </p>
231    
232     <pre caption = "Downloading the necessary sources">
233     # <i>cd /usr/portage</i>
234     # <i>scripts/bootstrap.sh -f</i>
235     </pre>
236    
237     </body>
238 swift 1.3 </subsection>
239     <subsection>
240 swift 1.1 <title>Bootstrapping the System</title>
241     <body>
242    
243     <p>
244     Okay then, take your keyboard and punch in the next commands to start
245 swift 1.4 the bootstrap. Then go amuse yourself with something else (for instance harass
246     Gentoo developers on #gentoo), because this step takes quite some time to
247     finish.
248 swift 1.1 </p>
249    
250     <pre caption = "Bootstrapping the system">
251     # <i>cd /usr/portage</i>
252     # <i>scripts/bootstrap.sh</i>
253 swift 1.12 </pre>
254    
255     <p>
256     If you have altered the <c>CHOST</c> setting in <path>/etc/make.conf</path>
257     previously, you need to reinitialise some variables in order for <c>gcc</c> to
258     work fast:
259     </p>
260    
261     <pre caption="Reinitialise environment variables">
262     # <i>source /etc/profile</i>
263 swift 1.1 </pre>
264    
265 swift 1.4 <p>
266     Now continue with the next step, <uri link="#doc_chap4">Progressing from Stage2
267     to Stage3</uri>.
268     </p>
269    
270 swift 1.1 </body>
271     </subsection>
272 swift 1.3 </section>
273     <section>
274     <title>Progressing from Stage2 to Stage3</title>
275 swift 1.1 <subsection>
276     <title>Introduction</title>
277     <body>
278    
279     <p>
280     If you are reading this section, then you have a bootstrapped system
281     (either because you bootstrapped it previously, or you are using a
282     <e>stage2</e>). Then it is now time to build all system packages.
283     </p>
284    
285     <p>
286     <e>All</e> system packages? No, not really. In this step, you will build
287     the system packages of which there are no alternatives to use. However,
288     some system packages have several alternatives (such as system loggers)
289     and as Gentoo is all about choices, we don't want to force one upon you.
290     </p>
291    
292     </body>
293 swift 1.3 </subsection>
294     <subsection>
295 swift 1.1 <title>Optional: Viewing what will be done</title>
296     <body>
297    
298     <p>
299     If you want to know what packages will be installed, execute <c>emerge
300     -p system</c>. This will list all packages that will be built. As this
301     list is pretty big, you should also use a pager like <c>less</c> or
302     <c>more</c> to go up and down the list.
303     </p>
304    
305     <pre caption = "View what 'emerge system' will do">
306     # <i>emerge -p system | less</i>
307     </pre>
308    
309     </body>
310 swift 1.3 </subsection>
311     <subsection>
312 swift 1.4 <title>Optional: Downloading the Sources</title>
313 swift 1.1 <body>
314    
315     <p>
316     If you want <c>emerge</c> to download the sources before you continue
317     (for instance because you don't want the internet connection to be left
318     open while you are building all packages) you can use the <e>-f</e>
319     option of <c>emerge</c> which will fetch all sources for you.
320     </p>
321    
322     <pre caption = "Fetching the sources">
323     # <i>emerge -f system</i>
324     </pre>
325    
326     </body>
327 swift 1.3 </subsection>
328     <subsection>
329 swift 1.1 <title>Building the System</title>
330     <body>
331    
332     <p>
333     To start building the system, execute <c>emerge system</c>. Then go do
334 swift 1.4 something to keep your mind busy, because this step takes a long time to
335     complete.
336 swift 1.1 </p>
337    
338     <pre caption = "Building the System">
339     # <i>emerge system</i>
340     </pre>
341    
342     <p>
343 swift 1.4 When the building has completed, continue with <uri
344     link="?part=1&amp;chap=7">Configuring the Kernel</uri>.
345 swift 1.1 </p>
346    
347     </body>
348     </subsection>
349     </section>
350 swift 1.3 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20