1 |
nightmorph 06/02/12 13:54:32 |
2 |
|
3 |
Added: xml/htdocs/doc/en/handbook/draft/2006.0 handbook-mips.xml |
4 |
hb-install-mips-bootloader.xml |
5 |
hb-install-mips-disk.xml hb-install-mips-kernel.xml |
6 |
hb-install-mips-medium.xml |
7 |
hb-install-mips-stage.xml |
8 |
Log: |
9 |
Initial import of *unmodified* docs into handbook/draft/2006.0 for bug |
10 |
111652. Patching will begin shortly. One completely new doc, |
11 |
hb-install-mips-stage.xml, is now present. |
12 |
|
13 |
Revision Changes Path |
14 |
1.1 xml/htdocs/doc/en/handbook/draft/2006.0/handbook-mips.xml |
15 |
|
16 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/handbook-mips.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
17 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/handbook-mips.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo |
18 |
|
19 |
Index: handbook-mips.xml |
20 |
=================================================================== |
21 |
<?xml version='1.0' encoding='UTF-8'?> |
22 |
<!DOCTYPE book SYSTEM "/dtd/book.dtd"> |
23 |
|
24 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/2006.0/handbook-mips.xml,v 1.1 2006/02/12 13:54:32 nightmorph Exp $ --> |
25 |
|
26 |
<book link="handbook-mips.xml"> |
27 |
<title>Gentoo Linux/MIPS Handbook</title> |
28 |
|
29 |
<author title="Author"> |
30 |
<mail link="swift@g.o">Sven Vermeulen</mail> |
31 |
</author> |
32 |
<author title="Author"> |
33 |
<mail link="uberlord@g.o">Roy Marples</mail> |
34 |
</author> |
35 |
<author title="Author"> |
36 |
<mail link="drobbins@g.o">Daniel Robbins</mail> |
37 |
</author> |
38 |
<author title="Author"> |
39 |
<mail link="chouser@g.o">Chris Houser</mail> |
40 |
</author> |
41 |
<author title="Author"> |
42 |
<mail link="jerry@g.o">Jerry Alexandratos</mail> |
43 |
</author> |
44 |
<author title="Gentoo x86 Developer"> |
45 |
<mail link="seemant@g.o">Seemant Kulleen</mail> |
46 |
</author> |
47 |
<author title="Gentoo Alpha Developer"> |
48 |
<mail link="taviso@g.o">Tavis Ormandy</mail> |
49 |
</author><!-- Does not want to be listed on the rendered page |
50 |
<author title="Gentoo Developer"> |
51 |
Aron Griffis |
52 |
</author> |
53 |
--> |
54 |
<author title="Gentoo AMD64 Developer"> |
55 |
<mail link="jhuebel@g.o">Jason Huebel</mail> |
56 |
</author> |
57 |
<author title="Gentoo HPPA developer"> |
58 |
<mail link="gmsoft@g.o">Guy Martin</mail> |
59 |
</author> |
60 |
<author title="Gentoo PPC developer"> |
61 |
<mail link="pvdabeel@g.o">Pieter Van den Abeele</mail> |
62 |
</author> |
63 |
<author title="Gentoo SPARC developer"> |
64 |
<mail link="blademan@g.o">Joe Kallar</mail> |
65 |
</author> |
66 |
<author title="Editor"> |
67 |
<mail link="zhen@g.o">John P. Davis</mail> |
68 |
</author> |
69 |
<author title="Editor">Pierre-Henri Jondot</author> |
70 |
<author title="Editor"> |
71 |
<mail link="stocke2@g.o">Eric Stockbridge</mail> |
72 |
</author> |
73 |
<author title="Editor"> |
74 |
<mail link="rajiv@g.o">Rajiv Manglani</mail> |
75 |
</author> |
76 |
<author title="Editor"> |
77 |
<mail link="seo@g.o">Jungmin Seo</mail> |
78 |
</author> |
79 |
<author title="Editor"> |
80 |
<mail link="zhware@g.o">Stoyan Zhekov</mail> |
81 |
</author> |
82 |
<author title="Editor"> |
83 |
<mail link="jhhudso@g.o">Jared Hudson</mail> |
84 |
</author> |
85 |
<author title="Editor"> |
86 |
<mail link="peitolm@g.o">Colin Morey</mail> |
87 |
</author> |
88 |
<author title="Editor"> |
89 |
<mail link="peesh@g.o">Jorge Paulo</mail> |
90 |
</author> |
91 |
<author title="Editor"> |
92 |
<mail link="carl@g.o">Carl Anderson</mail> |
93 |
</author> |
94 |
<author title="Editor"> |
95 |
<mail link="avenj@g.o">Jon Portnoy</mail> |
96 |
</author> |
97 |
<author title="Editor"> |
98 |
<mail link="klasikahl@g.o">Zack Gilburd</mail> |
99 |
</author> |
100 |
<author title="Editor"> |
101 |
<mail link="jmorgan@g.o">Jack Morgan</mail> |
102 |
</author> |
103 |
<author title="Editor"> |
104 |
<mail link="bennyc@g.o">Benny Chuang</mail> |
105 |
</author> |
106 |
<author title="Editor"> |
107 |
<mail link="erwin@g.o">Erwin</mail> |
108 |
</author> |
109 |
<author title="Editor"> |
110 |
<mail link="kumba@g.o">Joshua Kinard</mail> |
111 |
</author> |
112 |
<author title="Editor"> |
113 |
<mail link="stuartl@××××××××××××××××××.org">Stuart Longland</mail> |
114 |
</author> |
115 |
<author title="Editor"> |
116 |
<mail link="dertobi123@g.o">Tobias Scherbaum</mail> |
117 |
</author> |
118 |
<author title="Editor"> |
119 |
<mail link="neysx@g.o">Xavier Neys</mail> |
120 |
</author> |
121 |
<author title="Reviewer"> |
122 |
<mail link="g2boojum@g.o">Grant Goodyear</mail> |
123 |
</author> |
124 |
<author title="Reviewer"> |
125 |
<mail link="gerrynjr@g.o">Gerald J. Normandin Jr.</mail> |
126 |
</author> |
127 |
<author title="Reviewer"> |
128 |
<mail link="spyderous@g.o">Donnie Berkholz</mail> |
129 |
</author> |
130 |
<author title="Reviewer"> |
131 |
<mail link="antifa@g.o">Ken Nowack</mail> |
132 |
</author> |
133 |
<author title="Contributor"> |
134 |
<mail link="pylon@g.o">Lars Weiler</mail> |
135 |
</author> |
136 |
|
137 |
<abstract> |
138 |
This is the Gentoo Handbook, an effort to centralize Gentoo/Linux information. |
139 |
This handbook contains the installation instructions for an Internet-based |
140 |
installation on MIPS systems and parts about working with Gentoo and Portage. |
141 |
</abstract> |
142 |
|
143 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
144 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
145 |
<license/> |
146 |
|
147 |
<version>4.3</version> |
148 |
<date>2005-12-19</date> |
149 |
|
150 |
<part> |
151 |
<title>Installing Gentoo</title> |
152 |
<abstract> |
153 |
In this part you learn how to install Gentoo on your system. |
154 |
</abstract> |
155 |
|
156 |
<chapter> |
157 |
<title>About the Gentoo Linux Installation</title> |
158 |
<abstract> |
159 |
This chapter introduces you to the installation approach documented in this |
160 |
part. |
161 |
</abstract> |
162 |
<include href="hb-install-about.xml"/> |
163 |
</chapter> |
164 |
|
165 |
<chapter> |
166 |
<title>Choosing the Right Installation Medium</title> |
167 |
<abstract> |
168 |
You can install Gentoo in many ways. In this chapter we explain how to install |
169 |
Gentoo using the MIPS Netboot images. |
170 |
</abstract> |
171 |
<include href="hb-install-mips-medium.xml"/> |
172 |
</chapter> |
173 |
|
174 |
<chapter> |
175 |
<title>Configuring your Network</title> |
176 |
<abstract> |
177 |
To be able to download the latest source code, you will need to setup |
178 |
networking. |
179 |
</abstract> |
180 |
<include href="hb-install-network.xml"/> |
181 |
</chapter> |
182 |
|
183 |
<chapter> |
184 |
<title>Preparing the Disks</title> |
185 |
<abstract> |
186 |
To be able to install Gentoo, you must create the necessary partitions. |
187 |
This chapter describes how to partition a disk for future usage. |
188 |
</abstract> |
189 |
<include href="hb-install-mips-disk.xml"/> |
190 |
</chapter> |
191 |
|
192 |
<chapter> |
193 |
<title>Installing the Gentoo Installation Files</title> |
194 |
<abstract> |
195 |
Gentoo installs work through a stage3 archive. In this chapter we |
196 |
describe how you extract the stage3 archive and configure Portage. |
197 |
</abstract> |
198 |
<include href="hb-install-stage.xml"/> |
199 |
</chapter> |
200 |
|
201 |
<chapter> |
202 |
<title>Installing the Gentoo Base System</title> |
203 |
<abstract> |
204 |
After installing and configuring a stage3, the eventual result is that you |
205 |
have a Gentoo base system at your disposal. This chapter describes how |
206 |
to progress to that stadium. |
207 |
</abstract> |
208 |
<include href="hb-install-system.xml"/> |
209 |
</chapter> |
210 |
|
211 |
<chapter> |
212 |
<title>Configuring the Kernel</title> |
213 |
<abstract> |
214 |
The Linux kernel is the core of every distribution. This chapter |
215 |
explains how to configure your kernel. |
216 |
</abstract> |
217 |
<include href="hb-install-mips-kernel.xml"/> |
218 |
</chapter> |
219 |
|
220 |
<chapter> |
221 |
<title>Configuring your System</title> |
222 |
<abstract> |
223 |
You need to edit some important configuration files. In this chapter |
224 |
you receive an overview of these files and an explanation on how to |
225 |
proceed. |
226 |
</abstract> |
227 |
<include href="hb-install-config.xml"/> |
228 |
</chapter> |
229 |
|
230 |
<chapter> |
231 |
<title>Installing Necessary System Tools</title> |
232 |
<abstract> |
233 |
As mentioned before, Gentoo is about choices. In this chapter we help you |
234 |
choose and install some important tools. |
235 |
</abstract> |
236 |
<include href="hb-install-tools.xml"/> |
237 |
</chapter> |
238 |
|
239 |
<chapter> |
240 |
<title>Configuring the Bootloader</title> |
241 |
<abstract> |
242 |
On both Silicon Graphics machines, and on Cobalt servers, both require the use |
243 |
of a bootloader to load the kernel. This section covers setting up |
244 |
arcboot (for SGI machines) and colo for Cobalt servers. |
245 |
</abstract> |
246 |
<include href="hb-install-mips-bootloader.xml"/> |
247 |
</chapter> |
248 |
|
249 |
<chapter> |
250 |
<title>Finalizing your Gentoo Installation</title> |
251 |
<abstract> |
252 |
You're almost done. We'll just create one (or more) users for your |
253 |
system. |
254 |
</abstract> |
255 |
<include href="hb-install-finalise.xml"/> |
256 |
</chapter> |
257 |
|
258 |
<chapter> |
259 |
<title>Where to go from here?</title> |
260 |
<abstract> |
261 |
Now you have your Gentoo system, but what's next? |
262 |
</abstract> |
263 |
<include href="hb-install-next.xml"/> |
264 |
</chapter> |
265 |
</part> |
266 |
|
267 |
<part> |
268 |
<title>Working with Gentoo</title> |
269 |
<abstract> |
270 |
Learn how to work with Gentoo: installing software, altering variables, changing |
271 |
Portage behaviour etc. |
272 |
</abstract> |
273 |
|
274 |
<chapter> |
275 |
<title>A Portage Introduction</title> |
276 |
<abstract> |
277 |
This chapter explains the "simple" steps a user definitely needs to know to |
278 |
maintain the software on his system. |
279 |
</abstract> |
280 |
<include href="hb-working-portage.xml"/> |
281 |
</chapter> |
282 |
|
283 |
<chapter> |
284 |
<title>USE flags</title> |
285 |
<abstract> |
286 |
USE-flags are a very important aspect of Gentoo. In this chapter, you learn to |
287 |
work with USE-flags and understand how USE-flags interact with your system. |
288 |
</abstract> |
289 |
<include href="hb-working-use.xml"/> |
290 |
</chapter> |
291 |
|
292 |
<chapter> |
293 |
<title>Portage Features</title> |
294 |
<abstract> |
295 |
Discover the features Portage has, such as support for distributed compiling, |
296 |
ccache and more. |
297 |
</abstract> |
298 |
<include href="hb-working-features.xml"/> |
299 |
</chapter> |
300 |
|
301 |
<chapter> |
302 |
<title>Initscripts</title> |
303 |
<abstract> |
304 |
Gentoo uses a special initscript format which, amongst other features, allows |
305 |
dependency-driven decisions and virtual initscripts. This chapter explains all |
306 |
these aspects and explains how to deal with these scripts. |
307 |
</abstract> |
308 |
<include href="hb-working-rcscripts.xml"/> |
309 |
</chapter> |
310 |
|
311 |
<chapter> |
312 |
<title>Environment Variables</title> |
313 |
<abstract> |
314 |
With Gentoo you can easily manage the environment variables for your system. |
315 |
This chapter explains how you do that, and also describes frequently used |
316 |
variables. |
317 |
</abstract> |
318 |
<include href="hb-working-variables.xml"/> |
319 |
</chapter> |
320 |
</part> |
321 |
|
322 |
<part> |
323 |
<title>Working with Portage</title> |
324 |
<abstract> |
325 |
"Working with Portage" provides an in-depth coverage of Portage, Gentoo's |
326 |
Software Management Tool. |
327 |
</abstract> |
328 |
|
329 |
<chapter> |
330 |
<title>Files and Directories</title> |
331 |
<abstract> |
332 |
Once you want to know Portage in-depth you need to know where it stores its |
333 |
files and data. |
334 |
</abstract> |
335 |
<include href="hb-portage-files.xml"/> |
336 |
</chapter> |
337 |
|
338 |
<chapter> |
339 |
<title>Configuring through Variables</title> |
340 |
<abstract> |
341 |
Portage is completely configurable through various variables you can set in the |
342 |
configuration file or as environment variable. |
343 |
</abstract> |
344 |
<include href="hb-portage-configuration.xml"/> |
345 |
</chapter> |
346 |
|
347 |
<chapter> |
348 |
<title>Mixing Software Branches</title> |
349 |
<abstract> |
350 |
Gentoo provides software separated in several branches, depending on stability |
351 |
and architectural support. "Mixing Software Branches" inform you how these |
352 |
branches can be configured and how you can override this separation |
353 |
individually. |
354 |
</abstract> |
355 |
<include href="hb-portage-branches.xml"/> |
356 |
</chapter> |
357 |
|
358 |
<chapter> |
359 |
<title>Additional Portage Tools</title> |
360 |
<abstract> |
361 |
Portage comes with a few extra tools that might make your Gentoo experience even |
362 |
better. Read on to discover how to use dispatch-conf and other tools. |
363 |
</abstract> |
364 |
<include href="hb-portage-tools.xml"/> |
365 |
</chapter> |
366 |
|
367 |
<chapter> |
368 |
<title>Diverting from the Official Tree</title> |
369 |
<abstract> |
370 |
"Diverting from the Official Tree" gives you some tips and tricks on how to use |
371 |
your own Portage tree, how to synchronise only the categories you want, inject |
372 |
packages and more. |
373 |
</abstract> |
374 |
<include href="hb-portage-diverttree.xml"/> |
375 |
</chapter> |
376 |
|
377 |
<chapter> |
378 |
<title>The Ebuild Application</title> |
379 |
<abstract> |
380 |
In "The Ebuild Application" you are informed about the steps Portage takes while |
381 |
installing software and how you can do this yourself using the ebuild |
382 |
application. |
383 |
</abstract> |
384 |
<include href="hb-portage-ebuild.xml"/> |
385 |
</chapter> |
386 |
</part> |
387 |
|
388 |
<part> |
389 |
<title>Gentoo Network Configuration</title> |
390 |
<abstract>A comprehensive guide to Networking in Gentoo.</abstract> |
391 |
|
392 |
<chapter> |
393 |
<title>Getting Started</title> |
394 |
<abstract> |
395 |
A guide to quickly get your network interface up and running in most common |
396 |
environments. |
397 |
</abstract> |
398 |
<include href="hb-net-start.xml"/> |
399 |
</chapter> |
400 |
|
401 |
<chapter> |
402 |
<title>Advanced Configuration</title> |
403 |
<abstract> |
404 |
Here we learn about how the configuration works - you need to know this |
405 |
before we learn about modular networking. |
406 |
</abstract> |
407 |
<include href="hb-net-advanced.xml"/> |
408 |
</chapter> |
409 |
|
410 |
<chapter> |
411 |
<title>Modular Networking</title> |
412 |
<abstract> |
413 |
Gentoo provides you flexible networking - here you are told about choosing |
414 |
different DHCP clients, setting up bonding, bridging, VLANs and more. |
415 |
</abstract> |
416 |
<include href="hb-net-modules.xml"/> |
417 |
</chapter> |
418 |
|
419 |
<chapter> |
420 |
<title>Wireless Networking</title> |
421 |
<abstract> |
422 |
Wireless isn't straight-forward. Hopefully we'll get you working! |
423 |
</abstract> |
424 |
<include href="hb-net-wireless.xml"/> |
425 |
</chapter> |
426 |
|
427 |
<chapter> |
428 |
<title>Adding Functionality</title> |
429 |
<abstract> |
430 |
If you're feeling adventurous, you can add your own functions to networking. |
431 |
</abstract> |
432 |
<include href="hb-net-functions.xml"/> |
433 |
</chapter> |
434 |
|
435 |
<chapter> |
436 |
<title>Network Management</title> |
437 |
<abstract> |
438 |
For laptop users or people who move their computer around different networks. |
439 |
</abstract> |
440 |
<include href="hb-net-management.xml"/> |
441 |
</chapter> |
442 |
</part> |
443 |
|
444 |
</book> |
445 |
|
446 |
|
447 |
|
448 |
1.1 xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-bootloader.xml |
449 |
|
450 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-bootloader.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
451 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-bootloader.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo |
452 |
|
453 |
Index: hb-install-mips-bootloader.xml |
454 |
=================================================================== |
455 |
<?xml version='1.0' encoding='UTF-8'?> |
456 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
457 |
|
458 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
459 |
<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
460 |
|
461 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-bootloader.xml,v 1.1 2006/02/12 13:54:32 nightmorph Exp $ --> |
462 |
|
463 |
<sections> |
464 |
|
465 |
<version>1.8</version> |
466 |
<date>2006-01-19</date> |
467 |
|
468 |
<section id="sgi"> |
469 |
<title>Silicon Graphics Machines -- Setting Up Arcboot</title> |
470 |
<subsection> |
471 |
<title>Installing arcboot</title> |
472 |
<body> |
473 |
|
474 |
<p> |
475 |
Previously in this guide, we showed you how to make a kernel, then copy it to |
476 |
the volume header using <c>dvhtool</c>. There were two main flaws with this |
477 |
system: |
478 |
</p> |
479 |
|
480 |
<ul> |
481 |
<li>This is not supported on all SGI systems</li> |
482 |
<li>It requires a significantly larger volume header</li> |
483 |
</ul> |
484 |
|
485 |
<p> |
486 |
In order to boot the machine, a bootloader, <c>arcboot</c> was developed for |
487 |
this purpose. Instead of putting the kernel directly into the volume header, we |
488 |
leave it in <path>/boot</path> (which resides on a EXT2/3 partition), and tell |
489 |
<c>arcboot</c> (which sits in the volume header in place of the kernel) where to |
490 |
find it. So our first step, is to emerge some tools that we'll use later... |
491 |
</p> |
492 |
|
493 |
<pre caption="Installing the required tools"> |
494 |
# <i>emerge dvhtool arcboot</i> |
495 |
</pre> |
496 |
|
497 |
<p> |
498 |
That should have installed two tools, <c>arcboot</c> which sits in the volume |
499 |
header and loads kernels for us, and <c>dvhtool</c> which helps us put |
500 |
<c>arcboot</c> into the volume header. |
501 |
</p> |
502 |
<p> |
503 |
The magic binary we want, hides in <path>/usr/lib/arcboot</path> -- on IP22 |
504 |
systems (Indy, Indigo 2, Challenge S), it'll be called |
505 |
<path>arcboot.ip22</path>. Other systems should be similar. We |
506 |
first copy this file into the volume header. |
507 |
</p> |
508 |
|
509 |
<pre caption="Installing arcboot into the volume header"> |
510 |
# <i>dvhtool --unix-to-vh /usr/lib/arcboot/arcboot.ip?? arcboot</i> |
511 |
</pre> |
512 |
|
513 |
<p> |
514 |
We then verify the presence of the file in the volume header. |
515 |
</p> |
516 |
|
517 |
<pre caption="Checking if arcboot made it okay"> |
518 |
# <i>dvhtool --print-volume-directory</i> |
519 |
----- directory entries ----- |
520 |
Entry #0, name "linux", start 4, bytes 3262570 |
521 |
Entry #1, name "newlinux", start 6377, bytes 7619627 |
522 |
Entry #3, name "arcboot", start 21260, bytes 51448 |
523 |
# |
524 |
</pre> |
525 |
|
526 |
<note> |
527 |
You'll notice that in my case, I've got two old kernels sitting around there, |
528 |
<path>linux</path> and <path>newlinux</path>. This is a hangover from before we |
529 |
started using <c>arcboot</c>. Their presence doesn't matter -- just so long as |
530 |
<c>arcboot</c> is present, everything is fine. |
531 |
</note> |
532 |
|
533 |
</body> |
534 |
</subsection> |
535 |
|
536 |
<subsection> |
537 |
<title>Configuring arcboot</title> |
538 |
|
539 |
<body> |
540 |
|
541 |
<p> |
542 |
If you've ever set up the Linux Loader (<c>lilo</c>) before, you'll find that |
543 |
<c>arcboot</c> employs a similar syntax in its configuration file. Bear in mind |
544 |
though; <c>arcboot</c> expects to find its configuration file existing on an |
545 |
EXT2/3 partition as <path>/etc/arcboot.conf</path>. The easiest way around this |
546 |
is to make sure <path>/boot</path> is an EXT2/3 partition and that there's a |
547 |
file called <path>arcboot.conf</path> inside the <path>/boot/etc</path> |
548 |
directory. An example config can be found in |
549 |
<path>/etc/arcboot.conf.sample</path> |
550 |
</p> |
551 |
|
552 |
<pre caption="Putting arcboot.conf in its place"> |
553 |
<comment>(Create the /boot/etc directory)</comment> |
554 |
# <i>mkdir /boot/etc</i> |
555 |
|
556 |
<comment>(Put our configuration into the target directory)</comment> |
557 |
# <i>cp /etc/arcboot.conf.sample /boot/etc/arcboot.conf</i> |
558 |
|
559 |
<comment>(Create a symlink back to /etc)</comment> |
560 |
# <i>ln -s /boot/etc/arcboot.conf /etc/arcboot.conf</i> |
561 |
|
562 |
<comment>(... and a symlink in /boot pointing to itself)</comment> |
563 |
# <i>(cd /boot; ln -s . boot)</i> |
564 |
</pre> |
565 |
|
566 |
<p> |
567 |
You can then edit <path>/etc/arcboot.conf</path> to your own preference. |
568 |
Personally, I prefer to set up two kernel images: <path>new</path>, a freshly built |
569 |
image that may or may not work; and <path>working</path>, a proven trustworthy |
570 |
kernel image. My <path>arcboot.conf</path> looks a bit like this. |
571 |
</p> |
572 |
|
573 |
<pre caption="Example arcboot.conf"> |
574 |
<comment># arcboot.conf</comment> |
575 |
<comment>#</comment> |
576 |
<comment># copyright 2002 Guido Guenther <agx@×××××××.org></comment> |
577 |
<comment>#</comment> |
578 |
label=working |
579 |
image=/vmlinux |
580 |
append="root=/dev/sda3" |
581 |
|
582 |
<comment># backup version</comment> |
583 |
label=new |
584 |
image=/vmlinux-new |
585 |
append="root=/dev/sda3" |
586 |
</pre> |
587 |
|
588 |
<p> |
589 |
Once that is set up, there's then just some little tweaks that you need to do |
590 |
within the SGI PROM to make this magic work. This is covered in, not the next |
591 |
section (that's for Cobalt servers) but the following section |
592 |
<uri link="#reboot">Rebooting the System</uri>. |
593 |
</p> |
594 |
|
595 |
</body> |
596 |
</subsection> |
597 |
</section> |
598 |
|
599 |
<section id="cobalt"> |
600 |
<title>Cobalt MicroServers -- Setting Up CoLo</title> |
601 |
<subsection> |
602 |
<title>Installing CoLo</title> |
603 |
<body> |
604 |
|
605 |
<p> |
606 |
On Cobalt servers, these machines have a much less capable firmware installed on |
607 |
chip. The Cobalt BOOTROM is primitive, by comparison to the SGI PROM, and has a |
608 |
number of serious limitations. |
609 |
</p> |
610 |
|
611 |
<ul> |
612 |
<li> |
613 |
There's a 675kB limit on kernels. The current size of Linux 2.4 makes it |
614 |
damn near impossible to make a kernel this size. Linux 2.6 is totally out |
615 |
of the question. |
616 |
</li> |
617 |
<li> |
618 |
64-bit kernels are not supported by the stock firmware (although these are |
619 |
highly experimental on Cobalt machines at this time) |
620 |
</li> |
621 |
<li> |
622 |
The shell is basic at best |
623 |
</li> |
624 |
</ul> |
625 |
|
626 |
<p> |
627 |
To overcome these limitations, an alternative firmware, called |
628 |
<uri link="http://www.colonel-panic.org/cobalt-mips/">CoLo</uri> (Cobalt |
629 |
Loader) was developed. This is a BOOTROM image that can either be flashed into |
630 |
the chip inside the Cobalt server, or loaded from the existing firmware. |
631 |
</p> |
632 |
|
633 |
<note> |
634 |
This guide will take you through setting up CoLo so that it is loaded by the |
635 |
stock firmware. This is the only truly safe, and recommended way to set up CoLo. |
636 |
</note> |
637 |
|
638 |
<warn> |
639 |
You may, if you wish, flash it into the server, and totally |
640 |
replace the original firmware -- however, you are entirely on your own in that |
641 |
endeavour. Should anything go wrong, you will need to physically remove the |
642 |
BOOTROM and reprogram it yourself with the stock firmware. If you are not |
643 |
sure how to do this -- then <e>DO NOT</e> flash your machine. We take no |
644 |
responsibility for whatever happens if you ignore this advice. |
645 |
</warn> |
646 |
|
647 |
<p> |
648 |
Okay, with the warnings over now, we'll get on with installing CoLo. First, |
649 |
start by emerging the package. |
650 |
</p> |
651 |
|
652 |
<pre caption="Emerging colo"> |
653 |
# <i>emerge colo</i> |
654 |
</pre> |
655 |
|
656 |
<p> |
657 |
With that installed (I hope you read those messages ;-) you should be able to |
658 |
look inside the <path>/usr/lib/colo</path> directory to find two files, |
659 |
<path>colo-chain.elf</path>: the "kernel" for the stock firmware to load, and |
660 |
<path>colo-rom-image.bin</path>: a ROM image for flashing into the BOOTROM. We |
661 |
start by mounting /boot and dumping a compressed copy of |
662 |
<path>colo-chain.elf</path> in <path>/boot</path> where the system expects it. |
663 |
</p> |
664 |
|
665 |
<pre caption="Putting CoLo in its place"> |
666 |
# <i>gzip -9vc /usr/lib/colo/colo-chain.elf > /boot/vmlinux.gz</i> |
667 |
</pre> |
668 |
|
669 |
</body> |
670 |
</subsection> |
671 |
|
672 |
<subsection> |
673 |
<title>Configuring CoLo</title> |
674 |
|
675 |
<body> |
676 |
|
677 |
<p> |
678 |
Now, when the system first boots up, it'll load CoLo which will spit up a menu |
679 |
on the back LCD. The first option (and default that is assumed after roughly 5 |
680 |
seconds) is to boot to the hard disk. The system would then attempt to mount |
681 |
the first Linux partition it finds, and run the script |
682 |
<path>default.colo</path>. The syntax is fully documented in the CoLo |
683 |
documentation (have a peek at |
684 |
<path>/usr/share/doc/colo-X.YY/README.shell.gz</path> -- where X.YY is the |
685 |
version installed), and is very simple. |
686 |
</p> |
687 |
|
688 |
<note> |
689 |
Just a tip: when installing kernels, I usually create two kernel images, |
690 |
<path>kernel.gz.working</path> -- a known working kernel, and |
691 |
<path>kernel.gz.new</path> -- a kernel that's just been compiled. You can either |
692 |
use symlinks to point to the curent "new" and "working" kernels, or just rename |
693 |
the kernel images. |
694 |
</note> |
695 |
|
696 |
<pre caption="A basic default.colo"> |
697 |
<comment>#:CoLo:#</comment> |
698 |
mount hda1 |
699 |
load /kernel.gz.working |
700 |
execute root=/dev/hda3 ro console=ttyS0,115200 |
701 |
</pre> |
702 |
|
703 |
<note> |
704 |
CoLo will refuse to load a script that does not begin with the <c>#:CoLo:#</c> |
705 |
line. Think of it as the equivalent of saying <c>#!/bin/sh</c> in shell |
706 |
scripts. |
707 |
</note> |
708 |
|
709 |
<p> |
710 |
It is also possible to ask a question, such as which kernel & configuration |
711 |
you'd like to boot, with a default timeout. This is the configuration I use on |
712 |
my Cobalt server: |
713 |
</p> |
714 |
|
715 |
<impo> |
716 |
Please note that you need to be using CoLo v1.12 or v1.13 to use the <c>menu</c> |
717 |
command. The following example won't work with v1.11. |
718 |
</impo> |
719 |
|
720 |
<impo> |
721 |
The <c>menu</c> command was replaced by the <c>select</c> command in CoLo v1.14. |
722 |
If you've installed a later version by hand, have a look at |
723 |
<path>menu.colo</path> in the <path>examples</path> subdirectory of the CoLo |
724 |
distribution. |
725 |
</impo> |
726 |
|
727 |
<pre caption="Menu-based configuration"> |
728 |
<comment>#:CoLo:#</comment> |
729 |
|
730 |
lcd "Mounting hda1" |
731 |
mount hda1 |
732 |
menu "Which Kernel?" 50 Working working New new |
733 |
lcd "Loading Linux" {menu-option} |
734 |
load /kernel.gz.{menu-option} |
735 |
lcd "Booting..." |
736 |
execute root=/dev/hda5 ro console=ttyS0,115200 |
737 |
boot |
738 |
</pre> |
739 |
|
740 |
<p> |
741 |
The above script asks the user which kernel he/she would like to boot (either |
742 |
New or Working), then loads <path>vmlinux.gz.new</path> or |
743 |
<path>vmlinux.gz.working</path> depending on the selection. If a selection is |
744 |
not made within 5 seconds (50/10ths of a second) it boots the first option. |
745 |
</p> |
746 |
</body> |
747 |
|
748 |
</subsection> |
749 |
</section> |
750 |
|
751 |
<section> |
752 |
<title>Setting up for Serial Console</title> |
753 |
|
754 |
<subsection> |
755 |
<body> |
756 |
|
757 |
<p> |
758 |
Okay, the Linux installation as it stands now, would boot fine, but assumes |
759 |
you're going to be logged in at a physical terminal. On Cobalt machines, this |
760 |
is particularly bad -- there's no such thing as a physical terminal. |
761 |
</p> |
762 |
|
763 |
<note> |
764 |
Those who do have the luxury of a supported framebuffer may skip this section if |
765 |
they wish. |
766 |
</note> |
767 |
|
768 |
<p> |
769 |
First, pull up an editor and hack away at <path>/etc/inittab</path>. Further |
770 |
down in the file, you'll see something like this: |
771 |
</p> |
772 |
|
773 |
<pre caption="inittab Configuration"> |
774 |
<comment># SERIAL CONSOLE</comment> |
775 |
<comment>#c0:12345:respawn:/sbin/agetty 9600 ttyS0 vt102</comment> |
776 |
|
777 |
<comment># TERMINALS</comment> |
778 |
c1:12345:respawn:/sbin/agetty 38400 tty1 linux |
779 |
c2:12345:respawn:/sbin/agetty 38400 tty2 linux |
780 |
c3:12345:respawn:/sbin/agetty 38400 tty3 linux |
781 |
c4:12345:respawn:/sbin/agetty 38400 tty4 linux |
782 |
c5:12345:respawn:/sbin/agetty 38400 tty5 linux |
783 |
c6:12345:respawn:/sbin/agetty 38400 tty6 linux |
784 |
|
785 |
<comment># What to do at the "Three Finger Salute".</comment> |
786 |
ca:12345:ctrlaltdel:/sbin/shutdown -r now |
787 |
</pre> |
788 |
|
789 |
<p> |
790 |
First, uncomment the <c>c0</c> line. By default, it's set to use a terminal |
791 |
baud rate of 9600 bps. On Cobalt servers, you may want to change this to 115200 |
792 |
to match the baud rate decided by the BOOT ROM. This is how that section looks |
793 |
on my machine. On a headless machine (e.g. Cobalt servers), I'll also recommend |
794 |
commenting out the local terminal lines (<c>c1</c> through to <c>c6</c>) |
795 |
as these have a habit of misbehaving when they can't open |
796 |
<path>/dev/ttyX</path>. |
797 |
</p> |
798 |
|
799 |
<pre caption="Example snippet from inittab"> |
800 |
<comment># SERIAL CONSOLE</comment> |
801 |
c0:12345:respawn:/sbin/agetty 115200 ttyS0 vt102 |
802 |
|
803 |
<comment># TERMINALS -- These are useless on a headless qube</comment> |
804 |
<comment>#c1:12345:respawn:/sbin/agetty 38400 tty1 linux</comment> |
805 |
<comment>#c2:12345:respawn:/sbin/agetty 38400 tty2 linux</comment> |
806 |
<comment>#c3:12345:respawn:/sbin/agetty 38400 tty3 linux</comment> |
807 |
<comment>#c4:12345:respawn:/sbin/agetty 38400 tty4 linux</comment> |
808 |
<comment>#c5:12345:respawn:/sbin/agetty 38400 tty5 linux</comment> |
809 |
<comment>#c6:12345:respawn:/sbin/agetty 38400 tty6 linux</comment> |
810 |
</pre> |
811 |
|
812 |
<p> |
813 |
Now, lastly... we have to tell the system, that the local serial port can be |
814 |
trusted as a secure terminal. The file we need to poke at is |
815 |
<path>/etc/securetty</path>. It contains a list of terminals that the system |
816 |
trusts. We simply stick in two more lines, permitting the serial line to be |
817 |
used for <c>root</c> logins. |
818 |
</p> |
819 |
|
820 |
<pre caption="Enabling root logins on serial console"> |
821 |
<comment>(/dev/ttyS0 -- the traditional name for the first serial port)</comment> |
822 |
# <i>echo 'ttyS0' >> /etc/securetty</i> |
823 |
|
824 |
<comment>(Lately, Linux also calls this /dev/tts/0 -- so we add this |
825 |
too)</comment> |
826 |
# <i>echo 'tts/0' >> /etc/securetty</i> |
827 |
</pre> |
828 |
|
829 |
</body> |
830 |
</subsection> |
831 |
</section> |
832 |
|
833 |
<section id="reboot"> |
834 |
<title>Rebooting the System</title> |
835 |
<subsection> |
836 |
<body> |
837 |
|
838 |
<p> |
839 |
Exit the chrooted environment and unmount all mounted partitions. Then type in |
840 |
that one magical command you have been waiting for: <c>reboot</c>. |
841 |
</p> |
842 |
|
843 |
<pre caption="Exiting the chroot, unmounting all partitions and rebooting"> |
844 |
# <i>exit</i> |
845 |
cdimage ~# <i>cd</i> |
846 |
cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i> |
847 |
cdimage ~# <i>reboot</i> |
848 |
</pre> |
849 |
|
850 |
<note> |
851 |
<e>Cobalt Users:</e> The rest of this section covers the setting up of the SGI |
852 |
PROM so that it boots <c>arcboot</c> off disk and loads Linux. This is not |
853 |
applicable to the setup of Cobalt servers. In fact, all your work is done -- |
854 |
there is no configuration needed for the first boot up, you can skip to the next |
855 |
section: <uri link="?part=1&chap=11">Finalising your Gentoo |
856 |
Installation</uri> |
857 |
</note> |
858 |
|
859 |
</body> |
860 |
</subsection> |
861 |
</section> |
862 |
<section> |
863 |
<title>Tweaking the SGI PROM</title> |
864 |
<subsection> |
865 |
<body> |
866 |
|
867 |
<p> |
868 |
When you are rebooted, go to the <e>System Maintenance Menu</e> and select |
869 |
<e>Enter Command Monitor</e> (<c>5</c>). If you want to test your new Gentoo |
870 |
installation, you can just run <c>boot -f <kernel name></c>. To have your |
871 |
system permanently boot into the Gentoo installation, you need to set some |
872 |
variables in the SGI PROM: |
873 |
</p> |
874 |
|
875 |
<pre caption="Configuring the PROM to Boot Gentoo"> |
876 |
1) Start System |
877 |
2) Install System Software |
878 |
3) Run Diagnostics |
879 |
4) Recover System |
880 |
5) Enter Command Monitor |
881 |
|
882 |
Option? <i>5</i> |
883 |
Command Monitor. Type "exit" to return to the menu. |
884 |
|
885 |
<comment>(<root device> = Gentoo's root partition, e.g. /dev/sda3)</comment> |
886 |
>> <i>setenv OSLoadPartition <root device></i> |
887 |
|
888 |
<comment>(To list the available kernels, type "ls")</comment> |
889 |
>> <i>setenv OSLoader <kernel name></i> |
890 |
>> <i>setenv OSLoadFilename <kernel name></i> |
891 |
|
892 |
<comment>(Declare the kernel parameters you want to pass)</comment> |
893 |
>> <i>setenv OSLoadOptions <kernel parameters></i> |
894 |
|
895 |
<comment>(Provide the location of the Volume Header)</comment> |
896 |
>> <i>setenv SystemPartition scsi(0)disk(1)rdisk(0)partition(8)</i> |
897 |
|
898 |
<comment>(Automatically boot Gentoo)</comment> |
899 |
>> <i>setenv AutoLoad Yes</i> |
900 |
|
901 |
<comment>(Set the timezone)</comment> |
902 |
>> <i>setenv TimeZone EST5EDT</i> |
903 |
|
904 |
<comment>(Use the serial console - graphic adapter users should have "g" instead of "d1" (one))</comment> |
905 |
>> <i>setenv console d1</i> |
906 |
</pre> |
907 |
|
908 |
<p> |
909 |
Now you're ready to enjoy Gentoo! Boot in your Gentoo installation and finish |
910 |
up with <uri link="?part=1&chap=11">Finalizing your Gentoo |
911 |
Installation</uri>. |
912 |
</p> |
913 |
|
914 |
</body> |
915 |
</subsection> |
916 |
</section> |
917 |
</sections> |
918 |
|
919 |
|
920 |
|
921 |
1.1 xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-disk.xml |
922 |
|
923 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-disk.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
924 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-disk.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo |
925 |
|
926 |
Index: hb-install-mips-disk.xml |
927 |
=================================================================== |
928 |
<?xml version='1.0' encoding='UTF-8'?> |
929 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
930 |
|
931 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
932 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
933 |
|
934 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-disk.xml,v 1.1 2006/02/12 13:54:32 nightmorph Exp $ --> |
935 |
|
936 |
<sections> |
937 |
|
938 |
<version>1.11</version> |
939 |
<date>2005-10-02</date> |
940 |
|
941 |
<section> |
942 |
<title>Introduction to Block Devices</title> |
943 |
<subsection> |
944 |
<title>Block Devices</title> |
945 |
<body> |
946 |
|
947 |
<p> |
948 |
We'll take a good look at disk-oriented aspects of Gentoo Linux |
949 |
and Linux in general, including Linux filesystems, partitions and block devices. |
950 |
Then, once you're familiar with the ins and outs of disks and filesystems, |
951 |
you'll be guided through the process of setting up partitions and filesystems |
952 |
for your Gentoo Linux installation. |
953 |
</p> |
954 |
|
955 |
<p> |
956 |
To begin, we'll introduce <e>block devices</e>. The most famous block device is |
957 |
probably the one that represents the first SCSI HD in a Linux system, namely |
958 |
<path>/dev/sda</path>. |
959 |
</p> |
960 |
|
961 |
<p> |
962 |
The block devices above represent an abstract interface to the disk. User |
963 |
programs can use these block devices to interact with your disk without worrying |
964 |
about whether your drives are IDE, SCSI or something else. The program can |
965 |
simply address the storage on the disk as a bunch of contiguous, |
966 |
randomly-accessible 512-byte blocks. |
967 |
</p> |
968 |
|
969 |
</body> |
970 |
</subsection> |
971 |
<subsection> |
972 |
<title>Partitions</title> |
973 |
<body> |
974 |
|
975 |
<p> |
976 |
Although it is theoretically possible to use a full disk to house your Linux |
977 |
system, this is almost never done in practice. Instead, full disk block devices |
978 |
are split up in smaller, more manageable block devices. These are called |
979 |
<e>partitions</e>. |
980 |
</p> |
981 |
|
982 |
</body> |
983 |
</subsection> |
984 |
</section> |
985 |
<section> |
986 |
<title>Designing a Partitioning Scheme</title> |
987 |
<subsection> |
988 |
<title>How Many and How Big?</title> |
989 |
<body> |
990 |
|
991 |
<p> |
992 |
The number of partitions is highly dependent on your environment. For instance, |
993 |
if you have lots of users, you will most likely want to have your |
994 |
<path>/home</path> separate as it increases security and makes backups easier. |
995 |
If you are installing Gentoo to perform as a mailserver, your |
996 |
<path>/var</path> should be separate as all mails are stored inside |
997 |
<path>/var</path>. A good choice of filesystem will then maximise your |
998 |
performance. Gameservers will have a separate <path>/opt</path> as most gaming |
999 |
servers are installed there. The reason is similar for <path>/home</path>: |
1000 |
security and backups. You will definitely want to keep <path>/usr</path> big: |
1001 |
not only will it contain the majority of applications, the Portage tree alone |
1002 |
takes around 500 Mbyte excluding the various sources that are stored in it. |
1003 |
</p> |
1004 |
|
1005 |
<p> |
1006 |
As you can see, it very much depends on what you want to achieve. Separate |
1007 |
partitions or volumes have the following advantages: |
1008 |
</p> |
1009 |
|
1010 |
<ul> |
1011 |
<li> |
1012 |
You can choose the best performing filesystem for each partition or volume |
1013 |
</li> |
1014 |
<li> |
1015 |
Your entire system cannot run out of free space if one defunct tool is |
1016 |
continuously writing files to a partition or volume |
1017 |
</li> |
1018 |
<li> |
1019 |
If necessary, file system checks are reduced in time, as multiple checks can |
1020 |
be done in parallel (although this advantage is more with multiple disks than |
1021 |
it is with multiple partitions) |
1022 |
</li> |
1023 |
<li> |
1024 |
Security can be enhanced by mounting some partitions or volumes read-only, |
1025 |
nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc. |
1026 |
</li> |
1027 |
</ul> |
1028 |
|
1029 |
<p> |
1030 |
However, multiple partitions have one big disadvantage: if not configured |
1031 |
properly, you might result in having a system with lots |
1032 |
of free space on one partition and none on another. There is also a 15-partition |
1033 |
limit for SCSI and SATA. |
1034 |
</p> |
1035 |
|
1036 |
</body> |
1037 |
</subsection> |
1038 |
</section> |
1039 |
<section> |
1040 |
<title>Using fdisk on MIPS to Partition your Disk</title> |
1041 |
<subsection> |
1042 |
<title>SGI Machines: Creating an SGI Disk Label</title> |
1043 |
<body> |
1044 |
|
1045 |
<p> |
1046 |
All disks in an SGI System require an <e>SGI Disk Label</e>, which serves a |
1047 |
similar function as Sun & MS-DOS disklabels -- It stores information about |
1048 |
the disk partitions. Creating a new SGI Disk Label will create two special |
1049 |
partitions on the disk: |
1050 |
</p> |
1051 |
|
1052 |
<ul> |
1053 |
<li> |
1054 |
<e>SGI Volume Header</e> (9th partition): This partition is important. It |
1055 |
is where the bootloader will reside, and in some cases, it will also contain |
1056 |
the kernel images. |
1057 |
</li> |
1058 |
<li> |
1059 |
<e>SGI Volume</e> (11th partition): This partition is similar in purpose to |
1060 |
the Sun Disklabel's third partition of "Whole Disk". This partition spans |
1061 |
the entire disk, and should be left untouched. It serves no special purpose |
1062 |
other than to assist the PROM in some undocumented fashion (or it is used by |
1063 |
IRIX in some way). |
1064 |
</li> |
1065 |
</ul> |
1066 |
|
1067 |
<warn> |
1068 |
The SGI Volume Header <e>must</e> begin at cylinder 0. Failure to do so means |
1069 |
you won't be able to boot from the disk. |
1070 |
</warn> |
1071 |
|
1072 |
<p> |
1073 |
The following is an example excerpt from an <c>fdisk</c> session. Read and |
1074 |
tailor it to your needs... |
1075 |
</p> |
1076 |
|
1077 |
<pre caption="Creating an SGI Disklabel"> |
1078 |
# <i>fdisk /dev/sda</i> |
1079 |
|
1080 |
Command (m for help): <i>x</i> |
1081 |
|
1082 |
Expert command (m for help): <i>m</i> |
1083 |
Command action |
1084 |
b move beginning of data in a partition |
1085 |
c change number of cylinders |
1086 |
d print the raw data in the partition table |
1087 |
e list extended partitions |
1088 |
f fix partition order |
1089 |
g create an IRIX (SGI) partition table |
1090 |
h change number of heads |
1091 |
m print this menu |
1092 |
p print the partition table |
1093 |
q quit without saving changes |
1094 |
r return to main menu |
1095 |
s change number of sectors/track |
1096 |
v verify the partition table |
1097 |
w write table to disk and exit |
1098 |
|
1099 |
Expert command (m for help): <i>g</i> |
1100 |
Building a new SGI disklabel. Changes will remain in memory only, |
1101 |
until you decide to write them. After that, of course, the previous |
1102 |
content will be irrecoverably lost. |
1103 |
|
1104 |
Expert command (m for help): <i>r</i> |
1105 |
|
1106 |
Command (m for help): <i>p</i> |
1107 |
|
1108 |
Disk /dev/sda (SGI disk label): 64 heads, 32 sectors, 17482 cylinders |
1109 |
Units = cylinders of 2048 * 512 bytes |
1110 |
|
1111 |
----- partitions ----- |
1112 |
Pt# Device Info Start End Sectors Id System |
1113 |
9: /dev/sda1 0 4 10240 0 SGI volhdr |
1114 |
11: /dev/sda2 0 17481 35803136 6 SGI volume |
1115 |
----- Bootinfo ----- |
1116 |
Bootfile: /unix |
1117 |
----- Directory Entries ----- |
1118 |
|
1119 |
Command (m for help): |
1120 |
</pre> |
1121 |
|
1122 |
<note> |
1123 |
If your disk already has an existing SGI Disklabel, then fdisk will not allow |
1124 |
the creation of a new label. There are two ways around this. One is to create a |
1125 |
Sun or MS-DOS disklabel, write the changes to disk, and restart fdisk. The |
1126 |
second is to overwrite the partition table with null data via the following |
1127 |
command: <c>dd if=/dev/zero of=/dev/sda bs=512 count=1</c>. |
1128 |
</note> |
1129 |
</body> |
1130 |
</subsection> |
1131 |
|
1132 |
<subsection> |
1133 |
<title>Getting the SGI Volume Header to just the right size</title> |
1134 |
<body> |
1135 |
|
1136 |
<impo> |
1137 |
This step is often needed, due to a bug in <c>fdisk</c>. For some reason, the |
1138 |
volume header isn't created correctly, the end result being it starts and ends |
1139 |
on cylinder 0. This prevents multiple partitions from being created. To get |
1140 |
around this issue... read on. |
1141 |
</impo> |
1142 |
|
1143 |
<p> |
1144 |
Now that an SGI Disklabel is created, partitions may now be defined. In the |
1145 |
above example, there are already two partitions defined for you. These are the |
1146 |
special partitions mentioned above and should not normally be altered. However, |
1147 |
for installing Gentoo, we'll need to load a bootloader, and possibly multiple |
1148 |
kernel images (depending on system type) directly into the volume header. |
1149 |
The volume header itself can hold up to <e>eight</e> images of any size, |
1150 |
with each image allowed eight-character names. |
1151 |
</p> |
1152 |
|
1153 |
<p> |
1154 |
The process of making the volume header larger isn't exactly straight-forward; |
1155 |
there's a bit of a trick to it. One cannot simply delete and re-add the volume |
1156 |
header due to odd fdisk behavior. In the example provided below, we'll create a |
1157 |
50MB Volume header in conjunction with a 50MB /boot partition. The actual layout |
1158 |
of your disk may vary, but this is for illustrative purposes only. |
1159 |
</p> |
1160 |
|
1161 |
<pre caption="Resizing the SGI Volume Header correctly"> |
1162 |
Command (m for help): <i>n</i> |
1163 |
Partition number (1-16): <i>1</i> |
1164 |
First cylinder (5-8682, default 5): <i>51</i> |
1165 |
Last cylinder (51-8682, default 8682): <i>101</i> |
1166 |
|
1167 |
<comment>(Notice how fdisk only allows Partition #1 to be re-created starting at a ) |
1168 |
(minimum of cylinder 5? Had you attempted to delete & re-create the SGI ) |
1169 |
(Volume Header this way, this is the same issue you would have encountered. ) |
1170 |
(In our example, we want /boot to be 50MB, so we start it at cylinder 51 (the ) |
1171 |
(Volume Header needs to start at cylinder 0, remember?), and set its ending ) |
1172 |
(cylinder to 101, which will roughly be 50MB (+/- 1-5MB). )</comment> |
1173 |
|
1174 |
Command (m for help): <i>d</i> |
1175 |
Partition number (1-16): <i>9</i> |
1176 |
|
1177 |
<comment>(Delete Partition #9 (SGI Volume Header))</comment> |
1178 |
|
1179 |
Command (m for help): <i>n</i> |
1180 |
Partition number (1-16): <i>9</i> |
1181 |
First cylinder (0-50, default 0): <i>0</i> |
1182 |
Last cylinder (0-50, default 50): <i>50</i> |
1183 |
|
1184 |
<comment>(Re-Create Partition #9, ending just before Partition #1)</comment> |
1185 |
</pre> |
1186 |
|
1187 |
<p> |
1188 |
If you're unsure how to use <c>fdisk</c> have a look down further at the |
1189 |
instructions for partitioning on Cobalts. The concepts are exactly the same -- |
1190 |
just remember to leave the volume header and whole disk partitions alone. |
1191 |
</p> |
1192 |
|
1193 |
<p> |
1194 |
Once this is done, you are safe to create the rest of your partitions as you see |
1195 |
fit. After all your partitions are laid out, make sure you set the partition ID |
1196 |
of your swap partition to <c>82</c>, which is Linux Swap. By default, it will be |
1197 |
<c>83</c>, Linux Native. |
1198 |
</p> |
1199 |
|
1200 |
<p> |
1201 |
Now that your partitions are created, you can now continue with <uri |
1202 |
link="#filesystems">Creating Filesystems</uri>. |
1203 |
</p> |
1204 |
|
1205 |
</body> |
1206 |
</subsection> |
1207 |
|
1208 |
<subsection> |
1209 |
<title>Cobalt Machines: Partitioning your drive</title> |
1210 |
<body> |
1211 |
|
1212 |
<p> |
1213 |
On Cobalt machines, the BOOTROM expects to see a MS-DOS MBR, so partitioning the |
1214 |
drive is relatively straightforward -- in fact, it's done the same way as you'd |
1215 |
do for an Intel x86 machine. <e>However</e> there are some things you need to |
1216 |
bear in mind. |
1217 |
</p> |
1218 |
|
1219 |
<ul> |
1220 |
<li> |
1221 |
Cobalt firmware will expect <path>/dev/hda1</path> to be a Linux partition |
1222 |
formatted <e>EXT2 Revision 0</e>. <e>EXT2 Revision 1 partitions will NOT |
1223 |
WORK!</e> (The Cobalt BOOTROM only understands EXT2r0) |
1224 |
</li> |
1225 |
<li> |
1226 |
The above said partition must contain a gzipped ELF image, |
1227 |
<path>vmlinux.gz</path> in the root of that partition, which it loads as the |
1228 |
kernel |
1229 |
</li> |
1230 |
</ul> |
1231 |
|
1232 |
<p> |
1233 |
For that reason, I recommend creating a ~20MB <path>/boot</path> partition |
1234 |
formatted EXT2r0 upon which you can install CoLo & your kernels. This |
1235 |
allows you to run a modern filesystem (EXT3 or ReiserFS) for your root |
1236 |
filesystem. |
1237 |
</p> |
1238 |
|
1239 |
<p> |
1240 |
I will assume you have created <path>/dev/hda1</path> to mount later as a |
1241 |
<path>/boot</path> partition. If you wish to make this <path>/</path>, you'll |
1242 |
need to keep the PROM's expectations in mind. |
1243 |
</p> |
1244 |
|
1245 |
<p> |
1246 |
So, continuing on... To create the partitions you type <c>fdisk /dev/hda</c> at |
1247 |
the prompt. The main commands you need to know are these: |
1248 |
</p> |
1249 |
|
1250 |
<ul> |
1251 |
<li> |
1252 |
<c>o</c>: Wipe out old partition table, starting with an empty MS-DOS |
1253 |
partition table |
1254 |
</li> |
1255 |
<li> |
1256 |
<c>n</c>: New Partition |
1257 |
</li> |
1258 |
<li> |
1259 |
<c>t</c>: Change Partition Type |
1260 |
<ul> |
1261 |
<li>Use type <c>82</c> for Linux Swap, <c>83</c> for Linux FS</li> |
1262 |
</ul> |
1263 |
</li> |
1264 |
<li> |
1265 |
<c>d</c>: Delete a partition |
1266 |
</li> |
1267 |
<li> |
1268 |
<c>p</c>: Display (print) Partition Table |
1269 |
</li> |
1270 |
<li> |
1271 |
<c>q</c>: Quit -- leaving old partition table as is. |
1272 |
</li> |
1273 |
<li> |
1274 |
<c>w</c>: Quit -- writing partition table in the process. |
1275 |
</li> |
1276 |
</ul> |
1277 |
|
1278 |
<pre caption="Partitioning the disk"> |
1279 |
# <i>fdisk /dev/hda</i> |
1280 |
|
1281 |
The number of cylinders for this disk is set to 19870. |
1282 |
There is nothing wrong with that, but this is larger than 1024, |
1283 |
and could in certain setups cause problems with: |
1284 |
1) software that runs at boot time (e.g., old versions of LILO) |
1285 |
2) booting and partitioning software from other OSs |
1286 |
(e.g., DOS FDISK, OS/2 FDISK) |
1287 |
|
1288 |
<comment>(Start by clearing out any existing partitions)</comment> |
1289 |
Command (m for help): <i>o</i> |
1290 |
Building a new DOS disklabel. Changes will remain in memory only, |
1291 |
until you decide to write them. After that, of course, the previous |
1292 |
content won't be recoverable. |
1293 |
|
1294 |
|
1295 |
The number of cylinders for this disk is set to 19870. |
1296 |
There is nothing wrong with that, but this is larger than 1024, |
1297 |
and could in certain setups cause problems with: |
1298 |
1) software that runs at boot time (e.g., old versions of LILO) |
1299 |
2) booting and partitioning software from other OSs |
1300 |
(e.g., DOS FDISK, OS/2 FDISK) |
1301 |
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) |
1302 |
|
1303 |
<comment>(You can now verify the partition table is empty using the 'p' command)</comment> |
1304 |
|
1305 |
Command (m for help): <i>p</i> |
1306 |
|
1307 |
Disk /dev/hda: 10.2 GB, 10254827520 bytes |
1308 |
16 heads, 63 sectors/track, 19870 cylinders |
1309 |
Units = cylinders of 1008 * 512 = 516096 bytes |
1310 |
|
1311 |
Device Boot Start End Blocks Id System |
1312 |
|
1313 |
<comment>(Create the /boot partition)</comment> |
1314 |
|
1315 |
Command (m for help): <i>n</i> |
1316 |
Command action |
1317 |
e extended |
1318 |
p primary partition (1-4) |
1319 |
<i>p</i> |
1320 |
Partition number (1-4): <i>1</i> |
1321 |
|
1322 |
<comment>(Just press ENTER here to accept the default)</comment> |
1323 |
|
1324 |
First cylinder (1-19870, default 1): |
1325 |
Last cylinder or +size or +sizeM or +sizeK (1-19870, default 19870): <i>+20M</i> |
1326 |
|
1327 |
<comment>(and now if we type 'p' again, we should see the new partition)</comment> |
1328 |
Command (m for help): <i>p</i> |
1329 |
|
1330 |
Disk /dev/hda: 10.2 GB, 10254827520 bytes |
1331 |
16 heads, 63 sectors/track, 19870 cylinders |
1332 |
Units = cylinders of 1008 * 512 = 516096 bytes |
1333 |
|
1334 |
Device Boot Start End Blocks Id System |
1335 |
/dev/hda1 1 40 20128+ 83 Linux |
1336 |
|
1337 |
<comment>(The rest, I prefer to put in an extended partition, so I'll create that)</comment> |
1338 |
|
1339 |
Command (m for help): <i>n</i> |
1340 |
Command action |
1341 |
e extended |
1342 |
p primary partition (1-4) |
1343 |
<i>e</i> |
1344 |
Partition number (1-4): <i>2</i> |
1345 |
|
1346 |
<comment>(Again, the default is fine, just press ENTER.)</comment> |
1347 |
|
1348 |
First cylinder (41-19870, default 41): |
1349 |
Using default value 41 |
1350 |
|
1351 |
<comment>(We want to use the whole disk here, so just press ENTER again)</comment> |
1352 |
Last cylinder or +size or +sizeM or +sizeK (41-19870, default 19870): |
1353 |
Using default value 19870 |
1354 |
|
1355 |
<comment>(Now, the / partition -- I use separate partitions for /usr, /var, |
1356 |
etc... so / can be small. Adjust as per your preference.)</comment> |
1357 |
|
1358 |
Command (m for help): <i>n</i> |
1359 |
Command action |
1360 |
l logical (5 or over) |
1361 |
p primary partition (1-4) |
1362 |
<i>l</i> |
1363 |
First cylinder (41-19870, default 41):<i><Press ENTER></i> |
1364 |
Using default value 41 |
1365 |
Last cylinder or +size or +sizeM or +sizeK (41-19870, default 19870): <i>+500M</i> |
1366 |
|
1367 |
<comment>(... and similar for any other partitions ...)</comment> |
1368 |
|
1369 |
<comment>(Last but not least, the swap space. I recommend at least 250MB swap, |
1370 |
preferrably 1GB)</comment> |
1371 |
|
1372 |
Command (m for help): <i>n</i> |
1373 |
Command action |
1374 |
l logical (5 or over) |
1375 |
p primary partition (1-4) |
1376 |
<i>l</i> |
1377 |
First cylinder (17294-19870, default 17294): <i><Press ENTER></i> |
1378 |
Using default value 17294 |
1379 |
Last cylinder or +size or +sizeM or +sizeK (1011-19870, default 19870): <i><Press ENTER></i> |
1380 |
Using default value 19870 |
1381 |
|
1382 |
<comment>(Now, if we check our partition table, everything should mostly be ship |
1383 |
shape except for one thing...)</comment> |
1384 |
|
1385 |
Command (m for help): <i>p</i> |
1386 |
|
1387 |
Disk /dev/hda: 10.2 GB, 10254827520 bytes |
1388 |
16 heads, 63 sectors/track, 19870 cylinders |
1389 |
Units = cylinders of 1008 * 512 = 516096 bytes |
1390 |
|
1391 |
Device Boot Start End Blocks ID System |
1392 |
/dev/hda1 1 21 10552+ 83 Linux |
1393 |
/dev/hda2 22 19870 10003896 5 Extended |
1394 |
/dev/hda5 22 1037 512032+ 83 Linux |
1395 |
/dev/hda6 1038 5101 2048224+ 83 Linux |
1396 |
/dev/hda7 5102 9165 2048224+ 83 Linux |
1397 |
/dev/hda8 9166 13229 2048224+ 83 Linux |
1398 |
/dev/hda9 13230 17293 2048224+ 83 Linux |
1399 |
/dev/hda10 17294 19870 1298776+ 83 Linux |
1400 |
|
1401 |
<comment>(Notice how #10, our swap partition is still type 83?)</comment> |
1402 |
|
1403 |
Command (m for help): <i>t</i> |
1404 |
Partition number (1-10): <i>10</i> |
1405 |
Hex code (type L to list codes): <i>82</i> |
1406 |
Changed system type of partition 10 to 82 (Linux swap) |
1407 |
|
1408 |
<comment>(That should fix it... just to verify...)</comment> |
1409 |
|
1410 |
Command (m for help): <i>p</i> |
1411 |
|
1412 |
Disk /dev/hda: 10.2 GB, 10254827520 bytes |
1413 |
16 heads, 63 sectors/track, 19870 cylinders |
1414 |
Units = cylinders of 1008 * 512 = 516096 bytes |
1415 |
|
1416 |
Device Boot Start End Blocks ID System |
1417 |
/dev/hda1 1 21 10552+ 83 Linux |
1418 |
/dev/hda2 22 19870 10003896 5 Extended |
1419 |
/dev/hda5 22 1037 512032+ 83 Linux |
1420 |
/dev/hda6 1038 5101 2048224+ 83 Linux |
1421 |
/dev/hda7 5102 9165 2048224+ 83 Linux |
1422 |
/dev/hda8 9166 13229 2048224+ 83 Linux |
1423 |
/dev/hda9 13230 17293 2048224+ 83 Linux |
1424 |
/dev/hda10 17294 19870 1298776+ 82 Linux Swap |
1425 |
|
1426 |
<comment>(Now, we write out the new partition table.)</comment> |
1427 |
|
1428 |
Command (m for help): <i>w</i> |
1429 |
The partition table has been altered! |
1430 |
|
1431 |
Calling ioctl() to re-read partition table. |
1432 |
Syncing disks. |
1433 |
|
1434 |
# |
1435 |
</pre> |
1436 |
|
1437 |
<p> |
1438 |
And that's all there is to it. You should now be right to proceed onto the |
1439 |
next stage: <uri link="#filesystems">Creating Filesystems</uri>. |
1440 |
</p> |
1441 |
|
1442 |
</body> |
1443 |
</subsection> |
1444 |
</section> |
1445 |
|
1446 |
<section id="filesystems"> |
1447 |
<title>Creating Filesystems</title> |
1448 |
<subsection> |
1449 |
<title>Introduction</title> |
1450 |
<body> |
1451 |
|
1452 |
<p> |
1453 |
Now that your partitions are created, it is time to place a filesystem on them. |
1454 |
If you don't care about what filesystem to choose and are happy with what we use |
1455 |
as default in this handbook, continue with <uri |
1456 |
link="#filesystems-apply">Applying a Filesystem to a Partition</uri>. |
1457 |
Otherwise read on to learn about the available filesystems... |
1458 |
</p> |
1459 |
|
1460 |
</body> |
1461 |
</subsection> |
1462 |
<subsection> |
1463 |
<title>Filesystems?</title> |
1464 |
<body> |
1465 |
|
1466 |
<p> |
1467 |
Several filesystems are available. ReiserFS, EXT2 and EXT3 are found stable |
1468 |
on the MIPS architectures, others are experimental. |
1469 |
</p> |
1470 |
|
1471 |
<p> |
1472 |
<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata |
1473 |
journaling, which means that routine ext2 filesystem checks at startup time can |
1474 |
be quite time-consuming. There is now quite a selection of newer-generation |
1475 |
journaled filesystems that can be checked for consistency very quickly and are |
1476 |
thus generally preferred over their non-journaled counterparts. Journaled |
1477 |
filesystems prevent long delays when you boot your system and your filesystem |
1478 |
happens to be in an inconsistent state. |
1479 |
</p> |
1480 |
|
1481 |
<p> |
1482 |
<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata |
1483 |
journaling for fast recovery in addition to other enhanced journaling modes like |
1484 |
full data and ordered data journaling. ext3 is a very good and reliable |
1485 |
filesystem. It has an additional hashed b-tree indexing option that enables |
1486 |
high performance in almost all situations. You can enable this indexing by |
1487 |
adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an |
1488 |
excellent filesystem. |
1489 |
</p> |
1490 |
|
1491 |
<p> |
1492 |
<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall |
1493 |
performance and greatly outperforms both ext2 and ext3 when dealing with small |
1494 |
files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales |
1495 |
extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is |
1496 |
solid and usable as both general-purpose filesystem and for extreme cases such |
1497 |
as the creation of large filesystems, the use of many small files, very large |
1498 |
files and directories containing tens of thousands of files. |
1499 |
</p> |
1500 |
|
1501 |
<p> |
1502 |
<b>XFS</b> is a filesystem with metadata journaling which comes with a robust |
1503 |
feature-set and is optimized for scalability. We only recommend using this |
1504 |
filesystem on Linux systems with high-end SCSI and/or fibre channel storage and |
1505 |
an uninterruptible power supply. Because XFS aggressively caches in-transit data |
1506 |
in RAM, improperly designed programs (those that don't take proper precautions |
1507 |
when writing files to disk and there are quite a few of them) can lose a good |
1508 |
deal of data if the system goes down unexpectedly. |
1509 |
</p> |
1510 |
|
1511 |
<p> |
1512 |
<b>JFS</b> is IBM's high-performance journaling filesystem. It has recently |
1513 |
become production-ready and there hasn't been a sufficient track record to |
1514 |
comment positively nor negatively on its general stability at this point. |
1515 |
</p> |
1516 |
|
1517 |
</body> |
1518 |
</subsection> |
1519 |
<subsection id="filesystems-apply"> |
1520 |
<title>Applying a Filesystem to a Partition</title> |
1521 |
<body> |
1522 |
|
1523 |
<p> |
1524 |
To create a filesystem on a partition or volume, there are tools available for |
1525 |
each possible filesystem: |
1526 |
</p> |
1527 |
|
1528 |
<table> |
1529 |
<tr> |
1530 |
<th>Filesystem</th> |
1531 |
<th>Creation Command</th> |
1532 |
</tr> |
1533 |
<tr> |
1534 |
<ti>ext2</ti> |
1535 |
<ti><c>mke2fs</c></ti> |
1536 |
</tr> |
1537 |
<tr> |
1538 |
<ti>ext3</ti> |
1539 |
<ti><c>mke2fs -j</c></ti> |
1540 |
</tr> |
1541 |
<tr> |
1542 |
<ti>reiserfs</ti> |
1543 |
<ti><c>mkreiserfs</c></ti> |
1544 |
</tr> |
1545 |
<tr> |
1546 |
<ti>xfs</ti> |
1547 |
<ti><c>mkfs.xfs</c></ti> |
1548 |
</tr> |
1549 |
<tr> |
1550 |
<ti>jfs</ti> |
1551 |
<ti><c>mkfs.jfs</c></ti> |
1552 |
</tr> |
1553 |
</table> |
1554 |
|
1555 |
<p> |
1556 |
For instance, to have the boot partition (<path>/dev/sda1</path> in our |
1557 |
example) in ext2 and the root partition (<path>/dev/sda3</path> in our example) |
1558 |
in ext3, you would use: |
1559 |
</p> |
1560 |
|
1561 |
<pre caption="Applying a filesystem on a partition"> |
1562 |
# <i>mke2fs /dev/sda1</i> |
1563 |
# <i>mke2fs -j /dev/sda3</i> |
1564 |
</pre> |
1565 |
|
1566 |
<p> |
1567 |
Now create the filesystems on your newly created partitions (or logical |
1568 |
volumes). |
1569 |
</p> |
1570 |
|
1571 |
<warn> |
1572 |
If you're installing on a Cobalt server, remember <path>/dev/hda1</path> MUST be |
1573 |
of type <e>EXT2 revision 0</e>; Anything else (e.g. EXT2 revision 1, EXT3, |
1574 |
ReiserFS, XFS, JFS and others) <e>WILL NOT WORK!</e> |
1575 |
You can format the partition using the command: <c>mke2fs -r 0 /dev/hda1</c>. |
1576 |
</warn> |
1577 |
|
1578 |
<warn> |
1579 |
Also, be aware that arcboot currently is not able to read any filesystem other |
1580 |
than EXT2, EXT3 and ISO9660 (recent versions). For that reason, |
1581 |
<path>/boot</path> on SGI machines must also reside on an EXT2 or EXT3 partition. |
1582 |
</warn> |
1583 |
|
1584 |
</body> |
1585 |
</subsection> |
1586 |
<subsection> |
1587 |
<title>Activating the Swap Partition</title> |
1588 |
<body> |
1589 |
|
1590 |
<p> |
1591 |
<c>mkswap</c> is the command that is used to create and initialize swap partitions: |
1592 |
</p> |
1593 |
|
1594 |
<pre caption="Creating a Swap signature"> |
1595 |
# <i>mkswap /dev/sda2</i> |
1596 |
</pre> |
1597 |
|
1598 |
<p> |
1599 |
To activate the swap partition, use <c>swapon</c>: |
1600 |
</p> |
1601 |
|
1602 |
<pre caption="Activating the swap partition"> |
1603 |
# <i>swapon /dev/sda2</i> |
1604 |
</pre> |
1605 |
|
1606 |
<p> |
1607 |
Create and activate the swap with the commands mentioned above. |
1608 |
</p> |
1609 |
|
1610 |
</body> |
1611 |
</subsection> |
1612 |
</section> |
1613 |
<section> |
1614 |
<title>Mounting</title> |
1615 |
<body> |
1616 |
|
1617 |
<p> |
1618 |
Now that your partitions are initialized and are housing a filesystem, it is |
1619 |
time to mount those partitions. Use the <c>mount</c> command. Don't forget to |
1620 |
create the necessary mount directories for every partition you created. As an |
1621 |
example we mount the root and boot partition: |
1622 |
</p> |
1623 |
|
1624 |
<pre caption="Mounting partitions"> |
1625 |
# <i>mount /dev/sda3 /mnt/gentoo</i> |
1626 |
# <i>mkdir /mnt/gentoo/boot</i> |
1627 |
# <i>mount /dev/sda1 /mnt/gentoo/boot</i> |
1628 |
</pre> |
1629 |
|
1630 |
<note> |
1631 |
If you want your <path>/tmp</path> to reside on a separate partition, be sure to |
1632 |
change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This |
1633 |
also holds for <path>/var/tmp</path>. |
1634 |
</note> |
1635 |
|
1636 |
<p> |
1637 |
We will also have to mount the proc filesystem (a virtual interface with the |
1638 |
kernel) on <path>/proc</path>. But first we will need to place our files on the partitions. |
1639 |
</p> |
1640 |
|
1641 |
<p> |
1642 |
Continue with <uri link="?part=1&chap=5">Installing the Gentoo |
1643 |
Installation Files</uri>. |
1644 |
</p> |
1645 |
|
1646 |
</body> |
1647 |
</section> |
1648 |
</sections> |
1649 |
|
1650 |
|
1651 |
|
1652 |
1.1 xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-kernel.xml |
1653 |
|
1654 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-kernel.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
1655 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-kernel.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo |
1656 |
|
1657 |
Index: hb-install-mips-kernel.xml |
1658 |
=================================================================== |
1659 |
<?xml version='1.0' encoding='UTF-8'?> |
1660 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
1661 |
|
1662 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
1663 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
1664 |
|
1665 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-kernel.xml,v 1.1 2006/02/12 13:54:32 nightmorph Exp $ --> |
1666 |
|
1667 |
<sections> |
1668 |
|
1669 |
<version>1.15</version> |
1670 |
<date>2006-01-06</date> |
1671 |
|
1672 |
<section> |
1673 |
<title>Timezone</title> |
1674 |
<body> |
1675 |
|
1676 |
<p> |
1677 |
You first need to select your timezone so that your system knows where it is |
1678 |
located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy |
1679 |
it to <path>/etc/localtime</path>. Please avoid the |
1680 |
<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not |
1681 |
indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8. |
1682 |
</p> |
1683 |
|
1684 |
<pre caption="Setting the timezone information to GMT"> |
1685 |
# <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i> |
1686 |
</pre> |
1687 |
|
1688 |
</body> |
1689 |
</section> |
1690 |
<section> |
1691 |
<title>Installing the Sources</title> |
1692 |
<subsection> |
1693 |
<title>Choosing a Kernel</title> |
1694 |
<body> |
1695 |
|
1696 |
<p> |
1697 |
The core around which all distributions are built is the Linux kernel. It is the |
1698 |
layer between the user programs and your system hardware. Gentoo provides its |
1699 |
users several possible kernel sources. A full listing with description is |
1700 |
available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel |
1701 |
Guide</uri>. |
1702 |
</p> |
1703 |
|
1704 |
<p> |
1705 |
MIPS-based systems can choose from <c>mips-sources</c> (the default kernel |
1706 |
source for the MIPS architecture) and <c>mips-prepatch-sources</c> (prerelease |
1707 |
kernel tree). |
1708 |
</p> |
1709 |
|
1710 |
<p> |
1711 |
Choose your kernel source and install it using <c>emerge</c>. Of course |
1712 |
substitute with your choice of sources, this is merely an example. The |
1713 |
<c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other |
1714 |
dependencies at this point. <c>USE="symlink"</c> is not necessary for a new |
1715 |
install, but ensures proper creation of the <path>/usr/src/linux</path> |
1716 |
symlink. |
1717 |
</p> |
1718 |
|
1719 |
<note> |
1720 |
Special patches are needed to make a kernel work on Cobalt servers. The |
1721 |
<c>cobalt</c> USE flag must be defined in order to grab the necessary patches |
1722 |
and apply them. |
1723 |
</note> |
1724 |
|
1725 |
<pre caption="Installing a kernel source"> |
1726 |
<comment>(For SGI machines)</comment> |
1727 |
# <i>USE="-doc symlink" emerge mips-sources</i> |
1728 |
|
1729 |
<comment>(For Cobalt machines)</comment> |
1730 |
# <i>mkdir -p /etc/portage</i> |
1731 |
# <i>echo "sys-kernel/mips-sources cobalt" >> /etc/portage/package.use</i> |
1732 |
# <i>USE="-doc symlink" emerge mips-sources</i> |
1733 |
</pre> |
1734 |
|
1735 |
<p> |
1736 |
When you take a look in <path>/usr/src</path> you should see a symlink called |
1737 |
<path>linux</path> pointing to your kernel source. In this case, the installed |
1738 |
kernel source points to <c>mips-sources-2.4.24</c>. Your version may be |
1739 |
different, so keep this in mind. |
1740 |
</p> |
1741 |
|
1742 |
<pre caption="Viewing the kernel source symlink"> |
1743 |
# <i>ls -l /usr/src/linux</i> |
1744 |
lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-2.4.24 |
1745 |
</pre> |
1746 |
|
1747 |
<p> |
1748 |
Now it is time to configure and compile your kernel source. |
1749 |
</p> |
1750 |
|
1751 |
</body> |
1752 |
</subsection> |
1753 |
</section> |
1754 |
<section> |
1755 |
<title>Kernel Compilation & Installation</title> |
1756 |
<subsection> |
1757 |
<title>Introduction</title> |
1758 |
<body> |
1759 |
|
1760 |
<p> |
1761 |
Previously, we went through the manual configuration of how to set up the kernel |
1762 |
sources. Instead, we have uploaded a number of sample configurations which you |
1763 |
can base your configuration upon. Simply click on the closest option that |
1764 |
matches your system and kernel version. You may also find other configuration |
1765 |
samples at the URLs mentioned below. |
1766 |
</p> |
1767 |
|
1768 |
<table> |
1769 |
<tr> |
1770 |
<th>System</th> |
1771 |
<th>Kernel Version</th> |
1772 |
</tr> |
1773 |
<tr> |
1774 |
<ti>SGI IP22 (Indy, Indigo 2, Challenge S)</ti> |
1775 |
<ti> |
1776 |
<uri link="http://www.longlandclan.hopto.org/~stuartl/mips-linux/sgi/ip22/config/2.4.29-mipscvs-20050130.gz">2.4.29</uri> |
1777 |
</ti> |
1778 |
</tr> |
1779 |
<tr> |
1780 |
<ti>Cobalt Qube/Raq 2800</ti> |
1781 |
<ti> |
1782 |
<uri link="http://dev.gentoo.org/~kumba/mips/cobalt/kernel/cobalt-2605.config">2.6.5</uri> |
1783 |
<uri link="http://dev.gentoo.org/~kumba/mips/cobalt/kernel/cobalt-2606.config">2.6.6</uri> |
1784 |
<uri link="http://dev.gentoo.org/~kumba/mips/cobalt/kernel/cobalt-config-2609">2.6.9</uri> |
1785 |
</ti> |
1786 |
</tr> |
1787 |
</table> |
1788 |
|
1789 |
<ul> |
1790 |
<li> |
1791 |
IP22 (Indy, Indigo2, Challenge S) Configurations: |
1792 |
<uri link="http://www.longlandclan.hopto.org/~stuartl/mips-linux/sgi/ip22/config"> |
1793 |
http://www.longlandclan.hopto.org/~stuartl/mips-linux/sgi/ip22/config |
1794 |
</uri> |
1795 |
</li> |
1796 |
<li> |
1797 |
Cobalt Server Configurations: |
1798 |
<uri link="http://dev.gentoo.org/~kumba/mips"> |
1799 |
http://dev.gentoo.org/~kumba/mips |
1800 |
</uri> |
1801 |
</li> |
1802 |
</ul> |
1803 |
|
1804 |
<note> |
1805 |
More kernel configuration examples can be found on the Gentoo/MIPS Hardware |
1806 |
Support Database, which is located at |
1807 |
<uri>http://stuartl.longlandclan.hopto.org/gentoo/mips</uri>. |
1808 |
</note> |
1809 |
|
1810 |
<p> |
1811 |
Once you have found a configuration, download it into your kernel source |
1812 |
directory, and rename it to <path>.config</path>. From there, you can run |
1813 |
<c>make oldconfig</c> to bring everything up to date, and allow you to customise |
1814 |
the configuration before compiling. |
1815 |
</p> |
1816 |
|
1817 |
<pre caption="Configuring the kernel"> |
1818 |
# <i>cd /usr/src/linux</i> |
1819 |
# <i>cp /path/to/example-config .config</i> |
1820 |
# <i>make oldconfig</i> |
1821 |
<comment>(Just press ENTER at each prompt to accept the defaults... we'll customise later)</comment> |
1822 |
# <i>make menuconfig</i> |
1823 |
</pre> |
1824 |
|
1825 |
</body> |
1826 |
</subsection> |
1827 |
<subsection id="compiling"> |
1828 |
<title>Compiling and Installing</title> |
1829 |
<body> |
1830 |
|
1831 |
<p> |
1832 |
Now that your kernel is configured, it is time to compile and install it. Exit |
1833 |
the configuration and start the compilation process: |
1834 |
</p> |
1835 |
|
1836 |
<pre caption="Compiling the kernel"> |
1837 |
<comment>(For 2.4 kernel)</comment> |
1838 |
# <i>make dep && make vmlinux modules modules_install</i> |
1839 |
|
1840 |
<comment>(For 2.6 kernel)</comment> |
1841 |
# <i>make && make modules_install</i> |
1842 |
</pre> |
1843 |
|
1844 |
<p> |
1845 |
When the kernel has finished compiling, copy the kernel image to |
1846 |
<path>/boot</path>. |
1847 |
</p> |
1848 |
|
1849 |
<note> |
1850 |
On Cobalt servers, the bootloader will expect to see a compressed kernel image. |
1851 |
Remember to <c>gzip -9</c> the file once it is in <path>/boot</path>. In the |
1852 |
following example, replace <path><kernel-version></path> with your kernel |
1853 |
version. |
1854 |
</note> |
1855 |
|
1856 |
<pre caption="Installing the kernel"> |
1857 |
# <i>cp vmlinux /boot/<kernel-version<</i> |
1858 |
<comment>(Cobalt Servers -- Compressing the kernel image)</comment> |
1859 |
# <i>gzip -9v /boot/<kernel-version<</i> |
1860 |
</pre> |
1861 |
|
1862 |
<!-- |
1863 |
Moot point, now that we use arcboot on SGI, and CoLo on Cobalts |
1864 |
<p> |
1865 |
If your system doesn't boot ELF kernels, compile the |
1866 |
kernel using <c>make vmlinux.ecoff</c> instead of <c>make vmlinux</c>. The |
1867 |
kernel image will be saved as <path>arch/mips/boot/vmlinux.ecoff</path> instead |
1868 |
of <path>vmlinux</path>. |
1869 |
</p> |
1870 |
--> |
1871 |
</body> |
1872 |
</subsection> |
1873 |
</section> |
1874 |
<section id="kernel_modules"> |
1875 |
<title>Installing Separate Kernel Modules</title> |
1876 |
<subsection> |
1877 |
<title>Configuring the Modules</title> |
1878 |
<body> |
1879 |
|
1880 |
<p> |
1881 |
You should list the modules you want automatically loaded in one of the relevant |
1882 |
files listed below. You can add extra options to the modules too if you want. |
1883 |
</p> |
1884 |
|
1885 |
<ul> |
1886 |
<li><path>/etc/modules.autoload.d/kernel-2.4</path> - Kernel 2.4 only</li> |
1887 |
<li><path>/etc/modules.autoload.d/kernel-2.6</path> - Kernel 2.6 only</li> |
1888 |
<li><path>/etc/modules.autoload</path> - All Kernels</li> |
1889 |
</ul> |
1890 |
|
1891 |
<p> |
1892 |
Therefore, if you have a kernel module that you want to load -- which is common |
1893 |
to both 2.4 and 2.6, then place it in <path>/etc/modules.autoload</path>. |
1894 |
Otherwise it can be placed in the appropriate file. |
1895 |
</p> |
1896 |
|
1897 |
<p> |
1898 |
To view all available modules, run the following <c>find</c> command. Don't |
1899 |
forget to substitute "<kernel version>" with the version of the kernel you |
1900 |
just compiled: |
1901 |
</p> |
1902 |
|
1903 |
<pre caption="Viewing all available modules"> |
1904 |
# <i>find /lib/modules/<kernel version>/ -type f -iname '*.o' -or -iname '*.ko'</i> |
1905 |
</pre> |
1906 |
|
1907 |
<p> |
1908 |
For instance, to automatically load the <c>3c59x.o</c> module, edit the |
1909 |
appropriate file and enter the module name in it. |
1910 |
</p> |
1911 |
|
1912 |
<pre caption="Editing /etc/modules.autoload.d/kernel-2.4"> |
1913 |
# <i>nano -w /etc/modules.autoload.d/kernel-2.4</i> |
1914 |
</pre> |
1915 |
|
1916 |
<pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6"> |
1917 |
3c59x |
1918 |
</pre> |
1919 |
|
1920 |
<p> |
1921 |
This can be also done in a one-liner: |
1922 |
</p> |
1923 |
|
1924 |
<pre caption="Adding a module -- the one-liner method"> |
1925 |
# <i>echo '3c59x' >> /etc/modules.autoload.d/kernel-2.4</i> |
1926 |
<comment>(or kernel-2.6, or /etc/modules.autoload...)</comment> |
1927 |
</pre> |
1928 |
|
1929 |
<p> |
1930 |
Continue the installation with <uri link="?part=1&chap=8">Configuring |
1931 |
your System</uri>. |
1932 |
</p> |
1933 |
|
1934 |
</body> |
1935 |
</subsection> |
1936 |
</section> |
1937 |
</sections> |
1938 |
|
1939 |
|
1940 |
|
1941 |
1.1 xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-medium.xml |
1942 |
|
1943 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-medium.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
1944 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-medium.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo |
1945 |
|
1946 |
Index: hb-install-mips-medium.xml |
1947 |
=================================================================== |
1948 |
<?xml version='1.0' encoding='UTF-8'?> |
1949 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
1950 |
|
1951 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
1952 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
1953 |
|
1954 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-medium.xml,v 1.1 2006/02/12 13:54:32 nightmorph Exp $ --> |
1955 |
|
1956 |
<sections> |
1957 |
|
1958 |
<version>1.11</version> |
1959 |
<date>2005-11-11</date> |
1960 |
|
1961 |
<section> |
1962 |
<title>Hardware Requirements</title> |
1963 |
<subsection> |
1964 |
<title>Introduction</title> |
1965 |
<body> |
1966 |
|
1967 |
<p> |
1968 |
Before we start, we first list what hardware requirements you need to |
1969 |
successfully install Gentoo on your box. |
1970 |
</p> |
1971 |
|
1972 |
</body> |
1973 |
</subsection> |
1974 |
<subsection> |
1975 |
<title>Hardware Requirements</title> |
1976 |
<body> |
1977 |
|
1978 |
<table> |
1979 |
<tr> |
1980 |
<th>Memory</th> |
1981 |
<ti>64 MB</ti> |
1982 |
</tr> |
1983 |
<tr> |
1984 |
<th>Diskspace</th> |
1985 |
<ti>1.5 GB (excluding swap space)</ti> |
1986 |
</tr> |
1987 |
<tr> |
1988 |
<th>Swap space</th> |
1989 |
<ti>At least 256 MB</ti> |
1990 |
</tr> |
1991 |
</table> |
1992 |
|
1993 |
<p> |
1994 |
You should also check the <uri link="/doc/en/mips-requirements.xml">MIPS |
1995 |
Hardware Requirements</uri> document available from our website. |
1996 |
</p> |
1997 |
|
1998 |
</body> |
1999 |
</subsection> |
2000 |
</section> |
2001 |
|
2002 |
<section> |
2003 |
<title>Installation Notes</title> |
2004 |
<subsection> |
2005 |
<title>A note about Processor Architectures</title> |
2006 |
<body> |
2007 |
|
2008 |
<p> |
2009 |
On many architectures, the processor has gone through several generations, each |
2010 |
newer generation builds on the foundation of the previous one. MIPS is no |
2011 |
exception. There are several generations of CPU covered under the MIPS |
2012 |
architecture. In order to choose your netboot image stage tarball and |
2013 |
<c>CFLAGS</c> appropriately, you need to be aware of which family your system's |
2014 |
CPU belongs in. These families are referred to as the <b>I</b>nstruction |
2015 |
<b>S</b>et <b>A</b>rchitecture. |
2016 |
</p> |
2017 |
|
2018 |
<table> |
2019 |
<tr> |
2020 |
<th>MIPS ISA</th> |
2021 |
<th>32/64-bit</th> |
2022 |
<th>CPUs Covered</th> |
2023 |
</tr> |
2024 |
<tr> |
2025 |
<ti>MIPS 1</ti> |
2026 |
<ti>32-bit</ti> |
2027 |
<ti> |
2028 |
<uri link="http://www.linux-mips.org/wiki/index.php/R2000">R2000</uri>, |
2029 |
<uri link="http://www.linux-mips.org/wiki/index.php/R2000">R3000</uri> |
2030 |
</ti> |
2031 |
</tr> |
2032 |
<tr> |
2033 |
<ti>MIPS 2</ti> |
2034 |
<ti>32-bit</ti> |
2035 |
<ti> |
2036 |
<uri link="http://www.linux-mips.org/wiki/index.php/R6000">R6000</uri> |
2037 |
</ti> |
2038 |
</tr> |
2039 |
<tr> |
2040 |
<ti>MIPS 3</ti> |
2041 |
<ti>64-bit</ti> |
2042 |
<ti> |
2043 |
<uri link="http://www.linux-mips.org/wiki/index.php/R4000">R4000</uri>, |
2044 |
<uri link="http://www.linux-mips.org/wiki/index.php/R4000">R4400</uri>, |
2045 |
<uri link="http://www.linux-mips.org/wiki/index.php/R4000">R4600</uri>, |
2046 |
<uri link="http://www.linux-mips.org/wiki/index.php/R4000">R4700</uri> |
2047 |
</ti> |
2048 |
</tr> |
2049 |
<tr> |
2050 |
<ti>MIPS 4</ti> |
2051 |
<ti>64-bit</ti> |
2052 |
<ti> |
2053 |
<uri link="http://www.linux-mips.org/wiki/index.php/R5000">R5000</uri>, |
2054 |
<uri link="http://www.linux-mips.org/wiki/index.php/R5000">RM5000</uri>, |
2055 |
<uri link="http://www.linux-mips.org/wiki/index.php/RM7000">RM7000</uri> |
2056 |
<uri link="http://www.linux-mips.org/wiki/index.php/R8000">R8000</uri>, |
2057 |
<uri link="http://www.linux-mips.org/wiki/index.php/R10000">R10000</uri>, |
2058 |
<uri link="http://www.linux-mips.org/wiki/index.php/R10000">R12000</uri>, |
2059 |
<uri link="http://www.linux-mips.org/wiki/index.php/R10000">R14000</uri>, |
2060 |
<uri link="http://www.linux-mips.org/wiki/index.php/R10000">R16000</uri> |
2061 |
</ti> |
2062 |
</tr> |
2063 |
<tr> |
2064 |
<ti>MIPS 5</ti> |
2065 |
<ti>64-bit</ti> |
2066 |
<ti> |
2067 |
None As Yet |
2068 |
</ti> |
2069 |
</tr> |
2070 |
</table> |
2071 |
|
2072 |
<p> |
2073 |
Also, another important concept to grasp is the concept of <b>endianness</b>. |
2074 |
Endianness refers to the way that a CPU reads words from main memory. A word |
2075 |
can be read as either <e>big</e> endian (most significant bit first), or |
2076 |
<e>little</e> endian (least significant bit first). Intel x86 machines are |
2077 |
generally Little endian, whilst Apple and Sparc machines are Big Endian. On |
2078 |
MIPS, they can be either. To separate them apart, we append <c>el</c> to the |
2079 |
architecture name to denote little endian. |
2080 |
</p> |
2081 |
|
2082 |
<table> |
2083 |
<tr> |
2084 |
<th>Architecture</th> |
2085 |
<th>32/64-bit</th> |
2086 |
<th>Endianness</th> |
2087 |
<th>Machines covered</th> |
2088 |
</tr> |
2089 |
<tr> |
2090 |
<ti><c>mips</c></ti> |
2091 |
<ti>32-bit</ti> |
2092 |
<ti>Big Endian</ti> |
2093 |
<ti>Silicon Graphics</ti> |
2094 |
</tr> |
2095 |
<tr> |
2096 |
<ti><c>mipsel</c></ti> |
2097 |
<ti>32-bit</ti> |
2098 |
<ti>Little Endian</ti> |
2099 |
<ti>DECStations, Cobalt Servers, PlayStation 2</ti> |
2100 |
</tr> |
2101 |
<tr> |
2102 |
<ti><c>mips64</c></ti> |
2103 |
<ti>64-bit</ti> |
2104 |
<ti>Big Endian</ti> |
2105 |
<ti>Silicon Graphics</ti> |
2106 |
</tr> |
2107 |
<tr> |
2108 |
<ti><c>mips64el</c></ti> |
2109 |
<ti>64-bit</ti> |
2110 |
<ti>Little Endian</ti> |
2111 |
<ti>Cobalt Servers, PlayStation 2</ti> |
2112 |
</tr> |
2113 |
</table> |
2114 |
|
2115 |
<p> |
2116 |
For those willing to learn more about ISAs, the following websites may be |
2117 |
of assistance. |
2118 |
</p> |
2119 |
|
2120 |
<ul> |
2121 |
<li> |
2122 |
<uri link="http://www.linux-mips.org/wiki/index.php/Instruction_Set_Architecture"> |
2123 |
Linux/MIPS Website: MIPS ISA |
2124 |
</uri> |
2125 |
</li> |
2126 |
<li> |
2127 |
<uri link="http://www.linux-mips.org/wiki/index.php/Endianess"> |
2128 |
Linux/MIPS Website: Endianness |
2129 |
</uri> |
2130 |
</li> |
2131 |
<li> |
2132 |
<uri link="http://www.linux-mips.org/wiki/index.php/Processors"> |
2133 |
Linux/MIPS Website: Processors |
2134 |
</uri> |
2135 |
</li> |
2136 |
<li> |
2137 |
<uri link="http://en.wikipedia.org/wiki/Instruction_set"> |
2138 |
Wikipedia: Instruction Set |
2139 |
</uri> |
2140 |
</li> |
2141 |
</ul> |
2142 |
|
2143 |
</body> |
2144 |
</subsection> |
2145 |
<subsection> |
2146 |
<title>The Stage3 Tarball</title> |
2147 |
<body> |
2148 |
|
2149 |
<p> |
2150 |
A stage3 tarball is an archive containing a minimal Gentoo environment, suitable |
2151 |
to continue the Gentoo installation using the instructions in this manual. |
2152 |
Previously, the Gentoo Handbook described the installation using one of three |
2153 |
stage tarballs. While Gentoo still offers stage1 and stage2 tarballs, the |
2154 |
official installation method uses the stage3 tarball. If you are interested in |
2155 |
performing a Gentoo installation using a stage1 or stage2 tarball, please read |
2156 |
the Gentoo FAQ on <uri link="/doc/en/faq.xml#stage12">How do I Install Gentoo |
2157 |
Using a Stage1 or Stage2 Tarball?</uri> |
2158 |
</p> |
2159 |
|
2160 |
</body> |
2161 |
</subsection> |
2162 |
</section> |
2163 |
|
2164 |
<section> |
2165 |
<title>Netbooting Overview</title> |
2166 |
<subsection> |
2167 |
<body> |
2168 |
|
2169 |
<p> |
2170 |
In this section, we'll cover what you need in order to successfully network boot |
2171 |
a Silicon Graphics workstation or Cobalt Server appliance. This is just a brief |
2172 |
guide, it is not intended to be thorough, for more information, I recommend |
2173 |
reading the <uri link="/doc/en/diskless-howto.xml">Diskless |
2174 |
HOWTO</uri>. |
2175 |
</p> |
2176 |
|
2177 |
<p> |
2178 |
What You Need: Depending on the machine, there is a certain amount of |
2179 |
hardware that you'll need in order to successfully netboot and install Linux. |
2180 |
</p> |
2181 |
|
2182 |
<ul> |
2183 |
<li> |
2184 |
In General: |
2185 |
<ul> |
2186 |
<li>DHCP/BOOTP server (ISC DHCPd recommended)</li> |
2187 |
<li>Patience -- and lots of it</li> |
2188 |
</ul> |
2189 |
</li> |
2190 |
<li> |
2191 |
For Silicon Graphics workstations: |
2192 |
<ul> |
2193 |
<li>TFTP server (tftp-hpa recommended)</li> |
2194 |
<li> |
2195 |
If you want/need to use serial console: |
2196 |
<ul> |
2197 |
<li>MiniDIN8 --> RS-232 serial cable</li> |
2198 |
<li>Null-modem cable</li> |
2199 |
<li>VT100 or ANSI compatable terminal capable of 9600 baud</li> |
2200 |
</ul> |
2201 |
</li> |
2202 |
</ul> |
2203 |
</li> |
2204 |
<li> |
2205 |
For Cobalt Servers (NOT the original Qube): |
2206 |
<ul> |
2207 |
<li>NFS server</li> |
2208 |
<li>Null-modem cable</li> |
2209 |
<li>VT100 or ANSI compatable terminal capable of 115200 baud</li> |
2210 |
</ul> |
2211 |
</li> |
2212 |
</ul> |
2213 |
|
2214 |
<note> |
2215 |
SGI machines use a MiniDIN 8 connector for the serial ports. Apparently Apple |
2216 |
modem cables work just fine as serial cables, but with Apple machines being |
2217 |
equipped with USB & internal modems, these are getting harder to |
2218 |
find. A number of sites describe how to make these cables (Google is your |
2219 |
friend). The following site describes making such a cable. It's in German, |
2220 |
but has a reasonably good wiring diagram. |
2221 |
<uri link="http://www.arbeitsplatzvernichtung-durch-outsourcing.de/marty44/sgihard.html"> |
2222 |
http://www.arbeitsplatzvernichtung-durch-outsourcing.de/marty44/sgihard.html |
2223 |
</uri> |
2224 |
</note> |
2225 |
|
2226 |
<note> |
2227 |
For the terminal, this could be a real VT100/ANSI terminal, or it could be a PC |
2228 |
running terminal emulation software (such as HyperTerminal, Minicom, seyon, |
2229 |
Telex, xc, screen -- whatever your preference). It doesn't matter what platform |
2230 |
this machine runs -- just so long as it has one RS-232 serial port you can use, |
2231 |
and appropriate software. |
2232 |
</note> |
2233 |
|
2234 |
<note> |
2235 |
Note that this guide does NOT cover the original Qube. The original Qube server |
2236 |
appliance lacks a serial port in its default configuration, and therefore it is |
2237 |
not possible to install Gentoo onto it without the aid of a screwdriver and a |
2238 |
surrogate machine to do the installation. |
2239 |
The following site has a guide for installing Gentoo on these machines. |
2240 |
<uri link="http://www.metzner.org/projects/qube/"> |
2241 |
http://www.metzner.org/projects/qube/ |
2242 |
</uri> |
2243 |
</note> |
2244 |
</body> |
2245 |
</subsection> |
2246 |
<subsection> |
2247 |
<title>Setting up TFTP and DHCP -- a brief guide</title> |
2248 |
<body> |
2249 |
|
2250 |
<p> |
2251 |
Okay, so you've got your bits and pieces together, now to set everything up. As |
2252 |
I mentioned earlier -- this is not a complete guide, this is a bare-bones config |
2253 |
that will just get things rolling. You can either use this when starting a |
2254 |
setup from scratch, or use the suggestions to amend your existing setup to |
2255 |
support netbooting. |
2256 |
</p> |
2257 |
|
2258 |
<p> |
2259 |
It is worth noting that the servers used need not be running Gentoo Linux, you |
2260 |
could quite reasonably use FreeBSD or any Unix-like platform. However, this |
2261 |
guide will assume you are running Gentoo Linux. You also may run TFTP/NFS on a |
2262 |
separate machine to the DHCP server if desired. |
2263 |
</p> |
2264 |
|
2265 |
<p> |
2266 |
First Step -- configuring DHCP. In order for the ISC DHCP daemon to respond |
2267 |
to BOOTP requests (as required by the SGI & Cobalt BOOTROM) you need to |
2268 |
first enable dynamic BOOTP on the address range in use; then set up an entry for |
2269 |
each client with pointers to the boot image. |
2270 |
</p> |
2271 |
|
2272 |
<pre caption="Installing ISCs DHCP"> |
2273 |
# <i>emerge dhcp</i> |
2274 |
</pre> |
2275 |
|
2276 |
<p> |
2277 |
Once installed you need to create the <path>/etc/dhcp/dhcpd.conf</path>. Here's |
2278 |
a bare-bones config to get you started. |
2279 |
</p> |
2280 |
|
2281 |
<pre caption="Bare Bones dhcpd.conf"> |
2282 |
<comment># Tell dhcpd to disable dynamic DNS.</comment> |
2283 |
<comment># dhcpd will refuse to start without this.</comment> |
2284 |
ddns-update-style none; |
2285 |
|
2286 |
<comment># Create a subnet:</comment> |
2287 |
subnet <i>192.168.10.0</i> netmask <i>255.255.255.0</i> { |
2288 |
<comment># Address pool for our booting clients. Don't forget the 'dynamic-bootp' bit!</comment> |
2289 |
pool { |
2290 |
range dynamic-bootp <i>192.168.10.1 192.168.10.254</i>; |
2291 |
} |
2292 |
|
2293 |
<comment># DNS servers and default gateway -- substitute as appropriate</comment> |
2294 |
option domain-name-servers <i>203.1.72.96</i>, <i>202.47.56.17</i>; |
2295 |
option routers <i>192.168.10.1</i>; |
2296 |
|
2297 |
<comment># Tell the DHCP server it's authoritative for this subnet.</comment> |
2298 |
authoritative; |
2299 |
|
2300 |
<comment># Allow BOOTP to be used on this subnet.</comment> |
2301 |
allow bootp; |
2302 |
} |
2303 |
</pre> |
2304 |
|
2305 |
<p> |
2306 |
With that setup, one can then add any number of clients within the subnet |
2307 |
clause. We will cover what you need to put in later in this guide. |
2308 |
</p> |
2309 |
|
2310 |
<p> |
2311 |
Next Step -- Setting up TFTP server. For the purposes of this guide, I'll |
2312 |
restrict this to the tftp-hpa TFTP daemon. I use this myself on SGI machines, |
2313 |
Cobalt servers and PXE clients alike without any hassle. Installation and |
2314 |
configuration is fairly straightforward: |
2315 |
</p> |
2316 |
|
2317 |
<pre caption="Installing tftp-hpa"> |
2318 |
# <i>emerge net-ftp/tftp-hpa</i> |
2319 |
</pre> |
2320 |
|
2321 |
<p> |
2322 |
Now, I personally like to move my <path>/tftpboot</path> directory into |
2323 |
<path>/home</path> where I have more space. This is totally optional, and can |
2324 |
be configured through the <path>/etc/conf.d/in.tftpd</path> file. For the |
2325 |
purposes of this guide, I'll assume you've left it in the default place. |
2326 |
</p> |
2327 |
|
2328 |
<p> |
2329 |
Now that everything is configured, we're ready to move onto the fun bit -- |
2330 |
tayloring our config to suit the machine we wish to netboot. |
2331 |
</p> |
2332 |
|
2333 |
</body> |
2334 |
</subsection> |
2335 |
</section> |
2336 |
<section> |
2337 |
<title>Netbooting on SGI Workstations</title> |
2338 |
<subsection> |
2339 |
<title>Downloading a Netboot image</title> |
2340 |
<body> |
2341 |
|
2342 |
<p> |
2343 |
Depending on the system you're installing for, there are several possible images |
2344 |
available for download. These are all labelled according to the system type and |
2345 |
CPU they are compiled for. The machine types are as follows: |
2346 |
</p> |
2347 |
|
2348 |
<table> |
2349 |
<tr> |
2350 |
<th>Codename</th> |
2351 |
<th>Machines</th> |
2352 |
</tr> |
2353 |
<tr> |
2354 |
<ti>IP22</ti> |
2355 |
<ti>Indy, *Indigo 2, **Challenge S</ti> |
2356 |
</tr> |
2357 |
<tr> |
2358 |
<ti>IP26</ti> |
2359 |
<ti>*Indigo 2 Power</ti> |
2360 |
</tr> |
2361 |
<tr> |
2362 |
<ti>IP27</ti> |
2363 |
<ti>Origin 200, Origin 2000</ti> |
2364 |
</tr> |
2365 |
<tr> |
2366 |
<ti>IP28</ti> |
2367 |
<ti>*Indigo 2 Impact</ti> |
2368 |
</tr> |
2369 |
<tr> |
2370 |
<ti>IP30</ti> |
2371 |
<ti>Octane</ti> |
2372 |
</tr> |
2373 |
<tr> |
2374 |
<ti>IP32</ti> |
2375 |
<ti>O2</ti> |
2376 |
</tr> |
2377 |
</table> |
2378 |
|
2379 |
<note> |
2380 |
* It is a common mistake to mix up the IRIS Indigo (IP12 w/ R3000 CPU or IP20 w/ |
2381 |
R4000 CPU, neither of which run Linux), the Indigo 2 (IP22, which runs |
2382 |
Linux fine), the R8000-based Indigo 2 Power (which doesn't run Linux at all) and |
2383 |
the R10000-based Indigo 2 Impact (IP28, which is highly experimental). |
2384 |
Please bear in mind that these are different machines. |
2385 |
</note> |
2386 |
|
2387 |
<note> |
2388 |
** On the Challenge S, the UTP network port is hung off a WD33C95 SCSI |
2389 |
card, which is currently unsupported on Linux. Because of this limitation, |
2390 |
you'll need to use an AUI-->UTP transceiver connected to the AUI port. |
2391 |
</note> |
2392 |
|
2393 |
<p> |
2394 |
Also in the filename, r4k refers to R4000-series processors, r5k for R5000, |
2395 |
rm5k for the RM5200 and r10k for R10000. You will find the images available at |
2396 |
<uri link="http://dev.gentoo.org/~kumba/mips/netboot"> |
2397 |
http://dev.gentoo.org/~kumba/mips/netboot. |
2398 |
</uri> |
2399 |
</p> |
2400 |
</body> |
2401 |
</subsection> |
2402 |
|
2403 |
<subsection> |
2404 |
<title>DHCP Configuration for an SGI Client</title> |
2405 |
<body> |
2406 |
|
2407 |
<p> |
2408 |
Once you have downloaded the file, simply place it in your |
2409 |
<path>/tftpboot</path> directory. Then edit your |
2410 |
<path>/etc/dhcp/dhcpd.conf</path> and add the entry for your SGI client. |
2411 |
</p> |
2412 |
|
2413 |
<note> |
2414 |
You may need to create the <path>/tftpboot</path> directory if it isn't |
2415 |
there already. |
2416 |
</note> |
2417 |
|
2418 |
<pre caption="dhcpd.conf snippet for SGI Workstation"> |
2419 |
subnet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx { |
2420 |
<comment># ... usual stuff here ...</comment> |
2421 |
|
2422 |
<comment># SGI Workstation... change 'sgi' to your SGI machine's hostname.</comment> |
2423 |
host <i>sgi</i> { |
2424 |
|
2425 |
<comment># MAC Address of SGI Machine. Normally this is written on the back</comment> |
2426 |
<comment># or base of the machine.</comment> |
2427 |
hardware ethernet <i>08:00:69:08:db:77</i>; |
2428 |
|
2429 |
<comment># TFTP Server to download from (by default, same as DHCP server)</comment> |
2430 |
next-server <i>192.168.10.1</i>; |
2431 |
|
2432 |
<comment># IP address to give to the SGI machine</comment> |
2433 |
fixed-address <i>192.168.10.3</i>; |
2434 |
|
2435 |
<comment># Filename for the PROM to download and boot</comment> |
2436 |
filename "<i>/gentoo-r4k.img</i>"; |
2437 |
} |
2438 |
} |
2439 |
</pre> |
2440 |
</body> |
2441 |
</subsection> |
2442 |
|
2443 |
<subsection> |
2444 |
<title>Kernel Options</title> |
2445 |
<body> |
2446 |
<p> |
2447 |
We're almost done, but there's a couple of little tweaks still to be done. Pull |
2448 |
up a console with root privileges, and enter the following commands. |
2449 |
</p> |
2450 |
|
2451 |
<pre caption="Some fixes to SGI machines to have TFTP work properly"> |
2452 |
<comment>(Disable "Path Maximum Transfer Unit", otherwise SGI Prom won't find the kernel)</comment> |
2453 |
# <i>echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc</i> |
2454 |
|
2455 |
<comment>(Set the port range usable by the SGI PROM)</comment> |
2456 |
# <i>echo "2048 32767" > /proc/sys/net/ipv4/ip_local_port_range</i> |
2457 |
</pre> |
2458 |
|
2459 |
<p> |
2460 |
This should be sufficient to allow the Linux server to play nice with SGI's |
2461 |
PROM. |
2462 |
</p> |
2463 |
|
2464 |
</body> |
2465 |
</subsection> |
2466 |
<subsection> |
2467 |
<title>Start Your Daemons...</title> |
2468 |
<body> |
2469 |
<p> |
2470 |
At this point, you should be ready to start the daemons. Enter the following: |
2471 |
</p> |
2472 |
|
2473 |
<pre caption="Starting the DHCP and TFTP daemons"> |
2474 |
# <i>/etc/init.d/dhcp start</i> |
2475 |
# <i>/etc/init.d/in.tftpd start</i> |
2476 |
</pre> |
2477 |
|
2478 |
<p> |
2479 |
If nothing went wrong in that last step you should be all set to power on the |
2480 |
workstation and proceed with the guide. If the DHCP server isn't firing up for |
2481 |
whatever reason, try running 'dhcpd' on the command line and see what it tells |
2482 |
you -- if all is well, it should just fork into the background, otherwise you'll |
2483 |
see 'exiting.' just below its complaint. |
2484 |
</p> |
2485 |
|
2486 |
<p> |
2487 |
An easy way to verify if the tftp daemon is running is to type the following |
2488 |
command -- if you see something like the output mentioned below -- everything is |
2489 |
fine. |
2490 |
</p> |
2491 |
|
2492 |
<pre caption="Checking TFTPd is running"> |
2493 |
# <i>netstat -al | grep ^udp</i> |
2494 |
udp 0 0 *:bootpc *:* |
2495 |
udp 0 0 *:631 *:* |
2496 |
udp 0 0 *:xdmcp *:* |
2497 |
udp 0 0 *:tftp *:* <comment><-- (look for this line)</comment> |
2498 |
</pre> |
2499 |
|
2500 |
</body> |
2501 |
</subsection> |
2502 |
<subsection> |
2503 |
<title>Netbooting the SGI machine</title> |
2504 |
<body> |
2505 |
|
2506 |
<p> |
2507 |
Okay, everything is set, DHCP is running as is TFTP. Now it is time to fire up |
2508 |
the SGI machine. Power the unit on -- when you see "Running power-on |
2509 |
diagnostics" on the screen, either click "Stop For Maintenance" or press ESCAPE. |
2510 |
You'll be presented with a menu like the following. Enter the commands as shown |
2511 |
below. |
2512 |
</p> |
2513 |
|
2514 |
<pre caption="SGI PROM Maintenance Menu"> |
2515 |
Running power-on diagnostics |
2516 |
|
2517 |
System Maintenance Menu |
2518 |
|
2519 |
1) Start System |
2520 |
2) Install System Software |
2521 |
3) Run Diagnostics |
2522 |
4) Recover System |
2523 |
5) Enter Command Monitor |
2524 |
|
2525 |
Option? <i>5</i> |
2526 |
Command Monitor. Type "exit" to return to the menu. |
2527 |
>> <i>bootp(): root=/dev/ram0</i> |
2528 |
</pre> |
2529 |
|
2530 |
<p> |
2531 |
>From this point, the machine should start downloading the image, then, roughly |
2532 |
20 seconds later, start booting Linux. If all is well, you should be dropped at |
2533 |
the Busybox <c>ash</c> shell as shown below, where you can |
2534 |
move on to <uri link="?part=1&chap=3">Configuring Your Network</uri>. |
2535 |
</p> |
2536 |
|
2537 |
<pre caption="When things are going right..."> |
2538 |
init started: BusyBox v1.00-pre10 (2004.04.27-02:55+0000) multi-call binary |
2539 |
|
2540 |
Gentoo Linux; http://www.gentoo.org/ |
2541 |
Copyright 2001-2004 Gentoo Technologies, Inc.; Distributed under the GPL |
2542 |
|
2543 |
Gentoo/MIPS Netboot for Silicon Graphics Machines |
2544 |
Build Date: April 26th, 2004 |
2545 |
|
2546 |
* To configure networking, do the following: |
2547 |
|
2548 |
* For Static IP: |
2549 |
* /bin/net-setup <IP Address> <Gateway Address> [telnet] |
2550 |
|
2551 |
* For Dynamic IP: |
2552 |
* /bin/net-setup dhcp [telnet] |
2553 |
|
2554 |
* If you would like a telnetd daemon loaded as well, pass "telnet" |
2555 |
* As the final argument to /bin/net-setup. |
2556 |
|
2557 |
Please press Enter to activate this console. |
2558 |
</pre> |
2559 |
|
2560 |
</body> |
2561 |
</subsection> |
2562 |
<subsection> |
2563 |
<title>Troubleshooting.</title> |
2564 |
<body> |
2565 |
|
2566 |
<p> |
2567 |
If the machine is being stubborn and refusing to download its image, it can be |
2568 |
one of two things, (1) you've made a blunder somewhere, or (2) it needs a little |
2569 |
gentle persuasion. (No, put that sledge hammer down!) Here's a list of things |
2570 |
you can check: |
2571 |
</p> |
2572 |
|
2573 |
<ul> |
2574 |
<li> |
2575 |
dhcpd is giving the SGI Machine an IP Address. You should see some |
2576 |
messages about a BOOTP request in the system logs. <c>tcpdump</c> is also |
2577 |
useful here. |
2578 |
</li> |
2579 |
<li> |
2580 |
Permissions are set properly in your tftp folder (typically |
2581 |
<path>/tftpboot</path> -- should be world readable) |
2582 |
</li> |
2583 |
<li> |
2584 |
Check system logs to see what the tftp server is reporting (errors |
2585 |
perhaps) |
2586 |
</li> |
2587 |
<!-- |
2588 |
I really think this tip can go... |
2589 |
|
2590 |
<li> |
2591 |
Pray to a Tux plushie (this may or may not work, and is not an officially |
2592 |
supported troubleshooting technique) |
2593 |
</li>--> |
2594 |
</ul> |
2595 |
|
2596 |
<p> |
2597 |
If you've checked everything on the server, and you're getting timeouts, etc on |
2598 |
the SGI machine, try typing this into the console. |
2599 |
</p> |
2600 |
|
2601 |
<pre caption="Coaxing the SGI PROM to work"> |
2602 |
>> <i>resetenv</i> |
2603 |
>> <i>unsetenv netaddr</i> |
2604 |
>> <i>unsetenv dlserver</i> |
2605 |
>> <i>init</i> |
2606 |
>> <i>bootp(): root=/dev/ram0</i> |
2607 |
</pre> |
2608 |
|
2609 |
</body> |
2610 |
</subsection> |
2611 |
</section> |
2612 |
|
2613 |
<section> |
2614 |
<title>Netbooting on Cobalt Servers</title> |
2615 |
<subsection> |
2616 |
<body> |
2617 |
|
2618 |
</body> |
2619 |
</subsection> |
2620 |
|
2621 |
<subsection> |
2622 |
<title>Overview of the netboot procedure</title> |
2623 |
<body> |
2624 |
|
2625 |
<p> |
2626 |
Unlike the SGI machines, Cobalt servers use NFS to transfer their kernel for |
2627 |
booting. You boot the machine by holding down the left & right arrow |
2628 |
buttons whilst powering the unit on. The machine will then attempt to obtain an |
2629 |
IP number via BOOTP, mount the <path>/nfsroot</path> directory from the server via |
2630 |
NFS, then try to download and boot the file <path>vmlinux_raq-2800.gz</path> |
2631 |
which it assumes to be a standard ELF binary. |
2632 |
</p> |
2633 |
|
2634 |
<p> |
2635 |
Unfortunately, the Cobalt BOOTROM does not give us any say in this procedure, |
2636 |
so the file HAS to reside in <path>/nfsroot</path> directory, and must be less |
2637 |
than 675kB in size. In this guide, we'll set up |
2638 |
<uri link="http://www.colonel-panic.org/cobalt-mips/">CoLo</uri> to allow us to |
2639 |
boot larger kernels than this limit. CoLo also supports embedded ramdisks, |
2640 |
therefore ridding the need of a full root filesystem sitting in |
2641 |
<path>/nfsroot</path>. |
2642 |
</p> |
2643 |
|
2644 |
</body> |
2645 |
</subsection> |
2646 |
|
2647 |
<subsection> |
2648 |
<title>Downloading a Netboot image</title> |
2649 |
<body> |
2650 |
|
2651 |
<p> |
2652 |
Inside |
2653 |
<uri link="http://dev.gentoo.org/~kumba/mips/cobalt/netboot/"> |
2654 |
http://dev.gentoo.org/~kumba/mips/cobalt/netboot/</uri> |
2655 |
you'll find the necessary boot images for getting a Cobalt up |
2656 |
and running. The files you need will have the name |
2657 |
<path>cobalt-netboot-YYYYMMDD.img.gz</path> -- select the most recent one and |
2658 |
place it in your <path>/nfsroot</path> directory. For convenience, rename the |
2659 |
file to <path>gentoo-cobalt.img.gz</path> -- I'll assume that you have done |
2660 |
this. |
2661 |
</p> |
2662 |
|
2663 |
<p> |
2664 |
Once that is done, head over to |
2665 |
<uri link="http://www.colonel-panic.org/cobalt-mips/"> |
2666 |
http://www.colonel-panic.org/cobalt-mips/</uri> and |
2667 |
download the latest release of the CoLo bootloader. Untar this somewhere |
2668 |
convenient. Inside the <path>colo-1.XX/binaries</path> directory created, |
2669 |
you should find under a file named <path>colo-chain.elf</path>. Gzip this |
2670 |
file up and place it in <path>/nfsroot</path> calling it |
2671 |
<path>vmlinux_raq-2800.gz</path>. Also, in some cases, you will need to create a |
2672 |
symbolic link called <path>boot</path> that points back to |
2673 |
<path>/nfsroot</path>. You can do this in one hit using these commands: |
2674 |
</p> |
2675 |
|
2676 |
<note> |
2677 |
Please note, the RaQ1 and Qube 2700 look for <path>vmlinux.gz</path> rather than |
2678 |
<path>vmlinux_raq-2800.gz</path>. |
2679 |
</note> |
2680 |
|
2681 |
<pre caption="Putting CoLo in the nfsroot"> |
2682 |
# <i>tar -xzvf colo-1.XX.tar.gz</i> |
2683 |
# <i>cd colo-1.XX/binaries</i> |
2684 |
|
2685 |
<comment>(For Qube 2800, RaQ2, etc)</comment> |
2686 |
# <i>gzip -9vc colo-chain.elf > /nfsroot/vmlinux_raq-2800.gz</i> |
2687 |
|
2688 |
<comment>(For RaQ1, Qube 2700)</comment> |
2689 |
# <i>gzip -9vc colo-chain.elf > /nfsroot/vmlinux.gz</i> |
2690 |
# <i>cd /nfsroot</i> |
2691 |
# <i>ln . boot</i> |
2692 |
</pre> |
2693 |
|
2694 |
<note> |
2695 |
If the latest CoLo release fails to boot, you may wish to try an earlier |
2696 |
release. Version 1.16 and earlier are known to work. |
2697 |
</note> |
2698 |
|
2699 |
</body> |
2700 |
</subsection> |
2701 |
|
2702 |
<subsection> |
2703 |
<title>NFS Server configuration</title> |
2704 |
<body> |
2705 |
|
2706 |
<p> |
2707 |
Since this machine uses NFS to download its image, you need to export |
2708 |
<path>/nfsroot</path> on your server. If you have not already done so, you'll |
2709 |
need to install the net-fs/nfs-utils package. |
2710 |
</p> |
2711 |
<pre caption="Installing nfs-utils"> |
2712 |
# <i>emerge net-fs/nfs-utils</i> |
2713 |
</pre> |
2714 |
|
2715 |
<p> |
2716 |
Once that is done, place the following in your <path>/etc/exports</path> file. |
2717 |
You may set tighter restrictions if you wish. |
2718 |
</p> |
2719 |
|
2720 |
<pre caption="Exporting the /nfsroot directory"> |
2721 |
/nfsroot *(ro,sync) |
2722 |
</pre> |
2723 |
|
2724 |
<p> |
2725 |
Now, once that is done, you may start the NFS server: |
2726 |
</p> |
2727 |
|
2728 |
<pre caption="Starting the NFS server"> |
2729 |
# <i>/etc/init.d/nfs start</i> |
2730 |
</pre> |
2731 |
|
2732 |
<p> |
2733 |
If the NFS server was already running at the time, you can tell it to take |
2734 |
another look at its <c>exports</c> file using <c>exportfs</c>. |
2735 |
</p> |
2736 |
|
2737 |
<pre caption="Exporting a new filesystem"> |
2738 |
# <i>exportfs -av</i> |
2739 |
</pre> |
2740 |
|
2741 |
</body> |
2742 |
</subsection> |
2743 |
|
2744 |
<subsection> |
2745 |
<title>DHCP Configuration for a Cobalt machine</title> |
2746 |
<body> |
2747 |
|
2748 |
<p> |
2749 |
Now, the DHCP side of things is relatively straightforward. Add the following |
2750 |
to your <path>/etc/dhcp/dhcpd.conf</path> file. |
2751 |
</p> |
2752 |
|
2753 |
<pre caption="dhcpd.conf snippet for Cobalt server"> |
2754 |
subnet xxx.xxx.xxx.xxx netmask xxx.xxx.xxx.xxx { |
2755 |
<comment># ... usual stuff here ...</comment> |
2756 |
|
2757 |
<comment># Configuration for a Cobalt Server</comment> |
2758 |
<comment># Set the hostname here:</comment> |
2759 |
host <i>qube</i> { |
2760 |
<comment># Path to the nfsroot directory.</comment> |
2761 |
<comment># This is mainly for when using the TFTP boot option on CoLo</comment> |
2762 |
option root-path "/nfsroot"; |
2763 |
|
2764 |
<comment># Cobalt server's ethernet MAC address</comment> |
2765 |
hardware ethernet <i>00:10:e0:00:86:3d</i>; |
2766 |
|
2767 |
<comment># Server to download image from</comment> |
2768 |
next-server <i>192.168.10.1</i>; |
2769 |
|
2770 |
<comment># IP address of cobalt server</comment> |
2771 |
fixed-address <i>192.168.10.2</i>; |
2772 |
|
2773 |
<comment># Image to download</comment> |
2774 |
<comment># Again, this has more to do with CoLo</comment> |
2775 |
filename "<i>gentoo-cobalt.img.gz</i>"; |
2776 |
} |
2777 |
} |
2778 |
</pre> |
2779 |
|
2780 |
</body> |
2781 |
</subsection> |
2782 |
|
2783 |
<subsection> |
2784 |
<title>Start Your Daemons...</title> |
2785 |
<body> |
2786 |
|
2787 |
<p> |
2788 |
At this point, you should be ready to start the daemons. Enter the following: |
2789 |
</p> |
2790 |
|
2791 |
<pre caption="Starting the DHCP and NFS daemons"> |
2792 |
# <i>/etc/init.d/dhcp start</i> |
2793 |
# <i>/etc/init.d/nfs start</i> |
2794 |
</pre> |
2795 |
|
2796 |
<p> |
2797 |
If nothing went wrong in that last step you should be all set to power on the |
2798 |
workstation and proceed with the guide. If the DHCP server isn't firing up for |
2799 |
whatever reason, try running 'dhcpd' on the command line and see what it tells |
2800 |
you -- if all is well, it should just fork into the background, otherwise you'll |
2801 |
see 'exiting.' just below its complaint. |
2802 |
</p> |
2803 |
|
2804 |
</body> |
2805 |
</subsection> |
2806 |
|
2807 |
<subsection> |
2808 |
<title>Netbooting the Cobalt machine</title> |
2809 |
<body> |
2810 |
|
2811 |
<p> |
2812 |
Okay, everything is set, DHCP is running as is NFS. Now it is time to fire up |
2813 |
the Cobalt machine. Hook up your null modem cable, and set the serial terminal |
2814 |
to use 115200 baud, 8 bits, no parity, 1 stop bit, VT100 emulation. Once that |
2815 |
is done, hold down the left & right arrow buttons whilst powering the unit |
2816 |
on. |
2817 |
</p> |
2818 |
|
2819 |
<p> |
2820 |
If all is well, the back panel should display "Net Booting", you should |
2821 |
see some network activity, closely followed by CoLo kicking in. On the rear |
2822 |
panel, scroll down the menu until you see "Boot Shell" then press ENTER. On the |
2823 |
serial console, you should be dropped to a prompt as shown below. |
2824 |
</p> |
2825 |
|
2826 |
<note> |
2827 |
It has been reported that simply selecting the NFS boot option does all of this |
2828 |
for you under modern versions of CoLo. If selecting this option does not work, |
2829 |
then read on. |
2830 |
</note> |
2831 |
|
2832 |
<pre caption="CoLo booting to a prompt"> |
2833 |
[ "CoLo" v1.13 ] |
2834 |
stage2: 87fb0000-88000000 |
2835 |
pci: unit type <Qube2> |
2836 |
tulip: {00:10:e0:00:86:3d} |
2837 |
ide: resetting |
2838 |
boot: running boot menu |
2839 |
> |
2840 |
</pre> |
2841 |
|
2842 |
<p> |
2843 |
First step, tell the machine to fetch an address via DHCP. Type <c>dhcp</c> at |
2844 |
the prompt. |
2845 |
</p> |
2846 |
|
2847 |
<pre caption="Fetching an address via DHCP"> |
2848 |
> <i>dhcp</i> |
2849 |
net: interface up |
2850 |
dhcp: DISCOVER |
2851 |
dhcp: OFFER 10.0.0.1 <-- 192.168.10.254 |
2852 |
dhcp: REQUEST |
2853 |
arp: sent request for 192.168.10.254 |
2854 |
udp: no matching socket 192.168.5.1:67 --> 10.0.0.1:68 |
2855 |
arp: resolved 192.168.10.254 |
2856 |
udp: no matching socket 192.168.5.1:67 --> 10.0.0.1:68 |
2857 |
dhcp: DISCOVER |
2858 |
dhcp: OFFER 10.0.0.1 <-- 192.168.10.254 |
2859 |
dhcp: REQUEST |
2860 |
udp: no matching socket 192.168.5.1:67 --> 10.0.0.1:68 |
2861 |
dhcp: ACK |
2862 |
net: interface down |
2863 |
net: interface up |
2864 |
address 10.0.0.1 |
2865 |
netmask 255.255.255.0 |
2866 |
gateway 10.0.0.254 |
2867 |
name server 192.168.5.1 |
2868 |
</pre> |
2869 |
|
2870 |
<p> |
2871 |
NOTE: If you have a Windows network you may see messages along the lines of |
2872 |
<c>udp: no matching socket</c>. These are in response to network broadcasts on |
2873 |
ports that CoLo doesn't recognise. As annoying as they are, they are perfectly |
2874 |
harmless. |
2875 |
</p> |
2876 |
|
2877 |
<pre caption="'no matching socket' error messages"> |
2878 |
udp: no matching socket 10.0.0.254:138 --> 10.0.0.255:138 |
2879 |
udp: no matching socket 10.0.0.254:138 --> 10.0.0.255:138 |
2880 |
udp: no matching socket 10.0.0.253:1062 --> 10.0.0.255:137 |
2881 |
udp: no matching socket 10.0.0.253:1062 --> 10.0.0.255:137 |
2882 |
</pre> |
2883 |
|
2884 |
<p> |
2885 |
Okay, the next step is to tell the Cobalt server to download its kernel. |
2886 |
</p> |
2887 |
|
2888 |
<pre caption="Downloading the kernel"> |
2889 |
> <i>nfs 10.0.0.254 /nfsroot gentoo.img.gz</i> |
2890 |
arp: sent request for 10.0.0.254 |
2891 |
arp: resolved 10.0.0.254 |
2892 |
udp: no matching socket 10.0.0.253:1062 --> 10.0.0.255:137 |
2893 |
nfs: mounted "/nfsroot" |
2894 |
nfs: lookup "gentoo.img.gz" |
2895 |
nfs: mode <0100644> |
2896 |
4651KB loaded (1240KB/sec) |
2897 |
0048ada0 4763040t |
2898 |
</pre> |
2899 |
|
2900 |
<p> |
2901 |
And that's it... it has now downloaded its kernel, we now can tell it to start |
2902 |
booting. |
2903 |
</p> |
2904 |
|
2905 |
<pre caption="Booting the kernel"> |
2906 |
> <i>execute</i> |
2907 |
elf: 80080000 <-- 00001000 6586368t + 192624t |
2908 |
elf: entry 80328040 |
2909 |
net: interface down |
2910 |
CPU revision is: 000028a0 |
2911 |
FPU revision is: 000028a0 |
2912 |
Primary instruction cache 32kB, physically tagged, 2-way, linesize 32 bytes. |
2913 |
Primary data cache 32kB 2-way, linesize 32 bytes. |
2914 |
Linux version 2.4.26-mipscvs-20040415 (root@khazad-dum) (gcc version 3.3.3... |
2915 |
Determined physical RAM map: |
2916 |
memory: 08000000 @ 00000000 (usable) |
2917 |
Initial ramdisk at: 0x80392000 (3366912 bytes) |
2918 |
On node 0 totalpages: 32768 |
2919 |
zone(0): 32768 pages. |
2920 |
zone(1): 0 pages. |
2921 |
zone(2): 0 pages. |
2922 |
Kernel command line: console=ttyS0,115200 root=/dev/ram0 |
2923 |
Calibrating delay loop... 249.85 BogoMIPS |
2924 |
Memory: 122512k/131072k available (2708k kernel code, 8560k reserved, 3424k dat) |
2925 |
</pre> |
2926 |
|
2927 |
<p> |
2928 |
If all is well, you should be dropped at |
2929 |
the Busybox <c>ash</c> shell as shown below, where you can go onto |
2930 |
<uri link="?part=1&chap=3">Configuring Your Network</uri>. |
2931 |
</p> |
2932 |
|
2933 |
<pre caption="When things are going right..."> |
2934 |
VFS: Mounted root (ext2 filesystem) readonly. |
2935 |
Freeing unused kernel memory: 280k freed |
2936 |
init started: BusyBox v1.00-pre10 (2004.04.27-02:55+0000) multi-call binary |
2937 |
|
2938 |
Gentoo Linux; http://www.gentoo.org/ |
2939 |
Copyright 2001-2004 Gentoo Technologies, Inc.; Distributed under the GPL |
2940 |
|
2941 |
Gentoo/MIPS Netboot for Cobalt Microserver Machines |
2942 |
Build Date: April 26th, 2004 |
2943 |
|
2944 |
* To configure networking, do the following: |
2945 |
|
2946 |
* For Static IP: |
2947 |
* /bin/net-setup <IP Address> <Gateway Address> [telnet] |
2948 |
|
2949 |
* For Dynamic IP: |
2950 |
* /bin/net-setup dhcp [telnet] |
2951 |
|
2952 |
* If you would like a telnetd daemon loaded as well, pass "telnet" |
2953 |
* As the final argument to /bin/net-setup. |
2954 |
|
2955 |
Please press Enter to activate this console. |
2956 |
</pre> |
2957 |
|
2958 |
</body> |
2959 |
</subsection> |
2960 |
|
2961 |
<subsection> |
2962 |
<title>Troubleshooting.</title> |
2963 |
<body> |
2964 |
|
2965 |
<p> |
2966 |
If the machine is being stubborn and refusing to download its image, it can be |
2967 |
one of two things, (1) you've made a blunder somewhere, or (2) it needs a little |
2968 |
gentle persuasion. (No, put that sledge hammer down!) Here's a list of things |
2969 |
you can check: |
2970 |
</p> |
2971 |
|
2972 |
<ul> |
2973 |
<li> |
2974 |
dhcpd is giving the Cobalt Machine an IP Address. You should see some |
2975 |
messages about a BOOTP request in the system logs. <c>tcpdump</c> is also |
2976 |
useful here. |
2977 |
</li> |
2978 |
<li> |
2979 |
Permissions are set properly in your <path>/nfsroot</path> folder. (should |
2980 |
be world readable) |
2981 |
</li> |
2982 |
<li> |
2983 |
Make sure the NFS server is running and exporting the <path>/nfsroot</path> |
2984 |
directory. Check this using <c>exportfs -v</c> on the server. |
2985 |
</li> |
2986 |
</ul> |
2987 |
</body> |
2988 |
</subsection> |
2989 |
</section> |
2990 |
<!-- |
2991 |
|
2992 |
Commented Out Until Further Notice |
2993 |
|
2994 |
<section> |
2995 |
<title>Gentoo/MIPS LiveCD</title> |
2996 |
<subsection> |
2997 |
<title>Overview</title> |
2998 |
<body> |
2999 |
|
3000 |
<p> |
3001 |
On Silicon Graphics machines, it is possible to boot from a CD in order to |
3002 |
install operating systems. (This is how one installs IRIX for instance) |
3003 |
Recently, images for such bootable CDs to install Gentoo have been made |
3004 |
possible. These CDs are designed to work in the same way. |
3005 |
</p> |
3006 |
|
3007 |
<p> |
3008 |
At the moment the Gentoo/MIPS Live CD will only work on the SGI Indy, |
3009 |
Indigo 2 and O2 workstations equipped with R4000 and R5000-series CPUs, however |
3010 |
other platforms may be possible in future. |
3011 |
</p> |
3012 |
|
3013 |
<p> |
3014 |
You can find the Live CD images for download on your favourite Gentoo Mirror |
3015 |
under the <path>experimental/mips/livecd</path> directory. |
3016 |
</p> |
3017 |
|
3018 |
<warn> |
3019 |
These CDs are highly experimental at this time. They may or may not work at |
3020 |
this time. You can report success or failures either on |
3021 |
<uri link="http://bugs.gentoo.org">Bugzilla</uri>, |
3022 |
<uri link="http://forums.gentoo.org/viewtopic.php?t=242518">this forum |
3023 |
thread</uri> or in the <c>#gentoo-mips</c> |
3024 |
<uri link="http://www.gentoo.org/main/en/irc.xml">IRC channel</uri>. We would |
3025 |
love to hear from you. |
3026 |
</warn> |
3027 |
|
3028 |
</body> |
3029 |
|
3030 |
</subsection> |
3031 |
|
3032 |
<subsection> |
3033 |
<title>Burning a Live CD</title> |
3034 |
<body> |
3035 |
|
3036 |
<p> |
3037 |
An important thing to note, the SGI PROM does not understand the ISO9660 format, |
3038 |
nor does it know anything about the El Torito boot standard. These CD images |
3039 |
are constructed as a SGI disklabel with the boot image in the volume header like |
3040 |
a hard drive. Therefore, care must be taken when burning the CD image. |
3041 |
</p> |
3042 |
|
3043 |
<p> |
3044 |
Below is an example command that assumes 24x burning speed on an IDE burner. If |
3045 |
you have a SCSI burner for instance, you may want to adjust the <c>dev</c> |
3046 |
statement as appropriate. Likewise with the <c>speed</c> option - if you |
3047 |
strike troubles, you might want to try dropping the speed. |
3048 |
</p> |
3049 |
|
3050 |
<pre caption="Burning using cdrecord"> |
3051 |
# <i>bzip2 -d mips-livecd-prototype-rc2-20041027.img.bz2</i> |
3052 |
# <i>cdrecord -vv -pad speed=24 dev=ATAPI:0,0,0 -tao mips-livecd-prototype-rc2-20041027.img</i> |
3053 |
</pre> |
3054 |
|
3055 |
<note> |
3056 |
It may be possible to burn these CDs under Windows, assuming your burning |
3057 |
program just blindly burns the image as is. However, no one has succeeded in |
3058 |
making a working CD this way to date. |
3059 |
</note> |
3060 |
|
3061 |
<note> |
3062 |
If you don't know what to put as your <c>dev</c> argument, run <c>cdrecord |
3063 |
-scanbus</c> as root - this will tell you where your burner is located. |
3064 |
</note> |
3065 |
|
3066 |
</body> |
3067 |
</subsection> |
3068 |
</section> |
3069 |
--> |
3070 |
</sections> |
3071 |
|
3072 |
|
3073 |
|
3074 |
1.1 xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-stage.xml |
3075 |
|
3076 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-stage.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
3077 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-stage.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo |
3078 |
|
3079 |
Index: hb-install-mips-stage.xml |
3080 |
=================================================================== |
3081 |
<?xml version='1.0' encoding='UTF-8'?> |
3082 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
3083 |
|
3084 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
3085 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
3086 |
|
3087 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/2006.0/hb-install-mips-stage.xml,v 1.1 2006/02/12 13:54:32 nightmorph Exp $ --> |
3088 |
|
3089 |
<sections> |
3090 |
|
3091 |
<version>2.5</version> |
3092 |
<date>2005-11-22</date> |
3093 |
|
3094 |
<section> |
3095 |
<title>Installing a Stage Tarball</title> |
3096 |
<subsection> |
3097 |
<title>Setting the Date/Time Right</title> |
3098 |
<body> |
3099 |
|
3100 |
<p> |
3101 |
Before you continue you need to check your date/time and update it. A |
3102 |
misconfigured clock may lead to strange results in the future! |
3103 |
</p> |
3104 |
|
3105 |
<p> |
3106 |
To verify the current date/time, run <c>date</c>: |
3107 |
</p> |
3108 |
|
3109 |
<pre caption="Verifying the date/time"> |
3110 |
# <i>date</i> |
3111 |
Fri Mar 29 16:21:18 CEST 2005 |
3112 |
</pre> |
3113 |
|
3114 |
<p> |
3115 |
If the date/time displayed is wrong, update it using the <c>date |
3116 |
MMDDhhmmYYYY</c> syntax (<b>M</b>onth, <b>D</b>ay, <b>h</b>our, <b>m</b>inute |
3117 |
and <b>Y</b>ear). For instance, to set the date to March 29th, 16:21 in the |
3118 |
year 2005: |
3119 |
</p> |
3120 |
|
3121 |
<pre caption="Setting the date/time"> |
3122 |
# <i>date 032916212005</i> |
3123 |
</pre> |
3124 |
|
3125 |
</body> |
3126 |
</subsection> |
3127 |
<subsection> |
3128 |
<title>Making your Choice</title> |
3129 |
<body> |
3130 |
|
3131 |
<p> |
3132 |
The next step you need to perform is to install the <e>stage</e> tarball of |
3133 |
your choice onto your system. |
3134 |
<!--You have the option of downloading the required |
3135 |
tarball from the Internet or, if you are booted from one of the Gentoo |
3136 |
Universal Installation CDs, copy it over from the CD itself. If you have a |
3137 |
Universal CD and the stage you want to use is on the CD, downloading it from |
3138 |
the Internet is just a waste of bandwidth as the stage files are the same. In |
3139 |
most cases, the command <c>uname -m</c> can be used to help you decide which |
3140 |
stage file to download. --> |
3141 |
</p> |
3142 |
|
3143 |
<!-- |
3144 |
<ul> |
3145 |
<li><uri link="#doc_chap2">Default: Using a Stage from the Internet</uri></li> |
3146 |
<li> |
3147 |
<uri link="#doc_chap3">Alternative: Using a Stage from the Installation CD</uri> |
3148 |
</li> |
3149 |
</ul>--> |
3150 |
|
3151 |
</body> |
3152 |
</subsection> |
3153 |
</section> |
3154 |
<section> |
3155 |
<title>Using a Stage from the Internet</title> |
3156 |
<subsection> |
3157 |
<title>Downloading the Stage Tarball</title> |
3158 |
<body> |
3159 |
|
3160 |
<p> |
3161 |
Go to the Gentoo mountpoint at which you mounted your filesystems |
3162 |
(most likely <path>/gentoo</path>): |
3163 |
</p> |
3164 |
|
3165 |
<pre caption="Going to the Gentoo mountpoint"> |
3166 |
# <i>cd /gentoo</i> |
3167 |
</pre> |
3168 |
|
3169 |
<p> |
3170 |
The table below specifies exactly which stages you need for your system. |
3171 |
Stages may be downloaded |
3172 |
off the <uri link="/main/en/mirrors.xml">official Gentoo mirrors</uri> under the |
3173 |
<c>releases/mips/current</c> directory. |
3174 |
</p> |
3175 |
|
3176 |
<table> |
3177 |
<tr> |
3178 |
<th>Endianness</th> |
3179 |
<th>CPU</th> |
3180 |
<th>Location</th> |
3181 |
</tr> |
3182 |
<tr> |
3183 |
<ti> |
3184 |
Big Endian<br /> |
3185 |
<e>(SGI Users)</e> |
3186 |
</ti> |
3187 |
<ti> |
3188 |
R4000<br /> |
3189 |
R4400<br /> |
3190 |
R4600 |
3191 |
</ti> |
3192 |
<ti><c>mips3/stage#-mips3-RELEASE.tar.bz2</c></ti> |
3193 |
</tr> |
3194 |
<tr> |
3195 |
<ti> |
3196 |
Big Endian<br /> |
3197 |
<e>(SGI Users)</e> |
3198 |
</ti> |
3199 |
<ti> |
3200 |
R5000<br /> |
3201 |
RM5200<br /> |
3202 |
RM7000<br /> |
3203 |
R10000<br /> |
3204 |
R12000<br /> |
3205 |
R14000 |
3206 |
</ti> |
3207 |
<ti><c>mips4/stage#-mips4-RELEASE.tar.bz2</c></ti> |
3208 |
</tr> |
3209 |
<tr> |
3210 |
<ti> |
3211 |
Little Endian<br /> |
3212 |
<e>(Cobalt Users)</e> |
3213 |
</ti> |
3214 |
<ti> |
3215 |
RM5230<br /> |
3216 |
RM5231 |
3217 |
</ti> |
3218 |
<ti><c>cobalt/stage#-mipsel4-RELEASE.tar.bz2</c></ti> |
3219 |
</tr> |
3220 |
</table> |
3221 |
|
3222 |
<p> |
3223 |
If you need to go through a proxy, export the <c>http_proxy</c> and |
3224 |
<c>ftp_proxy</c> variables: |
3225 |
</p> |
3226 |
|
3227 |
<pre caption="Setting proxy information for wget"> |
3228 |
# <i>export http_proxy="http://proxy.server.com:port"</i> |
3229 |
# <i>export ftp_proxy="http://proxy.server.com:port"</i> |
3230 |
</pre> |
3231 |
|
3232 |
<p> |
3233 |
The Gentoo/MIPS netboot images provide <c>wget</c> as a means of downloading |
3234 |
files. Due to space constraints, it is not possible to provide more capable |
3235 |
browsers on SGI netboot images. LiveCD users may use <c>elinks</c>. |
3236 |
</p> |
3237 |
|
3238 |
<pre caption="Fetching the tarball via wget"> |
3239 |
# <i>wget -c http://distfiles.gentoo.org/releases/mips/mips4/stage3-mips4-2005.1.tar.bz2</i> |
3240 |
</pre> |
3241 |
|
3242 |
<p> |
3243 |
If you want to check the integrity of the downloaded stage tarball, use |
3244 |
<c>md5sum</c> and compare the output with the MD5 checksum provided on the |
3245 |
mirror. For instance, to check the validity of the mips4 stage tarball: |
3246 |
</p> |
3247 |
|
3248 |
<pre caption="Example checking integrity of a stage tarball"> |
3249 |
# <i>md5sum -c stage3-mips4-2005.1.tar.bz2.md5</i> |
3250 |
stage3-mips4-2005.1.tar.bz2: OK |
3251 |
</pre> |
3252 |
|
3253 |
</body> |
3254 |
</subsection> |
3255 |
<subsection> |
3256 |
<title>Unpacking the Stage Tarball</title> |
3257 |
<body> |
3258 |
|
3259 |
<p> |
3260 |
Now unpack your downloaded stage onto your system. We use GNU's <c>tar</c> to |
3261 |
proceed as it is the easiest method: |
3262 |
</p> |
3263 |
|
3264 |
<pre caption="Unpacking the stage"> |
3265 |
# <i>tar -xjpf stage?-*.tar.bz2</i> |
3266 |
</pre> |
3267 |
|
3268 |
<p> |
3269 |
Make sure that you use the same options (<c>-xjpf</c>). The <c>x</c> stands for |
3270 |
<e>Extract</e>, the <c>j</c> for <e>Decompress with bzip2</e>, the <c>p</c> for |
3271 |
<e>Preserve permissions</e> and the <c>f</c> to denote that we want to extract |
3272 |
a file, not standard input. |
3273 |
</p> |
3274 |
|
3275 |
<p> |
3276 |
Now that the stage is installed, continue with <uri |
3277 |
link="#installing_portage">Installing Portage</uri>. |
3278 |
</p> |
3279 |
|
3280 |
</body> |
3281 |
</subsection> |
3282 |
</section> |
3283 |
<!-- |
3284 |
<section> |
3285 |
<title>Alternative: Using a Stage from the Installation CD</title> |
3286 |
<subsection> |
3287 |
<title>Extracting the Stage Tarball</title> |
3288 |
<body> |
3289 |
|
3290 |
<p> |
3291 |
The stages on the CD reside in the <path>/mnt/cdrom/stages</path> directory. To |
3292 |
see a listing of available stages, use <c>ls</c>: |
3293 |
</p> |
3294 |
|
3295 |
<pre caption="List all available stages"> |
3296 |
# <i>ls /mnt/cdrom/stages</i> |
3297 |
</pre> |
3298 |
|
3299 |
<p> |
3300 |
If the system replies with an error, you may need to mount the CD-ROM first: |
3301 |
</p> |
3302 |
|
3303 |
<pre caption="Mounting the CD-ROM"> |
3304 |
# <i>ls /mnt/cdrom/stages</i> |
3305 |
ls: /mnt/cdrom/stages: No such file or directory |
3306 |
# <i>mount /dev/cdroms/cdrom0 /mnt/cdrom</i> |
3307 |
# <i>ls /mnt/cdrom/stages</i> |
3308 |
</pre> |
3309 |
|
3310 |
<p> |
3311 |
Now go into your Gentoo mountpoint (usually <path>/mnt/gentoo</path>): |
3312 |
</p> |
3313 |
|
3314 |
<pre caption="Changing directory to /mnt/gentoo"> |
3315 |
# <i>cd /mnt/gentoo</i> |
3316 |
</pre> |
3317 |
|
3318 |
<p> |
3319 |
We will now extract the stage tarball of your choice. We will do this with the |
3320 |
GNU <c>tar</c> tool. Make sure you use the same options (<c>-xvjpf</c>)! Again, |
3321 |
the <c>v</c> argument is optional and not supported in some <c>tar</c> versions. |
3322 |
In the next example, we extract the stage tarball |
3323 |
<path>stage3-<subarch>-2005.1.tar.bz2</path>. |
3324 |
Be sure to substitute the tarball filename with your stage. |
3325 |
</p> |
3326 |
|
3327 |
<pre caption="Extracting the stage tarball"> |
3328 |
# <i>tar -xvjpf /mnt/cdrom/stages/stage3-<subarch>-2005.1.tar.bz2</i> |
3329 |
</pre> |
3330 |
|
3331 |
<!- - 2005.1: stage3 for athlon xp, pentium3 and pentium4 are b0rked - -> |
3332 |
<warn> |
3333 |
The <path>stage3-athlon-xp-2005.1.tar.bz2</path>, |
3334 |
<path>stage3-pentium3-2005.1.tar.bz2</path> and |
3335 |
<path>stage3-pentium4-2005.1.tar.bz2</path> files have a serious permission |
3336 |
error. After extracting any of these, run <c>chmod 0755 /mnt/gentoo</c> to fix |
3337 |
the error <e>before</e> continuing with the installation. |
3338 |
</warn> |
3339 |
|
3340 |
<p> |
3341 |
Now that the stage is installed, continue with <uri |
3342 |
link="#installing_portage">Installing Portage</uri>. |
3343 |
</p> |
3344 |
|
3345 |
</body> |
3346 |
</subsection> |
3347 |
</section>--> |
3348 |
<section id="installing_portage"> |
3349 |
<title>Installing Portage</title> |
3350 |
<subsection> |
3351 |
<title>Unpacking a Portage Snapshot</title> |
3352 |
<body> |
3353 |
|
3354 |
<p> |
3355 |
You now have to install a Portage snapshot, a collection of files that inform |
3356 |
Portage what software titles you can install, which profiles are available, etc. |
3357 |
</p> |
3358 |
|
3359 |
</body> |
3360 |
</subsection> |
3361 |
<subsection id="installing_from_Internet"> |
3362 |
<title>Download and Install a Portage Snapshot</title> |
3363 |
<body> |
3364 |
|
3365 |
<p> |
3366 |
Go to the mountpoint where you mounted your filesystem (most likely |
3367 |
<path>/gentoo</path>): |
3368 |
</p> |
3369 |
|
3370 |
<pre caption="Going to the Gentoo mountpoint"> |
3371 |
# <i>cd /gentoo</i> |
3372 |
</pre> |
3373 |
|
3374 |
<p> |
3375 |
Download a portage snapshot from a <uri |
3376 |
link="/main/en/mirrors.xml">local mirror</uri>. |
3377 |
You'll find them in the <path>snapshots/</path> directory. Transfer it to the |
3378 |
target system in the same manner that you did for the stage tarball. |
3379 |
</p> |
3380 |
|
3381 |
<pre caption="Extracting the Portage snapshot"> |
3382 |
# <i>tar -xjf portage-*.tar.bz2 -C /gentoo/usr</i> |
3383 |
</pre> |
3384 |
|
3385 |
</body> |
3386 |
</subsection> |
3387 |
</section> |
3388 |
|
3389 |
<section id="compile_options"> |
3390 |
<title>Configuring the Compile Options</title> |
3391 |
<subsection> |
3392 |
<title>Introduction</title> |
3393 |
<body> |
3394 |
|
3395 |
<p> |
3396 |
To optimize Gentoo, you can set a couple of variables which impact Portage |
3397 |
behaviour. All those variables can be set as environment variables (using |
3398 |
<c>export</c>) but that isn't permanent. To keep your settings, Portage provides |
3399 |
you with <path>/etc/make.conf</path>, a configuration file for Portage. It is |
3400 |
this file we will edit now. |
3401 |
</p> |
3402 |
|
3403 |
<note> |
3404 |
A commented listing of all possible variables can be found in |
3405 |
<path>/gentoo/etc/make.conf.example</path>. For a successful Gentoo |
3406 |
installation you'll only need to set the variables which are mentioned beneath. |
3407 |
</note> |
3408 |
|
3409 |
<p> |
3410 |
Fire up a text editor so we can alter the optimization variables we will discuss |
3411 |
hereafter. Two editors are provided, <c>vi</c> (part of Busybox) and |
3412 |
<c>nano</c>. We will assume you're using <c>nano</c>. |
3413 |
</p> |
3414 |
|
3415 |
<pre caption="Opening /etc/make.conf"> |
3416 |
# <i>nano -w /gentoo/etc/make.conf</i> |
3417 |
</pre> |
3418 |
|
3419 |
<p> |
3420 |
As you probably noticed, the <path>make.conf.example</path> file is |
3421 |
structured in a generic way: commented lines start with "#", other lines define |
3422 |
variables using the <c>VARIABLE="content"</c> syntax. The <path>make.conf</path> |
3423 |
file uses the same syntax. Several of those variables are discussed next. |
3424 |
</p> |
3425 |
|
3426 |
</body> |
3427 |
</subsection> |
3428 |
<!--<subsection> |
3429 |
<title>CHOST</title> |
3430 |
<body> |
3431 |
|
3432 |
<warn> |
3433 |
Although it might be tempting for non-stage1 users, they should <e>not</e> |
3434 |
change the <c>CHOST</c> setting in <path>make.conf</path>. Doing so might render |
3435 |
their system unusable. Again: only change this variable if you use a |
3436 |
<e>stage1</e> installation. |
3437 |
</warn> |
3438 |
|
3439 |
<p> |
3440 |
The <c>CHOST</c> variable defines what architecture <c>gcc</c> has to |
3441 |
compile programs for, as well as the <c>libc</c> (<c>glibc</c> or <c>µClibc</c>) used |
3442 |
for linking. |
3443 |
</p> |
3444 |
|
3445 |
<table> |
3446 |
<tr> |
3447 |
<th>Endianness</th> |
3448 |
<th>Userland/ABI</th> |
3449 |
<th>CHOST Setting</th> |
3450 |
</tr> |
3451 |
<tr> |
3452 |
<ti>Big Endian <e>(SGI Users)</e></ti> |
3453 |
<ti><c>glibc</c> <c>o32</c></ti> |
3454 |
<ti>mips-unknown-linux-gnu</ti> |
3455 |
</tr> |
3456 |
<tr> |
3457 |
<ti>Big Endian <e>(SGI Users)</e></ti> |
3458 |
<ti><c>µClibc</c> <c>o32</c></ti> |
3459 |
<ti>mips-unknown-linux-uclibc (1)</ti> |
3460 |
</tr> |
3461 |
<tr> |
3462 |
<ti>Big Endian <e>(SGI Users)</e></ti> |
3463 |
<ti><c>glibc</c> <c>n32</c> & <c>n64</c></ti> |
3464 |
<ti>mips64-unknown-linux-gnu (2)</ti> |
3465 |
</tr> |
3466 |
<tr> |
3467 |
<ti>Little Endian <e>(Cobalt Users)</e></ti> |
3468 |
<ti><c>glibc</c> <c>o32</c></ti> |
3469 |
<ti>mipsel-unknown-linux-gnu</ti> |
3470 |
</tr> |
3471 |
<tr> |
3472 |
<ti>Little Endian <e>(Cobalt Users)</e></ti> |
3473 |
<ti><c>µClibc</c> <c>o32</c></ti> |
3474 |
<ti>mipsel-unknown-linux-uclibc (1)</ti> |
3475 |
</tr> |
3476 |
<tr> |
3477 |
<ti>Little Endian <e>(Cobalt Users)</e></ti> |
3478 |
<ti><c>glibc</c> <c>n32</c> & <c>n64</c></ti> |
3479 |
<ti>mips64el-unknown-linux-gnu (2)</ti> |
3480 |
</tr> |
3481 |
</table> |
3482 |
|
3483 |
<warn> |
3484 |
(1) µClibc stages are the realm of the |
3485 |
<uri link="/proj/en/base/embedded/">Gentoo Embedded</uri> |
3486 |
team, and are therefore not officially supported by the |
3487 |
Gentoo/MIPS team. This <c>CHOST</c> setting is only mentioned here for |
3488 |
completeness. |
3489 |
</warn> |
3490 |
|
3491 |
<warn> |
3492 |
(2) Currently we do not provide <c>n64</c> stages, and only provide <c>n32</c> |
3493 |
stages on the Big Endian MIPS4 architecture. These are highly experimental |
3494 |
stages and are known to be totally broken in places. Users are thus |
3495 |
<e>highly</e> recommended to avoid these like the plague. |
3496 |
The only reason one would need the <c>mips64(el)</c> <c>CHOST</c>, is to use a |
3497 |
64-bit (<c>n32</c> or <c>n64</c>) userland. This <c>CHOST</c> setting is only |
3498 |
mentioned here for completeness. |
3499 |
</warn> |
3500 |
|
3501 |
</body> |
3502 |
</subsection>--> |
3503 |
<subsection> |
3504 |
<title>CFLAGS and CXXFLAGS</title> |
3505 |
<body> |
3506 |
|
3507 |
<p> |
3508 |
The <c>CFLAGS</c> and <c>CXXFLAGS</c> variables define the optimization flags |
3509 |
for the <c>gcc</c> C and C++ compiler respectively. Although we define those |
3510 |
generally here, you will only have maximum performance if you optimize these |
3511 |
flags for each program separately. The reason for this is because every program |
3512 |
is different. |
3513 |
</p> |
3514 |
|
3515 |
<p> |
3516 |
In <path>make.conf</path> you should define the optimization flags you think |
3517 |
will make your system the most responsive <e>generally</e>. Don't place |
3518 |
experimental settings in this variable; too much optimization can make |
3519 |
programs behave bad (crash, or even worse, malfunction). |
3520 |
</p> |
3521 |
|
3522 |
<p> |
3523 |
We will not explain all possible optimization options. If you want to know |
3524 |
them all, read the <uri link="http://gcc.gnu.org/onlinedocs/">GNU |
3525 |
Online Manual(s)</uri> or the <c>gcc</c> info page (<c>info gcc</c> -- only |
3526 |
works on a working Linux system). The <path>make.conf.example</path> file |
3527 |
itself also contains lots of examples and information; don't forget to read it |
3528 |
too. |
3529 |
</p> |
3530 |
|
3531 |
<p> |
3532 |
A first setting is the <c>-march=</c> flag, which specifies the name of the |
3533 |
target architecture. Possible options are described in the |
3534 |
<path>make.conf.example</path> file (as comments). Examples include ISA levels |
3535 |
(<c>mips1</c> ... <c>mips4</c>) and CPU models (<c>r4400</c>, <c>r4600</c> ... |
3536 |
etc). For pure ISA level architectures, one can simply specify <c>-mips3</c> |
3537 |
rather than <c>-march=mips3</c>. |
3538 |
</p> |
3539 |
|
3540 |
<pre caption="The GCC -march and -mips# settings"> |
3541 |
<comment>(For an R4600 system...)</comment> |
3542 |
-march=r4600 |
3543 |
|
3544 |
<comment>(Any MIPS4-class CPU...)</comment> |
3545 |
-march=mips4 |
3546 |
|
3547 |
<comment>(Or just specify the ISA level directly...)</comment> |
3548 |
-mips4 |
3549 |
</pre> |
3550 |
|
3551 |
<p> |
3552 |
A second one is the <c>-O</c> flag (that is a capital O, not a zero), |
3553 |
which specifies the <c>gcc</c> optimization |
3554 |
class flag. Possible classes are <c>s</c> (for size-optimized), |
3555 |
<c>0</c> (zero - for no optimizations), <c>1</c>, <c>2</c> or <c>3</c> for more |
3556 |
speed-optimization flags (every class has the same flags as the one before, plus |
3557 |
some extras). For instance, for a class-2 optimization: |
3558 |
</p> |
3559 |
|
3560 |
<pre caption="The GCC O setting"> |
3561 |
-O2 |
3562 |
</pre> |
3563 |
|
3564 |
<p> |
3565 |
A very important setting in the MIPS world, is the <c>-mabi=</c> flag. MIPS has |
3566 |
3 different ABIs; <c>32</c> (pure 32-bit, aka <c>o32</c>), <c>64</c> (full |
3567 |
64-bit, aka <c>n64</c>) and <c>n32</c> |
3568 |
(a mix of 32-bit data structures with 64-bit instructions). This |
3569 |
flag selects which of these you wish to use. Note you need libraries for the |
3570 |
ABI you select. In layman's terms, this means, for example, you can't use |
3571 |
<c>-mabi=64</c> on a 32-bit userland (or even a <c>n32</c> userland). |
3572 |
</p> |
3573 |
|
3574 |
<p> |
3575 |
Another popular optimization flag is <c>-pipe</c> (use pipes rather than |
3576 |
temporary files for communication between the various stages of compilation). |
3577 |
</p> |
3578 |
|
3579 |
<p> |
3580 |
Mind you that using <c>-fomit-frame-pointer</c> (which doesn't keep the frame |
3581 |
pointer in a register for functions that don't need one) might have serious |
3582 |
repercussions on the debugging of applications! |
3583 |
</p> |
3584 |
|
3585 |
<p> |
3586 |
When you define the <c>CFLAGS</c> and <c>CXXFLAGS</c>, you should combine |
3587 |
several optimization flags, like in the following example: |
3588 |
</p> |
3589 |
|
3590 |
<pre caption="Defining the CFLAGS and CXXFLAGS variable"> |
3591 |
CFLAGS="-mabi=32 -mips4 -pipe -O2" |
3592 |
CXXFLAGS="${CFLAGS}" <comment># Use the same settings for both variables</comment> |
3593 |
</pre> |
3594 |
|
3595 |
</body> |
3596 |
</subsection> |
3597 |
<subsection> |
3598 |
<title>MAKEOPTS</title> |
3599 |
<body> |
3600 |
|
3601 |
<p> |
3602 |
With <c>MAKEOPTS</c> you define how many parallel compilations should occur when |
3603 |
you install a package. A good choice is the number of CPUs in your system plus |
3604 |
one, but this guideline isn't always perfect. |
3605 |
</p> |
3606 |
|
3607 |
<pre caption="MAKEOPTS for a regular, 1-CPU system"> |
3608 |
MAKEOPTS="-j2" |
3609 |
</pre> |
3610 |
|
3611 |
</body> |
3612 |
</subsection> |
3613 |
<subsection> |
3614 |
<title>Ready, Set, Go!</title> |
3615 |
<body> |
3616 |
|
3617 |
<p> |
3618 |
Update your <path>/gentoo/etc/make.conf</path> to your own preference and |
3619 |
save (<c>nano</c> users would hit <c>Ctrl-X</c>). You are now ready to continue |
3620 |
with <uri link="?part=1&chap=6">Installing the Gentoo Base System</uri>. |
3621 |
</p> |
3622 |
|
3623 |
</body> |
3624 |
</subsection> |
3625 |
</section> |
3626 |
</sections> |
3627 |
|
3628 |
|
3629 |
|
3630 |
-- |
3631 |
gentoo-doc-cvs@g.o mailing list |