/[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.15 - (show annotations) (download) (as text)
Thu Nov 27 16:37:31 2003 UTC (10 years, 10 months ago) by neysx
Branch: MAIN
Changes since 1.14: +3 -7 lines
File MIME type: application/xml
Bug #33977

1 <!-- 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 <!-- $Header: /home/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-system.xml,v 1.14 2003/11/23 16:27:02 swift Exp $ -->
5
6 <sections>
7 <section>
8 <title>Chrooting</title>
9 <subsection>
10 <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 </subsection>
30 <subsection>
31 <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 <title>Entering the new Environment</title>
50 <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 <e>chrooting</e> into it. This means that we change from the current
56 installation environment (LiveCD or other installation medium) to your
57 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 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 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 Of course it is far from finished, which is why the installation still
78 has some sections left :-)
79 </p>
80
81 </body>
82 </subsection>
83 <subsection>
84 <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 from the Internet. <c>emerge sync</c> does this for you. GRP-users should skip
90 this and continue with <uri link="#doc_chap1_sect5">Optional: Using Distributed
91 Compiling</uri> or <uri link="#doc_chap2">Differences between
92 Stage1, Stage2 and Stage3</uri>.
93 </p>
94
95 <pre caption="Updating Portage">
96 # <i>emerge sync</i>
97 </pre>
98
99 <p>
100 If you are warned that a new Portage version is available and that you should
101 update Portage, you can safely ignore it. Portage will be updated for you later
102 on as part of the bootstrap process.
103 </p>
104
105 </body>
106 </subsection>
107 <subsection>
108 <title>Optional: Using Distributed Compiling</title>
109 <body>
110
111 <p>
112 If you are interested in using a collection of systems to help in compiling your
113 system you might want to take a look at our <uri
114 link="/doc/en/distcc.xml">DistCC Guide</uri>. By using <c>distcc</c> you can use
115 the processing power of several systems to aid you with the installation.
116 </p>
117
118 </body>
119 </subsection>
120 </section>
121 <section>
122 <title>Differences between Stage1, Stage2 and Stage3</title>
123 <body>
124
125 <p>
126 Now take a seat and think of your previous steps. We asked you to
127 select a <e>stage1</e>, <e>stage2</e> or <e>stage3</e> and warned you
128 that your choice is important for further installation steps. Well, this
129 is the first place where your choice defines the further steps.
130 </p>
131
132 <ul>
133 <li>
134 If you chose <e>stage1</e>, then you have to follow <e>both</e> steps in
135 this chapter (starting with <uri link="#doc_chap3">Progressing from Stage1
136 to Stage2</uri>)
137 </li>
138 <li>
139 If you chose <e>stage2</e> you only can skip the first step
140 and immediately start with the second one (<uri link="#doc_chap4">Progressing
141 from Stage2 to Stage3</uri>)
142 </li>
143 <li>
144 If you chose <e>stage3</e> (either with or without GRP) then you can skip both
145 steps and continue with the next section: <uri
146 link="?part=1&amp;chap=7">Configuring the Kernel</uri>
147 </li>
148 </ul>
149
150 </body>
151 </section>
152 <section>
153 <title>Progressing from Stage1 to Stage2</title>
154 <subsection>
155 <title>Introduction to Bootstrapping</title>
156 <body>
157
158 <p>
159 So, you want to compile everything from scratch? Okay then :-)
160 </p>
161
162 <p>
163 In this step, we will <e>bootstrap</e> your Gentoo system. This takes a
164 long time, but the result is a system that has been optimized from the
165 ground up for your specific machine and needs.
166 </p>
167
168 <p>
169 <e>Bootstrapping</e> means building the GNU C Library, GNU Compiler
170 Collection and several other key system programs. The GNU Compiler
171 Collection even has to be built twice: first with the "generic" compiler
172 we provide, and a second time with the compiler you then just built.
173 </p>
174
175 <p>
176 Before starting the bootstrap, we list a couple of options you might or
177 might not want. If you do not want to read those, continue with <uri
178 link="#doc_chap3_sect4">Bootstrapping the System</uri>.
179 </p>
180
181 </body>
182 </subsection>
183 <subsection>
184 <title>Optional: Decreasing Compilation Time</title>
185 <body>
186
187 <p>
188 If you want to speed up the bootstrapping, you can temporarily deselect
189 java-support. This means that the GNU Compiler Collection and the GNU C
190 Library will be compiled without java-support (which decreases
191 compilation time considerably). Although this means that you wont have
192 the GNU Java Compiler (<c>gjc</c>) this does <e>not</e> mean that your
193 system won't be able to use java applets and other java-related stuff.
194 </p>
195
196 <p>
197 To deselect java-support temporarily, define <e>USE="-java"</e> before
198 firing up the bootstrap script.
199 </p>
200
201 <pre caption = "Deselecting java support">
202 # <i>export USE="-java"</i>
203 </pre>
204
205 <p>
206 Don't forget to unset the variable after bootstrapping:
207 </p>
208
209 <pre caption="Unsetting USE">
210 # <i>unset USE</i>
211 </pre>
212
213 </body>
214 </subsection>
215 <subsection>
216 <title>Optional: Downloading the Sources First</title>
217 <body>
218
219 <p>
220 If you haven't copied over all sourcecode before, then the bootstrap
221 script will download all necessary files. It goes without saying that
222 this only works if you have a working network connnection :-) If you want to
223 download the sourcecode first and later bootstrap the system (for instance
224 because you don't want to have your internet connection open during the
225 compilation) use the <e>-f</e> option of the bootstrap script, which will
226 fetch (hence the letter <e>f</e>) all sourcecode for you.
227 </p>
228
229 <pre caption = "Downloading the necessary sources">
230 # <i>cd /usr/portage</i>
231 # <i>scripts/bootstrap.sh -f</i>
232 </pre>
233
234 </body>
235 </subsection>
236 <subsection>
237 <title>Bootstrapping the System</title>
238 <body>
239
240 <p>
241 Okay then, take your keyboard and punch in the next commands to start
242 the bootstrap. Then go amuse yourself with something else (for instance harass
243 Gentoo developers on #gentoo), because this step takes quite some time to
244 finish.
245 </p>
246
247 <pre caption = "Bootstrapping the system">
248 # <i>cd /usr/portage</i>
249 # <i>scripts/bootstrap.sh</i>
250 </pre>
251
252 <p>
253 If you have altered the <c>CHOST</c> setting in <path>/etc/make.conf</path>
254 previously, you need to reinitialise some variables in order for <c>gcc</c> to
255 work fast:
256 </p>
257
258 <pre caption="Reinitialise environment variables">
259 # <i>source /etc/profile</i>
260 </pre>
261
262 <p>
263 Now continue with the next step, <uri link="#doc_chap4">Progressing from Stage2
264 to Stage3</uri>.
265 </p>
266
267 </body>
268 </subsection>
269 </section>
270 <section>
271 <title>Progressing from Stage2 to Stage3</title>
272 <subsection>
273 <title>Introduction</title>
274 <body>
275
276 <p>
277 If you are reading this section, then you have a bootstrapped system
278 (either because you bootstrapped it previously, or you are using a
279 <e>stage2</e>). Then it is now time to build all system packages.
280 </p>
281
282 <p>
283 <e>All</e> system packages? No, not really. In this step, you will build
284 the system packages of which there are no alternatives to use. However,
285 some system packages have several alternatives (such as system loggers)
286 and as Gentoo is all about choices, we don't want to force one upon you.
287 </p>
288
289 </body>
290 </subsection>
291 <subsection>
292 <title>Optional: Viewing what will be done</title>
293 <body>
294
295 <p>
296 If you want to know what packages will be installed, execute <c>emerge
297 --pretend system</c>. This will list all packages that will be built. As this
298 list is pretty big, you should also use a pager like <c>less</c> or
299 <c>more</c> to go up and down the list.
300 </p>
301
302 <pre caption = "View what 'emerge system' will do">
303 # <i>emerge --pretend system | less</i>
304 </pre>
305
306 </body>
307 </subsection>
308 <subsection>
309 <title>Optional: Downloading the Sources</title>
310 <body>
311
312 <p>
313 If you want <c>emerge</c> to download the sources before you continue
314 (for instance because you don't want the internet connection to be left
315 open while you are building all packages) you can use the <e>-f</e>
316 option of <c>emerge</c> which will fetch all sources for you.
317 </p>
318
319 <pre caption = "Fetching the sources">
320 # <i>emerge --fetchonly system</i>
321 </pre>
322
323 </body>
324 </subsection>
325 <subsection>
326 <title>Building the System</title>
327 <body>
328
329 <p>
330 To start building the system, execute <c>emerge system</c>. Then go do
331 something to keep your mind busy, because this step takes a long time to
332 complete.
333 </p>
334
335 <pre caption = "Building the System">
336 # <i>emerge system</i>
337 </pre>
338
339 <p>
340 When the building has completed, continue with <uri
341 link="?part=1&amp;chap=7">Configuring the Kernel</uri>.
342 </p>
343
344 </body>
345 </subsection>
346 </section>
347 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20