/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-mips-system.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-install-mips-system.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (hide annotations) (download) (as text)
Fri Jun 29 16:12:20 2012 UTC (2 years ago) by swift
Branch: MAIN
Changes since 1.10: +7 -5 lines
File MIME type: application/xml
Fix bug #420159 - Add bind-mounting of /sys

1 nightmorph 1.1 <?xml version='1.0' encoding='UTF-8'?>
2     <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3    
4     <!-- The content of this document is licensed under the CC-BY-SA license -->
5     <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6    
7 swift 1.11 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-mips-system.xml,v 1.10 2011/08/22 16:58:02 swift Exp $ -->
8 nightmorph 1.1
9     <sections>
10    
11 swift 1.11 <version>11</version>
12     <date>2012-06-29</date>
13 nightmorph 1.1
14     <section>
15     <title>Chrooting</title>
16     <subsection>
17     <title>Copy DNS Info</title>
18     <body>
19    
20     <p>
21     One thing still remains to be done before we enter the new environment and that
22     is copying over the DNS information in <path>/etc/resolv.conf</path>. You need
23     to do this to ensure that networking still works even after entering the new
24     environment. <path>/etc/resolv.conf</path> contains the nameservers for your
25     network.
26     </p>
27    
28     <pre caption="Copy over DNS information">
29     <comment>(The "-L" option is needed to make sure we don't copy a symbolic link)</comment>
30 nightmorph 1.5 # <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/</i>
31 nightmorph 1.1 </pre>
32    
33     </body>
34     </subsection>
35     <subsection>
36 swift 1.11 <title>Mounting the necessary Filesystems</title>
37 nightmorph 1.1 <body>
38    
39     <p>
40     Mount the <path>/proc</path> filesystem on <path>/mnt/gentoo/proc</path> to
41     allow the installation to use the kernel-provided information within the
42 swift 1.11 chrooted environment, and then mount-bind the <path>/dev</path> and
43     <path>/sys</path> filesystems.
44 nightmorph 1.1 </p>
45    
46     <pre caption="Mounting /proc and /dev">
47     # <i>mount -t proc none /mnt/gentoo/proc</i>
48 swift 1.11 # <i>mount --rbind /sys /mnt/gentoo/sys</i>
49 nightmorph 1.9 # <i>mount --rbind /dev /mnt/gentoo/dev</i>
50 nightmorph 1.1 </pre>
51    
52     </body>
53     </subsection>
54     <subsection>
55     <title>Entering the new Environment</title>
56     <body>
57    
58     <p>
59     Now that all partitions are initialized and the base environment
60     installed, it is time to enter our new installation environment by
61     <e>chrooting</e> into it. This means that we change from the current
62     installation environment (Installation CD or other installation medium) to your
63     installation system (namely the initialized partitions).
64     </p>
65    
66     <p>
67     This chrooting is done in three steps. First we will change the root
68     from <path>/</path> (on the installation medium) to <path>/mnt/gentoo</path>
69     (on your partitions) using <c>chroot</c>. Then we will create a new environment
70     using <c>env-update</c>, which essentially creates environment variables.
71     Finally, we load those variables into memory using <c>source</c>.
72     </p>
73    
74     <pre caption = "Chrooting into the new environment">
75     # <i>chroot /mnt/gentoo /bin/bash</i>
76     # <i>env-update</i>
77     >> Regenerating /etc/ld.so.cache...
78     # <i>source /etc/profile</i>
79     # <i>export PS1="(chroot) $PS1"</i>
80     </pre>
81    
82     <p>
83     Congratulations! You are now inside your own Gentoo Linux environment.
84     Of course it is far from finished, which is why the installation still
85     has some sections left :-)
86     </p>
87    
88     </body>
89     </subsection>
90     </section>
91    
92     <section>
93     <title>Configuring Portage</title>
94     <subsection>
95     <title>Updating the Portage tree</title>
96     <body>
97    
98     <p>
99     You should now update your Portage tree to the latest version. <c>emerge
100     --sync</c> does this for you.
101     </p>
102    
103     <pre caption="Updating the Portage tree">
104     # <i>emerge --sync</i>
105     <comment>(If you're using a slow terminal like some framebuffers or a serial
106     console, you can add the --quiet option to speed up this process:)</comment>
107     # <i>emerge --sync --quiet</i>
108     </pre>
109    
110     <p>
111     If you are behind a firewall that blocks rsync traffic, you can use
112     <c>emerge-webrsync</c> which will download and install a portage snapshot for
113     you.
114     </p>
115    
116     <p>
117     If you are warned that a new Portage version is available and that you should
118 nightmorph 1.7 update Portage, you should do it now using <c>emerge --oneshot portage</c>.
119 nightmorph 1.1 </p>
120    
121     </body>
122     </subsection>
123     <subsection>
124     <title>Choosing the Right Profile</title>
125     <body>
126    
127     <p>
128     First, a small definition is in place.
129     </p>
130    
131     <p>
132     A profile is a building block for any Gentoo system. Not only does it specify
133     default values for CHOST, CFLAGS and other important variables, it also locks
134     the system to a certain range of package versions. This is all maintained by the
135     Gentoo developers.
136     </p>
137    
138     <p>
139 nightmorph 1.3 Previously, such a profile was barely touched by the user. However, there may be
140     situations in which you may decide a profile change is necessary.
141     </p>
142    
143     <p>
144 nightmorph 1.1 Since 2006.0, there has been a re-shuffle regarding the profiles for MIPS
145     systems. These profiles set various options including USE flags, which affect
146     what patchsets are enabled with various system-critical packages (notably,
147     <c>gcc</c> and <c>mips-sources</c>).
148     </p>
149    
150     <p>
151     Thus, care needs to be taken to ensure the correct profile is selected for your
152 nightmorph 1.4 system type. As of Gentoo/MIPS 2007.0, the profiles are:
153 nightmorph 1.1 </p>
154    
155     <table>
156     <tr>
157     <th>System</th>
158     <th>Profile</th>
159     <th>Userland</th>
160     <th>Status/Notes</th>
161     </tr>
162     <tr>
163     <ti>Cobalt Qube/RaQ</ti>
164 nightmorph 1.4 <ti>default-linux/mips/2007.0/cobalt/o32</ti>
165 nightmorph 1.1 <ti>32-bit Linuxthreads</ti>
166     <ti>Recommended</ti>
167     </tr>
168     <tr>
169     <ti>"</ti>
170 nightmorph 1.4 <ti>default-linux/mips/2007.0/cobalt/o32/nptl</ti>
171 nightmorph 1.1 <ti>32-bit NPTL</ti>
172     <ti>In Testing (1)</ti>
173     </tr>
174     <tr>
175     <th>&nbsp;</th>
176     <th>&nbsp;</th>
177     <th>&nbsp;</th>
178     <th>&nbsp;</th>
179     </tr>
180     <tr>
181     <ti>
182     Generic Big Endian<br />
183     <e>Including SGI Indy, Indigo2 (R4x00), Challenge S and O2</e>
184     </ti>
185 nightmorph 1.4 <ti>default-linux/mips/2007.0/generic-be/o32</ti>
186 nightmorph 1.1 <ti>32-bit Linuxthreads</ti>
187     <ti>Recommended</ti>
188     </tr>
189     <tr>
190     <ti>"</ti>
191 nightmorph 1.4 <ti>default-linux/mips/2007.0/generic-be/o32/nptl</ti>
192 nightmorph 1.1 <ti>32-bit NPTL</ti>
193     <ti>In Testing (1)</ti>
194     </tr>
195     <tr>
196     <ti>"</ti>
197 nightmorph 1.4 <ti>default-linux/mips/2007.0/generic-be/n32</ti>
198 nightmorph 1.1 <ti>N32 Linuxthreads</ti>
199     <ti>Highly Experimental (2)</ti>
200     </tr>
201     <tr>
202     <ti>"</ti>
203 nightmorph 1.4 <ti>default-linux/mips/2007.0/generic-be/n32/nptl</ti>
204 nightmorph 1.1 <ti>N32 NPTL</ti>
205     <ti>Highly Experimental (1) (2)</ti>
206     </tr>
207     <tr>
208     <ti>"</ti>
209 nightmorph 1.4 <ti>default-linux/mips/2007.0/generic-be/n64</ti>
210 nightmorph 1.1 <ti>N64 Linuxthreads</ti>
211     <ti>Unsupported (3)</ti>
212     </tr>
213     <tr>
214     <ti>"</ti>
215 nightmorph 1.4 <ti>default-linux/mips/2007.0/generic-be/n64/nptl</ti>
216 nightmorph 1.1 <ti>N64 NPTL</ti>
217     <ti>Unsupported (1) (3)</ti>
218     </tr>
219     <tr>
220     <th>&nbsp;</th>
221     <th>&nbsp;</th>
222     <th>&nbsp;</th>
223     <th>&nbsp;</th>
224     </tr>
225     <tr>
226     <ti>SGI Origin 200/2000</ti>
227 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip27/o32</ti>
228 nightmorph 1.1 <ti>32-bit Linuxthreads</ti>
229     <ti>Recommended</ti>
230     </tr>
231     <tr>
232     <ti>"</ti>
233 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip27/o32/nptl</ti>
234 nightmorph 1.1 <ti>32-bit NPTL</ti>
235     <ti>In Testing (1)</ti>
236     </tr>
237     <tr>
238     <ti>"</ti>
239 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip27/n32</ti>
240 nightmorph 1.1 <ti>N32 Linuxthreads</ti>
241     <ti>Highly Experimental (2)</ti>
242     </tr>
243     <tr>
244     <ti>"</ti>
245 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip27/n32/nptl</ti>
246 nightmorph 1.1 <ti>N32 NPTL</ti>
247     <ti>Highly Experimental (1) (2)</ti>
248     </tr>
249    
250     <tr>
251     <th>&nbsp;</th>
252     <th>&nbsp;</th>
253     <th>&nbsp;</th>
254     <th>&nbsp;</th>
255     </tr>
256     <tr>
257     <ti>SGI Indigo2 Impact R10000</ti>
258 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip28/o32</ti>
259 nightmorph 1.1 <ti>32-bit Linuxthreads</ti>
260     <ti>Recommended</ti>
261     </tr>
262     <tr>
263     <ti>"</ti>
264 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip28/o32/nptl</ti>
265 nightmorph 1.1 <ti>32-bit NPTL</ti>
266     <ti>In Testing (1)</ti>
267     </tr>
268     <tr>
269     <ti>"</ti>
270 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip28/n32</ti>
271 nightmorph 1.1 <ti>N32 Linuxthreads</ti>
272     <ti>Highly Experimental (2)</ti>
273     </tr>
274     <tr>
275     <ti>"</ti>
276 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip28/n32/nptl</ti>
277 nightmorph 1.1 <ti>N32 NPTL</ti>
278     <ti>Highly Experimental (1) (2)</ti>
279     </tr>
280     <tr>
281     <th>&nbsp;</th>
282     <th>&nbsp;</th>
283     <th>&nbsp;</th>
284     <th>&nbsp;</th>
285     </tr>
286     <tr>
287     <ti>SGI Octane/Octane2</ti>
288 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip30/o32</ti>
289 nightmorph 1.1 <ti>32-bit Linuxthreads</ti>
290     <ti>Recommended</ti>
291     </tr>
292     <tr>
293     <ti>"</ti>
294 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip30/o32/nptl</ti>
295 nightmorph 1.1 <ti>32-bit NPTL</ti>
296     <ti>In Testing (1)</ti>
297     </tr>
298     <tr>
299     <ti>"</ti>
300 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip30/n32</ti>
301 nightmorph 1.1 <ti>N32 Linuxthreads</ti>
302     <ti>Highly Experimental (2)</ti>
303     </tr>
304     <tr>
305     <ti>"</ti>
306 nightmorph 1.4 <ti>default-linux/mips/2007.0/ip30/n32/nptl</ti>
307 nightmorph 1.1 <ti>N32 NPTL</ti>
308     <ti>Highly Experimental (1) (2)</ti>
309     </tr>
310     </table>
311    
312     <impo>
313 nightmorph 1.4 (1) NPTL is in-testing on MIPS at this stage, requiring <c>gcc-4.1</c> and
314     <c>glibc-2.4</c>. It is believed that NPTL should be safe enough now for people
315     to use, and is planned to be the default in future releases. Brave users are
316     welcomed to try these profiles out and report back.
317 nightmorph 1.1 </impo>
318    
319     <warn>
320     (2) n32 Userland is highly experimental, a lot of software has problems with
321     this ABI, and thus it is practically guaranteed that you will run into stability
322     problems at some point. Work is being done to improve the situation, however,
323     no support is offered if you use this profile, unless you're willing to help
324     fix problems by submitting patches.
325     </warn>
326    
327     <warn>
328     (3) n64 Userland at present is completely unsupported on all systems. At this
329     time there are no stages available that support n64, and this isn't likely to
330     change in the near future.
331     </warn>
332    
333     <p>
334     You can see what profile you are currently using with the following command:
335     </p>
336    
337     <pre caption="Verifying system profile">
338     # <i>ls -FGg /etc/make.profile</i>
339 neysx 1.6 lrwxrwxrwx 1 48 Apr 8 18:51 /etc/make.profile -> ../usr/portage/profiles/<keyval id="profile"/>
340 nightmorph 1.1 </pre>
341    
342     <p>
343     Having looked through the profiles above, and decided which one is the most
344     appropriate, you need to adjust your <path>make.profile</path> symlink to
345     reflect this. By default, the profiles are in
346     <path>/usr/portage/profiles</path>, so if you've moved your portage tree
347     elsewhere (not recommended), adjust the commands below accordingly.
348     </p>
349    
350     <pre caption="Setting the profile">
351     <comment>(Delete the old profile symlink)</comment>
352     # <i>rm -f /etc/make.profile</i>
353    
354     <comment>(Create a new symlink pointing to your chosen profile )
355     (For example, this is what one would use on an Indy or O2.)</comment>
356 nightmorph 1.4 # <i>ln -s /usr/portage/profiles/default-linux/mips/2007.0/generic-be/o32</i>
357 nightmorph 1.1 </pre>
358    
359     <note>
360     A tip for those not familiar with the Bourne Again Shell... If you partially
361     type a filename or command, then hit the TAB key, it will automatically fill out
362     the command/filename until the last common character. E.g. typing
363     <c>/usr/portage/profiles/def&lt;TAB&gt;</c>, <c>bash</c> will automatically put
364     down <c>default-</c>. Pressing TAB a couple of more times will reveal the
365     possibilities, <c>default-linux</c>, <c>default-darwin</c> and
366     <c>default-bsd</c>. Give it a try, you'll find it very handy for navigating the
367     command line.
368     </note>
369    
370     </body>
371     </subsection>
372     <subsection id="configure_USE">
373     <title>Configuring the USE variable</title>
374     <body>
375    
376     <p>
377     <c>USE</c> is one of the most powerful variables Gentoo provides to its users.
378     Several programs can be compiled with or without optional support for certain
379     items. For instance, some programs can be compiled with gtk-support, or with
380     qt-support. Others can be compiled with or without SSL support. Some programs
381     can even be compiled with framebuffer support (svgalib) instead of X11 support
382     (X-server).
383     </p>
384    
385     <p>
386     Most distributions compile their packages with support for as much as possible,
387     increasing the size of the programs and startup time, not to mention an enormous
388     amount of dependencies. With Gentoo you can define what options a package
389     should be compiled with. This is where <c>USE</c> comes into play.
390     </p>
391    
392     <p>
393     In the <c>USE</c> variable you define keywords which are mapped onto
394     compile-options. For instance, <e>ssl</e> will compile ssl-support in the
395 nightmorph 1.2 programs that support it. <e>-X</e> will remove X-server support (note the
396 nightmorph 1.8 minus sign in front). <e>gnome gtk -kde -qt4</e> will compile your
397 nightmorph 1.2 programs with gnome (and gtk) support, and not with kde (and qt) support,
398     making your system fully tweaked for GNOME.
399 nightmorph 1.1 </p>
400    
401     <p>
402     The default <c>USE</c> settings are placed in the <path>make.defaults</path>
403     files of your profile. You will find <path>make.defaults</path> files in the
404     directory which <path>/etc/make.profile</path> points to and all parent
405     directories as well. The default <c>USE</c> setting is the sum of all <c>USE</c>
406     settings in all <path>make.defaults</path> files. What you place in
407     <path>/etc/make.conf</path> is calculated against these defaults settings. If
408     you add something to the <c>USE</c> setting, it is added to the default list. If
409     you remove something from the <c>USE</c> setting (by placing a minus sign in
410     front of it) it is removed from the default list (if it was in the default list
411     at all). <e>Never</e> alter anything inside the <path>/etc/make.profile</path>
412     directory; it gets overwritten when you update Portage!
413     </p>
414    
415     <p>
416     A full description on <c>USE</c> can be found in the second part of the Gentoo
417     Handbook, <uri link="?part=2&amp;chap=2">USE flags</uri>. A full description on
418     the available USE flags can be found on your system in
419     <path>/usr/portage/profiles/use.desc</path>.
420     </p>
421    
422     <pre caption="Viewing available USE flags">
423     # <i>less /usr/portage/profiles/use.desc</i>
424     <comment>(You can scroll using your arrow keys, exit by pressing 'q')</comment>
425     </pre>
426    
427     <p>
428     As an example we show a <c>USE</c> setting for a KDE-based system with DVD, ALSA
429     and CD Recording support:
430     </p>
431    
432     <pre caption="Opening /etc/make.conf">
433     # <i>nano -w /etc/make.conf</i>
434     </pre>
435    
436     <pre caption="USE setting">
437 nightmorph 1.8 USE="-gtk -gnome qt4 kde dvd alsa cdr"
438 nightmorph 1.1 </pre>
439    
440     </body>
441     </subsection>
442     <subsection>
443     <title>Optional: GLIBC Locales</title>
444     <body>
445    
446     <p>
447     You will probably only use one or maybe two locales on your system. You can
448     specify locales you will need in <path>/etc/locale.gen</path>.
449     </p>
450    
451     <pre caption="Opening /etc/locale.gen">
452     # <i>nano -w /etc/locale.gen</i>
453     </pre>
454    
455     <p>
456     The following locales are an example to get both English (United States) and
457     German (Germany) with the accompanying character formats (like UTF-8).
458     </p>
459    
460     <pre caption="Specify your locales">
461     en_US ISO-8859-1
462     en_US.UTF-8 UTF-8
463     de_DE ISO-8859-1
464     de_DE@euro ISO-8859-15
465     </pre>
466    
467     <p>
468     The next step is to run <c>locale-gen</c>. It will generate all the locales you
469     have specified in the <path>/etc/locale.gen</path> file.
470     </p>
471    
472 swift 1.10 <pre caption="Running locale-gen">
473     # <i>locale-gen</i>
474     </pre>
475    
476 nightmorph 1.1 <p>
477     Now continue with <uri link="?part=1&amp;chap=7">Configuring the Kernel</uri>.
478     </p>
479    
480     </body>
481     </subsection>
482     </section>
483     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20