/[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.91 - (hide annotations) (download) (as text)
Tue Feb 28 00:04:15 2006 UTC (8 years, 4 months ago) by josejx
Branch: MAIN
Changes since 1.90: +15 -15 lines
File MIME type: application/xml
Fixed ppc/ppc64 profile paths.

1 swift 1.26 <?xml version='1.0' encoding='UTF-8'?>
2     <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3    
4 swift 1.6 <!-- The content of this document is licensed under the CC-BY-SA license -->
5     <!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6    
7 josejx 1.91 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-system.xml,v 1.90 2006/02/27 00:55:35 fox2mike Exp $ -->
8 swift 1.11
9 swift 1.3 <sections>
10 swift 1.56
11 josejx 1.91 <version>2.18</version>
12 fox2mike 1.90 <date>2006-02-27</date>
13 swift 1.56
14 swift 1.1 <section>
15 swift 1.3 <title>Chrooting</title>
16 swift 1.1 <subsection>
17 swift 1.2 <title>Optional: Selecting Mirrors</title>
18     <body>
19    
20     <p>
21 swift 1.70 In order to download source code quickly it is recommended to select a fast
22     mirror. Portage will look in your <path>make.conf</path> file for the
23     GENTOO_MIRRORS variable and use the mirrors listed therein. You can surf to
24     our <uri link="/main/en/mirrors.xml">mirror list</uri> and search
25     for a mirror (or mirrors) close to you (as those are most frequently the
26     fastest ones), but we provide a nice tool called <c>mirrorselect</c> which
27     provides you with a nice interface to select the mirrors you want.
28     </p>
29    
30     <pre caption="Using mirrorselect for the GENTOO_MIRRORS variable">
31     # <i>mirrorselect -i -o &gt;&gt; /mnt/gentoo/etc/make.conf</i>
32     </pre>
33    
34 swift 1.71 <warn>
35     Do not select any IPv6 mirrors. Our stages currently do not support IPv6.
36     </warn>
37    
38 swift 1.70 <p>
39     A second important setting is the SYNC setting in <path>make.conf</path>. This
40     variable contains the rsync server you want to use when updating your Portage
41     tree (the collection of ebuilds, scripts containing all the information Portage
42     needs to download and install software). Although you can manually enter a SYNC
43     server for yourself, <c>mirrorselect</c> can ease that operation for you:
44 swift 1.2 </p>
45    
46 swift 1.70 <pre caption="Selecting an rsync mirror using mirrorselect">
47     # <i>mirrorselect -i -r -o &gt;&gt; /mnt/gentoo/etc/make.conf</i>
48 swift 1.2 </pre>
49    
50     <p>
51 swift 1.70 After running <c>mirrorselect</c> it is adviseable to double-check the settings
52     in <path>/mnt/gentoo/etc/make.conf</path> !
53 swift 1.2 </p>
54    
55     </body>
56 swift 1.3 </subsection>
57     <subsection>
58 swift 1.5 <title>Copy DNS Info</title>
59     <body>
60    
61     <p>
62 swift 1.24 One thing still remains to be done before we enter the new environment and that
63     is copying over the DNS information in <path>/etc/resolv.conf</path>. You need
64 swift 1.5 to do this to ensure that networking still works even after entering the new
65     environment. <path>/etc/resolv.conf</path> contains the nameservers for your
66     network.
67     </p>
68    
69     <pre caption="Copy over DNS information">
70 swift 1.35 <comment>(The "-L" option is needed to make sure we don't copy a symbolic link)</comment>
71     # <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</i>
72 swift 1.18 </pre>
73    
74     </body>
75     </subsection>
76     <subsection>
77 neysx 1.88 <title>Mounting the /proc and /dev Filesystems</title>
78 swift 1.43 <body>
79    
80     <p>
81     Mount the <path>/proc</path> filesystem on <path>/mnt/gentoo/proc</path> to
82 neysx 1.88 allow the installation to use the kernel-provided information within the
83     chrooted environment, and then mount-bind the <path>/dev</path> filesystem.
84 swift 1.43 </p>
85    
86 neysx 1.88 <pre caption="Mounting /proc and /dev">
87 swift 1.43 # <i>mount -t proc none /mnt/gentoo/proc</i>
88 neysx 1.88 # <i>mount -o bind /dev /mnt/gentoo/dev</i>
89 swift 1.43 </pre>
90    
91     </body>
92     </subsection>
93     <subsection>
94 swift 1.2 <title>Entering the new Environment</title>
95 swift 1.1 <body>
96    
97     <p>
98 swift 1.19 Now that all partitions are initialized and the base environment
99 swift 1.1 installed, it is time to enter our new installation environment by
100 swift 1.9 <e>chrooting</e> into it. This means that we change from the current
101 swift 1.72 installation environment (Installation CD or other installation medium) to your
102 swift 1.19 installation system (namely the initialized partitions).
103 swift 1.1 </p>
104    
105     <p>
106     This chrooting is done in three steps. First we will change the root
107 swift 1.2 from <path>/</path> (on the installation medium) to <path>/mnt/gentoo</path>
108     (on your partitions) using <c>chroot</c>. Then we will create a new environment
109     using <c>env-update</c>, which essentially creates environment variables.
110 swift 1.1 Finally, we load those variables into memory using <c>source</c>.
111     </p>
112    
113     <pre caption = "Chrooting into the new environment">
114     # <i>chroot /mnt/gentoo /bin/bash</i>
115     # <i>env-update</i>
116 fox2mike 1.90 * Caching service dependencies...
117 swift 1.1 # <i>source /etc/profile</i>
118 rane 1.87 # <i>export PS1="(chroot) $PS1"</i>
119 swift 1.1 </pre>
120    
121     <p>
122     Congratulations! You are now inside your own Gentoo Linux environment.
123 swift 1.10 Of course it is far from finished, which is why the installation still
124 swift 1.1 has some sections left :-)
125     </p>
126    
127     </body>
128 swift 1.3 </subsection>
129 swift 1.85 </section>
130    
131     <section>
132     <title>Configuring Portage</title>
133 swift 1.3 <subsection>
134 swift 1.64 <title>Updating the Portage tree</title>
135 swift 1.2 <body>
136    
137     <p>
138 swift 1.69 You should now update your Portage tree to the latest version. <c>emerge
139     --sync</c> does this for you.
140 swift 1.2 </p>
141    
142 dertobi123 1.40 <pre caption="Updating the Portage tree">
143 cam 1.50 # <i>emerge --sync</i>
144 neysx 1.78 <comment>(If you're using a slow terminal like some framebuffers or a serial
145     console, you can add the --quiet option to speed up this process:)</comment>
146     # <i>emerge --sync --quiet</i>
147 swift 1.13 </pre>
148    
149     <p>
150 swift 1.75 If you are behind a firewall that blocks rsync traffic, you can use
151     <c>emerge-webrsync</c> which will download and install a portage snapshot for
152     you.
153     </p>
154    
155     <p>
156 swift 1.13 If you are warned that a new Portage version is available and that you should
157 swift 1.34 update Portage, you should ignore it. Portage will be updated for you later
158 bennyc 1.16 on during the installation.
159 swift 1.13 </p>
160 swift 1.8
161     </body>
162     </subsection>
163 swift 1.72 <subsection>
164     <title>Choosing the Right Profile</title>
165     <body>
166    
167     <p>
168     First, a small definition is in place.
169     </p>
170    
171     <p>
172     A profile is a building block for any Gentoo system. Not only does it specify
173     default values for CHOST, CFLAGS and other important variables, it also locks
174     the system to a certain range of package versions. This is all maintained by the
175     Gentoo developers.
176     </p>
177    
178     <p>
179 neysx 1.79 Previously, such a profile was barely touched by the user. However, x86, hppa
180     and alpha users can choose between two profiles, one for a 2.4 kernel and one
181     for a 2.6 kernel. This requirement has been imposed to improve the integration
182 swift 1.83 of the 2.6 kernels. The ppc and ppc64 architectures have several profiles
183     available as well. We will talk about those later.
184 swift 1.72 </p>
185    
186     <p>
187 neysx 1.79 You can see what profile you are currently using with the following command:
188 swift 1.72 </p>
189    
190     <pre caption="Verifying system profile">
191 neysx 1.79 # <i>ls -FGg /etc/make.profile</i>
192 fox2mike 1.90 lrwxrwxrwx 1 48 Apr 8 18:51 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2006.0/
193 swift 1.72 </pre>
194    
195     <p>
196 neysx 1.80 If you are using one of the aforementioned three architectures, the default
197     profile will provide you with a Linux 2.6-based system. This is the recommended
198     default, but you have the option of choosing another profile too.
199     </p>
200    
201     <p>
202     Some users may wish to install a system based on the older Linux 2.4 profile.
203     If you have good reason to do this, then you should first check that an
204     additional profile exists. On x86, we can do this with the following command:
205 swift 1.72 </p>
206    
207     <pre caption="Finding out if an additional profile exists">
208 swift 1.86 # <i>ls -d /usr/portage/profiles/default-linux/x86/no-nptl/2.4</i>
209     /usr/portage/profiles/default-linux/x86/no-nptl/2.4
210 swift 1.72 </pre>
211    
212     <p>
213 neysx 1.80 The above example shows that the additional 2.4 profile exists (i.e. it didn't
214     complain about missing file or directory). It is recommended that you stay with
215     the default, but if you wish to switch, you can do so with as follows:
216 swift 1.72 </p>
217    
218 neysx 1.79 <pre caption="Switching to a 2.4 profile">
219     <comment>(Make sure you use the right architecture, the example below is for x86)</comment>
220 swift 1.86 # <i>ln -snf /usr/portage/profiles/default-linux/x86/no-nptl/2.4 /etc/make.profile</i>
221 neysx 1.79 <comment>(List the files in the 2.4 profile)</comment>
222     # <i>ls -FGg /etc/make.profile/</i>
223     total 12
224     -rw-r--r-- 1 939 Dec 10 14:06 packages
225     -rw-r--r-- 1 347 Dec 3 2004 parent
226     -rw-r--r-- 1 573 Dec 3 2004 virtuals
227 swift 1.72 </pre>
228    
229 swift 1.83 <p>
230 fox2mike 1.90 For ppc, there are a number of new profiles provided with 2006.0
231 swift 1.83 </p>
232    
233     <pre caption="PPC Profiles">
234 josejx 1.91 <comment>(Generic PPC profile, for all PPC machines, minimal)</comment>
235     # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc32/2006.0 /etc/make.profile</i>
236 swift 1.83 <comment>(G3 profile)</comment>
237 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc32/2006.0/G3 /etc/make.profile</i>
238 swift 1.83 <comment>(G3 Pegasos profile)</comment>
239 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc32/2006.0/G3/Pegasos/ /etc/make.profile</i>
240 swift 1.83 <comment>(G4 (Altivec) profile)</comment>
241 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc32/2006.0/G4 /etc/make.profile</i>
242 fox2mike 1.90 <comment>(G4 (Altivec) Pegasos profile)</comment>
243 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc32/2006.0/G4/Pegasos/ /etc/make.profile</i>
244 swift 1.83 </pre>
245    
246     <p>
247 fox2mike 1.90 For ppc64, there are a number of new profiles provided with 2006.0.
248 swift 1.83 </p>
249    
250     <pre caption="PPC64 Profiles">
251     <comment>(Generic 64bit userland PPC64 profile, for all PPC64 machines)</comment>
252 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc64/2006.0/64bit-userland /etc/make.profile</i>
253 swift 1.83 <comment>(Generic 32bit userland PPC64 profile, for all PPC64 machines)</comment>
254 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc64/2006.0/32bit-userland /etc/make.profile</i>
255 swift 1.83 <comment>(Each type of userland has sub profiles as follows, with (userland) replaced with the chosen userland from above)</comment>
256     <comment>(970 profile for JS20)</comment>
257 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc64/2006.0/(userland)/970 /etc/make.profile</i>
258 swift 1.83 <comment>(G5 profile)</comment>
259 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc64/2006.0/(userland)/970/pmac /etc/make.profile</i>
260 swift 1.83 <comment>(POWER3 profile)</comment>
261 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc64/2006.0/(userland)/power3 /etc/make.profile</i>
262 swift 1.83 <comment>(POWER4 profile)</comment>
263 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc64/2006.0/(userland)/power4 /etc/make.profile</i>
264 swift 1.83 <comment>(POWER5 profile)</comment>
265 josejx 1.91 # <i>ln -snf /usr/portage/profiles/default-linux/ppc/ppc64/2006.0/(userland)/power5 /etc/make.profile</i>
266 swift 1.83 <comment>(The multilib profile is not stable as of this release.)</comment>
267     </pre>
268    
269 swift 1.72 </body>
270     </subsection>
271 swift 1.28 <subsection id="configure_USE">
272 swift 1.21 <title>Configuring the USE variable</title>
273     <body>
274    
275     <p>
276     <c>USE</c> is one of the most powerful variables Gentoo provides to its users.
277     Several programs can be compiled with or without optional support for certain
278     items. For instance, some programs can be compiled with gtk-support, or with
279     qt-support. Others can be compiled with or without SSL support. Some programs
280     can even be compiled with framebuffer support (svgalib) instead of X11 support
281     (X-server).
282     </p>
283    
284     <p>
285     Most distributions compile their packages with support for as much as possible,
286     increasing the size of the programs and startup time, not to mention an enormous
287 swift 1.24 amount of dependencies. With Gentoo you can define what options a package
288 swift 1.21 should be compiled with. This is where <c>USE</c> comes into play.
289     </p>
290    
291     <p>
292     In the <c>USE</c> variable you define keywords which are mapped onto
293     compile-options. For instance, <e>ssl</e> will compile ssl-support in the
294     programs that support it. <e>-X</e> will remove X-server support (note the minus
295     sign in front). <e>gnome gtk -kde -qt</e> will compile your programs with gnome
296     (and gtk) support, and not with kde (and qt) support, making your system fully
297     tweaked for GNOME.
298     </p>
299    
300     <p>
301 swift 1.68 The default <c>USE</c> settings are placed in the <path>make.defaults</path>
302     files of your profile. You will find <path>make.defaults</path> files in the
303     directory which <path>/etc/make.profile</path> points to and all parent
304     directories as well. The default <c>USE</c> setting is the sum of all <c>USE</c>
305     settings in all <path>make.defaults</path> files. What you place in
306 swift 1.21 <path>/etc/make.conf</path> is calculated against these defaults settings. If
307     you add something to the <c>USE</c> setting, it is added to the default list. If
308     you remove something from the <c>USE</c> setting (by placing a minus sign in
309     front of it) it is removed from the default list (if it was in the default list
310     at all). <e>Never</e> alter anything inside the <path>/etc/make.profile</path>
311     directory; it gets overwritten when you update Portage!
312     </p>
313    
314     <p>
315     A full description on <c>USE</c> can be found in the second part of the Gentoo
316 neysx 1.52 Handbook, <uri link="?part=2&amp;chap=2">USE flags</uri>. A full description on
317     the available USE flags can be found on your system in
318 swift 1.23 <path>/usr/portage/profiles/use.desc</path>.
319     </p>
320    
321     <pre caption="Viewing available USE flags">
322     # <i>less /usr/portage/profiles/use.desc</i>
323 swift 1.45 <comment>(You can scroll using your arrow keys, exit by pressing 'q')</comment>
324 swift 1.23 </pre>
325    
326     <p>
327     As an example we show a <c>USE</c> setting for a KDE-based system with DVD, ALSA
328     and CD Recording support:
329 swift 1.21 </p>
330    
331     <pre caption="Opening /etc/make.conf">
332     # <i>nano -w /etc/make.conf</i>
333     </pre>
334    
335     <pre caption="USE setting">
336     USE="-gtk -gnome qt kde dvd alsa cdr"
337     </pre>
338    
339 swift 1.69 </body>
340     </subsection>
341     <subsection>
342     <title>Optional: GLIBC Locales</title>
343     <body>
344    
345 dertobi123 1.53 <p>
346     You will probably only use one or maybe two locales on your system. Up until now
347 swift 1.55 after compiling <c>glibc</c> a full set of all available locales will be
348     created. As of now you can activate the <c>userlocales</c> USE flag and specify
349 swift 1.67 only the locales you will need in <path>/etc/locales.build</path>. Only do this
350 swift 1.85 if you know what locales to choose.
351 dertobi123 1.53 </p>
352    
353     <pre caption="Activate the userlocales USE flag especially for glibc">
354 neysx 1.84 # <i>mkdir -p /etc/portage</i>
355 swift 1.54 # <i>echo "sys-libs/glibc userlocales" >> /etc/portage/package.use</i>
356 dertobi123 1.53 </pre>
357    
358     <p>
359     Now specify the locales you want to be able to use:
360     </p>
361    
362 bennyc 1.60 <pre caption="Opening /etc/locales.build">
363 neysx 1.61 # <i>nano -w /etc/locales.build</i>
364 bennyc 1.60 </pre>
365    
366 swift 1.67 <p>
367     The following locales are an example to get both English (United States) and
368     German (Germany) with the accompanying character formats (like UTF-8).
369     </p>
370    
371 bennyc 1.60 <pre caption="Specify your locales">
372 dertobi123 1.53 en_US/ISO-8859-1
373     en_US.UTF-8/UTF-8
374     de_DE/ISO-8859-1
375     de_DE@euro/ISO-8859-15
376     </pre>
377    
378 swift 1.1 <p>
379 swift 1.85 Now continue with <uri link="?part=1&amp;chap=7">Configuring the Kernel</uri>.
380 swift 1.28 </p>
381    
382     </body>
383     </subsection>
384     </section>
385 swift 1.3 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20