/[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.7 - (hide annotations) (download) (as text)
Mon Nov 3 16:31:57 2003 UTC (11 years ago) by swift
Branch: MAIN
Changes since 1.6: +8 -0 lines
File MIME type: application/xml
Have USE unset after bootstrap if you have set it

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

  ViewVC Help
Powered by ViewVC 1.1.20