/[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.3 - (hide annotations) (download) (as text)
Thu Oct 23 11:36:24 2003 UTC (10 years, 10 months ago) by swift
Branch: MAIN
Changes since 1.2: +27 -27 lines
File MIME type: application/xml
Restyle handbook internally

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

  ViewVC Help
Powered by ViewVC 1.1.20