/[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.5 - (hide annotations) (download) (as text)
Sun Oct 26 15:50:01 2003 UTC (11 years, 2 months ago) by swift
Branch: MAIN
Changes since 1.4: +18 -0 lines
File MIME type: application/xml
Further continuation of the handbook -- progressing quickly :)

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

  ViewVC Help
Powered by ViewVC 1.1.20