/[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.10 - (show annotations) (download) (as text)
Fri Nov 14 08:59:48 2003 UTC (10 years, 8 months ago) by swift
Branch: MAIN
Changes since 1.9: +1 -1 lines
File MIME type: application/xml
Fix ofcourse typo :)

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

  ViewVC Help
Powered by ViewVC 1.1.20