/[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.6 - (show annotations) (download) (as text)
Fri Oct 31 15:37:03 2003 UTC (10 years, 11 months ago) by swift
Branch: MAIN
Changes since 1.5: +3 -0 lines
File MIME type: application/xml
Add licensing to all seperate files, make as many links as possible relative instead of absolute

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> in 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 Ofcourse 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_chap2">Differences between
89 Stage1, Stage2 and Stage3</uri>.
90 </p>
91
92 <pre caption="Updating Portage">
93 # <i>emerge sync</i>
94 </pre>
95
96 </body>
97 </subsection>
98 </section>
99 <section>
100 <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 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 </li>
116 <li>
117 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 </li>
121 <li>
122 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 </li>
126 </ul>
127
128 </body>
129 </section>
130 <section>
131 <title>Progressing from Stage1 to Stage2</title>
132 <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 might not want. If you do not want to read those, continue with <uri
156 link="#doc_chap3_sect4">Bootstrapping the System</uri>.
157 </p>
158
159 </body>
160 </subsection>
161 <subsection>
162 <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 </body>
184 </subsection>
185 <subsection>
186 <title>Optional: Downloading the Sources First</title>
187 <body>
188
189 <p>
190 If you haven't copied over all sourcecode before, then the bootstrap
191 script will download all necessary files. It goes without saying that
192 this only works if you have a working network connnection :-) If you want to
193 download the sourcecode first and later bootstrap the system (for instance
194 because you don't want to have your internet connection open during the
195 compilation) use the <e>-f</e> option of the bootstrap script, which will
196 fetch (hence the letter <e>f</e>) all sourcecode for you.
197 </p>
198
199 <pre caption = "Downloading the necessary sources">
200 # <i>cd /usr/portage</i>
201 # <i>scripts/bootstrap.sh -f</i>
202 </pre>
203
204 </body>
205 </subsection>
206 <subsection>
207 <title>Bootstrapping the System</title>
208 <body>
209
210 <p>
211 Okay then, take your keyboard and punch in the next commands to start
212 the bootstrap. Then go amuse yourself with something else (for instance harass
213 Gentoo developers on #gentoo), because this step takes quite some time to
214 finish.
215 </p>
216
217 <pre caption = "Bootstrapping the system">
218 # <i>cd /usr/portage</i>
219 # <i>scripts/bootstrap.sh</i>
220 </pre>
221
222 <p>
223 Now continue with the next step, <uri link="#doc_chap4">Progressing from Stage2
224 to Stage3</uri>.
225 </p>
226
227 </body>
228 </subsection>
229 </section>
230 <section>
231 <title>Progressing from Stage2 to Stage3</title>
232 <subsection>
233 <title>Introduction</title>
234 <body>
235
236 <p>
237 If you are reading this section, then you have a bootstrapped system
238 (either because you bootstrapped it previously, or you are using a
239 <e>stage2</e>). Then it is now time to build all system packages.
240 </p>
241
242 <p>
243 <e>All</e> system packages? No, not really. In this step, you will build
244 the system packages of which there are no alternatives to use. However,
245 some system packages have several alternatives (such as system loggers)
246 and as Gentoo is all about choices, we don't want to force one upon you.
247 </p>
248
249 </body>
250 </subsection>
251 <subsection>
252 <title>Optional: Viewing what will be done</title>
253 <body>
254
255 <p>
256 If you want to know what packages will be installed, execute <c>emerge
257 -p system</c>. This will list all packages that will be built. As this
258 list is pretty big, you should also use a pager like <c>less</c> or
259 <c>more</c> to go up and down the list.
260 </p>
261
262 <pre caption = "View what 'emerge system' will do">
263 # <i>emerge -p system | less</i>
264 </pre>
265
266 </body>
267 </subsection>
268 <subsection>
269 <title>Optional: Downloading the Sources</title>
270 <body>
271
272 <p>
273 If you want <c>emerge</c> to download the sources before you continue
274 (for instance because you don't want the internet connection to be left
275 open while you are building all packages) you can use the <e>-f</e>
276 option of <c>emerge</c> which will fetch all sources for you.
277 </p>
278
279 <pre caption = "Fetching the sources">
280 # <i>emerge -f system</i>
281 </pre>
282
283 </body>
284 </subsection>
285 <subsection>
286 <title>Building the System</title>
287 <body>
288
289 <p>
290 To start building the system, execute <c>emerge system</c>. Then go do
291 something to keep your mind busy, because this step takes a long time to
292 complete.
293 </p>
294
295 <pre caption = "Building the System">
296 # <i>emerge system</i>
297 </pre>
298
299 <p>
300 When the building has completed, continue with <uri
301 link="?part=1&amp;chap=7">Configuring the Kernel</uri>.
302 </p>
303
304 </body>
305 </subsection>
306 </section>
307 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20