/[gentoo]/xml/htdocs/doc/en/gentoo-x86-install.xml
Gentoo

Contents of /xml/htdocs/doc/en/gentoo-x86-install.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.186 - (show annotations) (download) (as text)
Sun Nov 23 14:20:04 2003 UTC (14 years, 8 months ago) by swift
Branch: MAIN
Changes since 1.185: +12 -3 lines
File MIME type: application/xml
Fix #33977: Inform user about portage update after running emerge sync

1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- $Header: /home/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-install.xml,v 1.185 2003/11/15 00:35:19 neysx Exp $ -->
3 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 <guide link="/doc/en/gentoo-x86-install.xml">
5 <title>Gentoo Linux 1.4 Installation Instructions</title>
6
7 <author title="Chief Architect">
8 <mail link="drobbins@gentoo.org">Daniel Robbins</mail>
9 </author>
10 <author title="Author">
11 Chris Houser
12 </author>
13 <author title="Author">
14 Jerry Alexandratos
15 </author>
16 <author title="Ghost, Reviewer">
17 <mail link="g2boojum@gentoo.org">Grant Goodyear</mail>
18 </author>
19 <author title="Editor"><!-- zhen@gentoo.org -->
20 John P. Davis
21 </author>
22 <author title="Editor">
23 <mail link="Pierre-Henri.Jondot@wanadoo.fr">Pierre-Henri Jondot</mail>
24 </author>
25 <author title="Editor">
26 <mail link="stocke2@gentoo.org">Eric Stockbridge</mail>
27 </author>
28 <author title="Editor">
29 <mail link="rajiv@gentoo.org">Rajiv Manglani</mail>
30 </author>
31 <author title="Editor">
32 <mail link="seo@gentoo.org">Jungmin Seo</mail>
33 </author>
34 <author title="Editor">
35 <mail link="zhware@gentoo.org">Stoyan Zhekov</mail>
36 </author>
37 <author title="Editor">
38 <mail link="jhhudso@gentoo.org">Jared Hudson</mail>
39 </author>
40 <author title="Editor">
41 Colin Morey
42 </author>
43 <author title="Editor">
44 <mail link="peesh@gentoo.org">Jorge Paulo</mail>
45 </author>
46 <author title="Editor">
47 <mail link="carl@gentoo.org">Carl Anderson</mail>
48 </author>
49 <author title="Editor, Reviewer">
50 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
51 </author>
52 <author title="Editor">
53 <mail link="avenj@gentoo.org">Jon Portnoy</mail>
54 </author>
55 <author title="Editor">
56 <mail link="klasikahl@gentoo.org">Zack Gilburd</mail>
57 </author>
58 <author title="Editor">
59 <mail link="erwin@gentoo.org">Erwin</mail>
60 </author>
61 <author title="Reviewer">
62 <mail link="gerrynjr@gentoo.org">Gerald J. Normandin Jr.</mail>
63 </author>
64 <author title="Reviewer">
65 <mail link="spyderous@gentoo.org">Donnie Berkholz</mail>
66 </author>
67 <author title="Reviewer">
68 <mail link="antifa@gentoo.org">Ken Nowack</mail>
69 </author>
70 <author title="Editor, Reviewer">
71 <mail link="bennyc@gentoo.org">Benny Chuang</mail>
72 </author>
73
74 <abstract>
75 These instructions step you through the process of installing Gentoo
76 Linux 1.4, release version (not _rc versions). The Gentoo Linux installation
77 process supports various installation approaches, depending upon how much of
78 the system you want to custom-build from scratch.
79 </abstract>
80
81 <license/>
82
83 <version>2.6.25</version>
84 <date>November 23, 2003</date>
85
86 <chapter>
87 <title>About the Install</title>
88 <section>
89 <title>Introduction</title>
90 <body>
91
92 <p>
93 Welcome to Gentoo Linux! Gentoo Linux can be installed in many different ways.
94 Those who are looking for a rapid install can use pre-built packages, while
95 those who want the ultimate in customizability can compile Gentoo Linux
96 entirely from the original source code. The method you choose is up to you.
97 </p>
98
99 <p>
100 One significant change in relation to the official 1.4 release is
101 our new 2-CD installation set, which can be ordered from <uri
102 link="http://store.gentoo.org">The Gentoo Linux Store</uri>, in
103 addition to being available on our <uri
104 link="http://www.gentoo.org/main/en/mirrors.xml">mirrors</uri>.
105 We currently have 2-CD installation sets for x86 (486 and above),
106 i686 (Pentium Pro, Pentium II, Athlon/Duron and above), Pentium III,
107 Pentium 4 and Athlon XP. To see what 2-CD set is right for you, read
108 the detailed descriptions of each product in the <uri
109 link="http://store.gentoo.org">store</uri>. The store descriptions
110 contain fairly comprehensive CPU compatibility information.
111 </p>
112
113 <p>
114 You can find and download the ISOs for the LiveCDs from most of our
115 <uri link="http://www.gentoo.org/main/en/mirrors.xml">mirrors</uri>. The
116 LiveCDs for the x86 architecture are located inside the
117 <path>releases/x86/1.4/livecd/</path> subdirectory.
118 </p>
119
120 </body>
121 </section>
122 <section>
123 <title>The Installation CDs</title>
124 <body>
125
126 <p>
127 So, about the 2 CD set -- here's what's on each CD. The first
128 CD ("CD 1") is called "Live CD Installation" and is a bootable CD-ROM,
129 meaning that you can put "CD 1" in your drive and run Gentoo Linux
130 directly from the CD. You can then use this CD-based version of
131 Gentoo to install Gentoo Linux 1.4 to your hard disk. In addition
132 to containing a bootable Gentoo Linux environment, CD 1
133 contains everything you need to install Gentoo Linux quickly, even
134 without a connection to the Internet. In addition, several
135 pre-compiled packages are also included on CD 1, such as the
136 ever-important XFree86 X server. If you have an ISO CD-ROM image
137 file for CD 1, its name will contain <path>-cd1</path>.
138 </p>
139
140 <p>
141 In contrast, the second CD ("CD 2") isn't bootable and contains
142 lots of pre-built packages for your system. Included on this CD are
143 optimized versions of packages such as KDE, GNOME, OpenOffice,
144 Mozilla, Evolution and others. CD 2 is <e>optional</e> and is
145 intended for those people who are interested in installing Gentoo
146 Linux very quickly. The packages included on CD 2 typically take
147 about 36 hours to compile from source on a typical modern
148 single-processor system. If you have an ISO CD-ROM image file for CD
149 2, its name will contain <path>-cd2</path>.
150 </p>
151
152 <note>
153 A complete Gentoo Linux 2-CD set contains the Gentoo Reference
154 Platform, which is a complete pre-built Gentoo Linux system including GNOME,
155 KDE, Mozilla and OpenOffice. The Gentoo Reference Platform ("GRP")
156 was created to allow rapid Gentoo Linux package installations
157 for those who need this capability. The "compile from
158 source" functionality, which is the cornerstone of Gentoo Linux,
159 will always be a fully-supported installation option as well. The
160 purpose of the GRP is to make Gentoo Linux more convenient for some
161 users, without impacting Gentoo's powerful "compile from source"
162 installation process in any way.
163 </note>
164
165 <p>
166 In addition to our 2-CD set, we also have a very small "basic"
167 Live CD that you can use to boot your system. Once your system has
168 booted, you can configure a connection to the Internet and then
169 install Gentoo over the network. The advantage of this "basic" CD is
170 that it is small and thus the ISO CD-ROM image file can be
171 downloaded quickly. If you're an advanced user who wants to install
172 the most up-to-date version of Gentoo Linux available and have a
173 fast network connection, then you may prefer this option. If you
174 have an ISO CD-ROM image file for our "basic" Live CD, its name will
175 contain <path>-basic</path>.
176 </p>
177
178 </body>
179 </section>
180 <section>
181 <title>Requirements</title>
182 <body>
183
184 <p>
185 To use any Gentoo Linux CD-based installation method, you will
186 need to have a 486+ processor and ideally at least 64 Megabytes of
187 RAM. (Gentoo Linux has been successfully built with 64MB of RAM +
188 64MB of swap space, but the build process is awfully slow under
189 those conditions.)
190 </p>
191
192 </body>
193 </section>
194 <section>
195 <title>Choosing an Installation Method</title>
196 <body>
197
198 <p>
199 Once you boot one of our Live CDs, you have even more options.
200 Gentoo Linux can be installed using one of three &quot;stage&quot;
201 tarball files. The one you choose depends on how much of the system
202 you want to compile yourself. The <e>stage1</e> tarball is used when you
203 want to bootstrap and build the entire system from scratch. The
204 <e>stage2</e> tarball is used for building the entire system from a
205 bootstrapped "semi-compiled" state. The <e>stage3</e> tarball already
206 contains a basic Gentoo Linux system that has been built for
207 you. If you are interested in doing a "GRP" install, then the
208 stage3 tarball must be used.
209 </p>
210
211 <p>
212 <b>If you're not doing a GRP install, should you start from a stage1, stage2, or
213 stage3 tarball?</b>
214 </p>
215
216 <p>
217 Here is some information that should help you
218 make this decision.
219 </p>
220
221 <p>
222 Starting from a stage1 allows you to have total
223 control over the optimization settings and optional build-time
224 functionality that is initially enabled on your system. This makes
225 stage1 installs good for power users who know what they are doing.
226 It is also a great installation method for those who would like to
227 know more about the inner workings of Gentoo Linux.
228 </p>
229
230 <p>
231 Stage2 installs allow you to skip the bootstrap process and doing
232 this is fine if you are happy with the optimization settings that we
233 chose for your particular stage2 tarball.
234 </p>
235
236 <p>
237 And choosing to go with a stage3 allows for the fastest install of Gentoo
238 Linux, but also means that your base system will have the optimization
239 settings that we chose for you (which to be honest, are good settings and were
240 carefully chosen to enhance performance while maintaining
241 stability). Since major releases of Gentoo Linux have stage3's
242 specifically optimized for various popular processors, starting
243 from a stage3 can offer the best of all worlds -- a fast install
244 and a system that is well-optimized.
245 </p>
246
247 <p>
248 <b>If you're installing Gentoo Linux for the first time, consider using a
249 stage3 tarball for installation, or a stage3 with GRP.</b>
250 </p>
251
252 <note>
253 <b>Advanced users:</b> If you use a stage3 install, you should not
254 change the default CHOST setting in <path>/etc/make.conf</path>. If you need
255 to make such a change, you should start with a stage1 tarball and build up
256 your system with the desired CHOST setting. The CHOST setting
257 typically looks something like this: <c>i686-pc-linux-gnu</c>.
258 </note>
259
260 <impo>
261 If you encounter a problem with any part of the install and wish to
262 report it as a bug, report it to <uri>http://bugs.gentoo.org</uri>. If the bug
263 needs to be sent upstream to the original software developers (e.g. the KDE
264 team) the <e>Gentoo Linux developers</e> will take care of that for you.
265 </impo>
266
267 <note>
268 The installation instructions in the LiveCD may not be as up-to-date as our
269 Web documentation at
270 <uri>http://www.gentoo.org/doc/en/gentoo-x86-install.xml</uri>.
271 Refer to our Web documentation for the most up-to-date installation
272 instructions.
273 </note>
274
275 </body>
276 </section>
277 <section>
278 <title>The Installation Process</title>
279 <body>
280
281 <p>
282 Now, let us quickly review the install process. First, we will download, burn
283 CD(s) and boot a LiveCD. After getting a root prompt, we will create
284 partitions, create our filesystems and extract either a stage1, stage2 or
285 stage3 tarball. If we are using a stage1 or stage2 tarball, we will take
286 the appropriate steps to get our system to stage3. Once our system is at
287 stage3, we can configure it (customize configuration files, install a boot
288 loader, etc.), boot it and have a fully-functional Gentoo Linux system. After
289 your basic Gentoo Linux system is running, you can optionally use "CD 2" of
290 our 2-CD set and install any number of pre-built packages such as KDE, GNOME,
291 OpenOffice, Mozilla, or others that you'd like on your system.
292 </p>
293
294 <p>
295 Depending on what stage of the build process you're starting from, here is
296 what is required for installation:
297 </p>
298
299 <table>
300 <tcolumn width="0.75in"/>
301 <tcolumn width="1in"/>
302 <tcolumn width="1.25in"/>
303 <tcolumn width="3.5in"/>
304 <tr>
305 <th>Stage Tarball</th>
306 <th>Internet Access Required</th>
307 <th>Media Required</th>
308 <th>Steps</th>
309 </tr>
310 <tr>
311 <ti>1</ti>
312 <ti>Yes</ti>
313 <ti><e>basic</e> or <e>CD 1</e></ti>
314 <ti>
315 Partition/filesystem setup, emerge sync, bootstrap, emerge system, final
316 config
317 </ti>
318 </tr>
319 <tr>
320 <ti>2</ti>
321 <ti>Yes</ti>
322 <ti><e>basic</e> or <e>CD 1</e></ti>
323 <ti>Partition/filesystem setup, emerge sync, emerge system, final config</ti>
324 </tr>
325 <tr>
326 <ti>3</ti>
327 <ti>No if using <e>CD 1</e>, Yes otherwise</ti>
328 <ti><e>basic</e> or <e>CD 1</e></ti>
329 <ti>
330 Partition/filesystem setup, emerge sync (not required if using <e>CD 1</e>),
331 final config
332 </ti>
333 </tr>
334 <tr>
335 <ti>3+GRP</ti>
336 <ti>No</ti>
337 <ti><e>CD 1</e>, <e>CD 2</e> optionally</ti>
338 <ti>
339 Partition/filesystem setup, final config, install CD 1 pre-built packages
340 (optional), reboot, install extra pre-built packages like KDE and GNOME
341 (if using "CD 2")
342 </ti>
343 </tr>
344 </table>
345
346 <note>
347 Hardware ATA RAID users should read the section about ATA RAID on the bottom
348 of this document before proceeding.
349 </note>
350
351 </body>
352 </section>
353 </chapter>
354
355 <chapter>
356 <title>Booting</title>
357 <section>
358 <body>
359
360 <warn>
361 Read this whole section before proceeding, especially the available boot
362 options. Ignoring this could lead to wrong keyboard settings, unstarted
363 pcmcia services etc..
364 </warn>
365
366 <p>
367 Start by booting your Live CD of choice. You should see a fancy
368 boot screen with the Gentoo Linux logo on it. At this screen, you
369 can hit Enter to begin the boot process, or boot the LiveCD with
370 custom boot options by specifying a kernel followed by boot options
371 and then hitting Enter. For example: <c>gentoo nousb nohotplug</c>.
372 If you are installing Gentoo Linux on a system with more than one
373 processor ("SMP"), then you should type <c>smp</c> instead of
374 <c>gentoo</c> at the prompt. This will allow the LiveCD to see all
375 the processors in your system, not just the first one.
376 </p>
377
378 <p>
379 Consult the following table for a partial list of available kernels and
380 options or press F2 and F3 to view the help screens.
381 </p>
382
383 <table>
384 <tcolumn width="2in"/>
385 <tcolumn width="4in"/>
386 <tr>
387 <th>Available kernels</th>
388 <th>Description</th>
389 </tr>
390 <tr>
391 <ti>gentoo</ti>
392 <ti>Standard gentoo kernel (default)</ti>
393 </tr>
394 <tr>
395 <ti>nofb</ti>
396 <ti>Framebuffer mode disabled</ti>
397 </tr>
398 <tr>
399 <ti>smp</ti>
400 <ti>Loads a smp kernel in noframebuffer mode</ti>
401 </tr>
402 <tr>
403 <ti>acpi</ti>
404 <ti>Enables acpi=on + loads acpi modules during init</ti>
405 </tr>
406 <tr>
407 <ti>memtest</ti>
408 <ti>Boots the memory testing program</ti>
409 </tr>
410 </table>
411
412 <table>
413 <tcolumn width="2in"/>
414 <tcolumn width="4in"/>
415 <tr>
416 <th>Available boot options</th>
417 <th>Description</th>
418 </tr>
419 <tr>
420 <ti>doataraid</ti>
421 <ti>Loads ide raid modules from initrd</ti>
422 </tr>
423 <tr>
424 <ti>dofirewire</ti>
425 <ti>Modprobes firewire modules in initrd (for firewire cdroms,etc.)</ti>
426 </tr>
427 <tr>
428 <ti>dokeymap</ti>
429 <ti>Enable keymap selection for non-us keyboard layouts</ti>
430 </tr>
431 <tr>
432 <ti>dopcmcia</ti>
433 <ti>Starts pcmcia service</ti>
434 </tr>
435 <tr>
436 <ti>doscsi</ti>
437 <ti>Scan for scsi devices (breaks some ethernet cards)</ti>
438 </tr>
439 <tr>
440 <ti>noapm</ti>
441 <ti>Disables apm module load</ti>
442 </tr>
443 <tr>
444 <ti>nodetect</ti>
445 <ti>Causes hwsetup/kudzu and hotplug not to run</ti>
446 </tr>
447 <tr>
448 <ti>nodhcp</ti>
449 <ti>Dhcp does not automatically start if nic detected</ti>
450 </tr>
451 <tr>
452 <ti>nohotplug</ti>
453 <ti>Disables loading hotplug service</ti>
454 </tr>
455 <tr>
456 <ti>noraid</ti>
457 <ti>Disables loading of evms modules</ti>
458 </tr>
459 <tr>
460 <ti>nousb</ti>
461 <ti>Disables usb module load from initrd, disables hotplug</ti>
462 </tr>
463 <tr>
464 <ti>ide=nodma</ti>
465 <ti>Force disabling of dma for malfunctioning ide devices</ti>
466 </tr>
467 <tr>
468 <ti>cdcache</ti>
469 <ti>
470 Cache the entire runtime portion of cd in ram. This uses 40mb of RAM, but
471 allows you to umount <path>/mnt/cdrom</path> and mount another cdrom.
472 </ti>
473 </tr>
474 </table>
475
476 <p>
477 Once you hit Enter, you will be greeted with an even fancier boot
478 screen and progress bar.
479 </p>
480
481 <warn>
482 If your screen turns blank instead of giving you a fancy boot screen, try
483 booting with the <e>nofb</e> kernel. It is highly likely that our kernel
484 doesn't support your graphical adapter for framebuffer (grafical mode
485 without X server).
486 </warn>
487
488 <p>
489 Once the boot process completes, you will be automatically logged in
490 to the "Live" Gentoo Linux as "<e>root</e>", the "super user". You should
491 have a root ("#") prompt on the current console and can also switch
492 to other consoles by pressing Alt-F2, Alt-F3 and Alt-F4. Get back to the one
493 you started on by pressing Alt-F1.
494 </p>
495
496 <note>
497 <b>Advanced users:</b> When the Live CD boots, the Live CD root password is
498 set to a random string for security purposes. If you plan to start
499 <c>sshd</c> to allow remote logins to your Live CD, you should set the Live
500 CD root password now by typing <c>passwd</c> and following the prompts.
501 Otherwise, you will not know the proper password for logging into the Live
502 CD over the network.
503 </note>
504
505 <p>
506 You've probably also noticed that above your # prompt is a bunch of
507 help text that explains how to do things like configure your Linux networking
508 and telling you where you can find the Gentoo Linux stage tarballs and packages
509 on your CD.
510 </p>
511
512 </body>
513 </section>
514 </chapter>
515
516 <chapter>
517 <title>Optional hardware configuration</title>
518 <section>
519 <body>
520
521 <p>
522 When the Live CD boots, it tries to detect all your hardware
523 devices and loads the appropiate kernel modules to support your
524 hardware. In the vast majority of cases, it does a very good job.
525 However, in some cases, it may not auto-load the kernel modules
526 you need. If the PCI auto-detection missed some of your system's hardware, you
527 will have to load the appropriate kernel modules manually.
528 To view a list of all available network card modules, type <c>ls
529 /lib/modules/`uname -r`/kernel/drivers/net/*</c>. To load a particular module,
530 type:
531 </p>
532
533 <pre caption="PCI Modules Configuration">
534 <comment>(replace pcnet32 with your NIC module)</comment>
535 # <i>modprobe pcnet32</i>
536 </pre>
537
538 <p>
539 Likewise, if you want to be able to access any SCSI hardware that wasn't
540 detected during the initial boot autodetection process, you will need to
541 load the appropriate modules from <path>/lib/modules</path>, again using
542 <c>modprobe</c>:
543 </p>
544
545 <pre caption="Loading SCSI Modules">
546 <comment>(replace aic7xxx with your SCSI adapter module)</comment>
547 # <i>modprobe aic7xxx</i>
548 <comment>(sd_mod is the module for SCSI disk support)</comment>
549 # <i>modprobe sd_mod</i>
550 </pre>
551
552 <note>
553 Support for SCSI CD-ROMs and disks are built-in in the kernel.
554 </note>
555
556 <note>
557 <b>Advanced users:</b> The Gentoo LiveCD should have enabled DMA
558 on your disks so that disk transfers are as fast as possible, but if it did not,
559 <c>hdparm</c> can be used to set DMA on your drives as follows:
560 <pre caption="Setting DMA">
561 <comment>(Replace hdX with your disk device)</comment>
562 <comment>(Enables DMA:)</comment>
563 # <i>hdparm -d 1 /dev/hdX</i>
564 <comment>(Enables DMA and other safe performance-enhancing options:)</comment>
565 # <i>hdparm -d1 -A1 -m16 -u1 -a64 /dev/hdX</i>
566 <comment>(Force-enables Ultra-DMA -- dangerous -- may cause some drives to mess up:)</comment>
567 # <i>hdparm -X66 /dev/hdX</i>
568 </pre>
569 </note>
570
571
572 </body>
573 </section>
574 </chapter>
575 <chapter>
576 <title>Optional Networking configuration</title>
577 <section>
578 <title>Maybe it just works?</title>
579 <body>
580
581 <p>
582 If your system is plugged into an Ethernet network, it is very
583 likely that your networking configuration has already been
584 set up automatically for you. If so, you should be able to take advantage of
585 the many included network-aware commands on the LiveCD such as <c>ssh</c>,
586 <c>scp</c>, <c>ping</c>, <c>irssi</c>, <c>wget</c> and <c>links</c>, among
587 others.
588 </p>
589
590 <p>
591 If networking has been configured for you, the <c>/sbin/ifconfig</c> command
592 should list some internet interfaces besides lo, such as eth0:
593 </p>
594
595 <pre caption="/sbin/ifconfig for a working network card">
596 eth0 Link encap:Ethernet HWaddr 00:50:BA:8F:61:7A
597 inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
598 inet6 addr: fe80::50:ba8f:617a/10 Scope:Link
599 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
600 RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0
601 TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0
602 collisions:1984 txqueuelen:100
603 RX bytes:485691215 (463.1 Mb) TX bytes:123951388 (118.2 Mb)
604 Interrupt:11 Base address:0xe800
605 </pre>
606
607 <p>
608 You may want to also try pinging your ISP's DNS server (found in
609 <path>/etc/resolv.conf</path>) and a Web site of choice, just to make sure
610 that your packets are reaching the net, DNS name resolution is working
611 correctly, etc..
612 </p>
613
614 <pre caption="Further Network Testing">
615 # <i>ping -c 3 www.yahoo.com</i>
616 </pre>
617
618 <p>
619 Are you able to use your network? If so, you can skip the rest of this
620 section.
621 </p>
622
623 </body>
624 </section>
625 <section>
626 <title>PPPoE configuration</title>
627 <body>
628
629 <p>
630 Assuming you need PPPoE to connect to the internet, the LiveCD (any version)
631 has made things easy for you by including <c>rp-pppoe</c>. Use the provided
632 <c>adsl-setup</c> script to configure your connection. You will be prompted
633 for the ethernet device that is connected to your adsl modem, your username
634 and password, the IPs of your DNS servers and if you need a basic firewall
635 or not.
636 </p>
637
638 <pre caption="Configuring PPPoE">
639 # <i> adsl-setup </i>
640 # <i> adsl-start </i>
641 </pre>
642
643 <p>
644 If something goes wrong, double-check that you correctly typed your username
645 and password by looking at <path>/etc/ppp/pap-secrets</path> or
646 <path>/etc/ppp/chap-secrets</path> and make sure you are using the right
647 ethernet device.
648 </p>
649
650 </body>
651 </section>
652 <section>
653 <title>Automatic Network Configuration </title>
654 <body>
655
656 <p>
657 The simplest way to set up networking if it didn't get configured
658 automatically is to run the <c>net-setup</c> script:
659 </p>
660
661 <pre caption="Net-Setup Script">
662 # <i>net-setup eth0</i>
663 </pre>
664
665 <p>
666 Of course, if you prefer, you may still set up networking manually. This is
667 covered next.
668 </p>
669
670 </body>
671 </section>
672 <section>
673 <title>Manual DHCP Configuration</title>
674 <body>
675
676 <p>
677 Network configuration is simple with DHCP; If your ISP is not using
678 DHCP, skip down to the static configuration section below.
679 </p>
680
681 <pre caption="Network configuration with DHCP">
682 # <i>dhcpcd eth0</i>
683 </pre>
684
685 <note>
686 Some ISPs require you to provide a hostname. To do that, add a
687 <c>-h myhostname</c> flag to the dhcpcd command line above.
688 </note>
689
690 <p>
691 If you receive <e>dhcpConfig</e> warnings, don't panic; the errors are most
692 likely cosmetic. Skip down to Network testing below.
693 </p>
694
695 </body>
696 </section>
697 <section>
698 <title>Manual Static Configuration</title>
699 <body>
700
701 <p>
702 We need to setup just enough networking so that we can download sources for
703 the system build, as well as the required localhost interface. The needed
704 information is explained in the next table.
705 </p>
706
707 <table>
708 <tcolumn width="1.25in"/>
709 <tcolumn width="4in"/>
710 <tcolumn width="1.25in"/>
711 <tr>
712 <th>Information</th>
713 <th>Description</th>
714 <th>Example value</th>
715 </tr>
716 <tr>
717 <ti>IP address</ti>
718 <ti>The IP address you want to assign to your network card</ti>
719 <ti>192.168.1.2</ti>
720 </tr>
721 <tr>
722 <ti>Broadcast address</ti>
723 <ti>
724 The IP address which will broadcast the packets to all the hosts in the
725 network
726 </ti>
727 <ti>192.168.1.255</ti>
728 </tr>
729 <tr>
730 <ti>Network mask</ti>
731 <ti>
732 The mask which is used together with the IP address to see what part of the
733 address is for network-identification and host-identification
734 </ti>
735 <ti>255.255.255.0</ti>
736 </tr>
737 <tr>
738 <ti>Gateway</ti>
739 <ti>
740 The IP address of the computer which will forward the packets that are not
741 meant for the local network (most of the time the computer which shares the
742 internet connection)
743 </ti>
744 <ti>192.168.1.1</ti>
745 </tr>
746 </table>
747
748 <p>
749 Type in the following commands, replacing <c>$IFACE</c> with your network
750 interface (typically <c>eth0</c>), <c>$IPNUM</c> with your IP address,
751 <c>$BCAST</c> with your broadcast address and <c>$NMASK</c> with your network
752 mask. For the <c>route</c> command, replace <c>$GTWAY</c> with your default
753 gateway.
754 </p>
755
756 <pre caption="Static IP Network Configuration">
757 # <i>ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK</i>
758 # <i>route add -net default gw $GTWAY netmask 0.0.0.0 metric 1 $IFACE</i>
759 </pre>
760
761 <p>
762 Now it is time to create the <path>/etc/resolv.conf</path> file so that name
763 resolution (finding Web/FTP sites by name, rather than just by IP address)
764 will work. You can use <c>nano -w /etc/resolv.conf</c> to create
765 <path>/etc/resolv.conf</path>. <c>nano</c> is a small and easy-to-use
766 editor.
767 </p>
768
769 <p>
770 Here is a template to follow for creating your <path>/etc/resolv.conf</path>
771 file:
772 </p>
773
774 <pre caption="/etc/resolv.conf template">
775 domain mydomain.com
776 nameserver 10.0.0.1
777 nameserver 10.0.0.2
778 </pre>
779
780 <p>
781 Replace <c>10.0.0.1</c> and <c>10.0.0.2</c> with the IP addresses of your
782 primary and secondary DNS servers respectively.
783 </p>
784
785 </body>
786 </section>
787 <section>
788 <title>Proxy Configuration</title>
789 <body>
790
791 <p>
792 If you are behind a proxy, it could be necessary to configure your proxy
793 before you continue. We will export some variables to set up the proxy
794 accordingly.
795 </p>
796
797 <pre caption="Setting a Proxy">
798 <comment>(If the proxy restricts HTTP traffic:)</comment>
799 # <i>export http_proxy="http://machine.company.com:1234"</i>
800 <comment>(If the proxy restricts FTP traffic:)</comment>
801 # <i>export ftp_proxy="ftp://machine.company.com"</i>
802 <comment>(If the proxy restricts RSYNC traffic:)</comment>
803 # <i>export RSYNC_PROXY="rsync://machine.company.com"</i>
804 </pre>
805
806 <note>
807 If your proxy requires authentification, use a construct like
808 <c>http://username:password@machine.company.com</c> (note the added
809 &quot;username:password@&quot;).
810 </note>
811
812 </body>
813 </section>
814 <section>
815 <title>Networking is go!</title>
816 <body>
817
818 <p>
819 Networking should now be configured and usable. You should be able to use the
820 included <c>ssh</c>, <c>scp</c>, <c>links</c>, <c>irssi</c> and <c>wget</c>
821 commands to connect to other machines on your LAN or the Internet.
822 </p>
823
824 </body>
825 </section>
826 </chapter>
827
828 <chapter>
829 <title>Setting your system's date and time</title>
830 <section>
831 <body>
832
833 <p>
834 Now you need to set your system's date and time. You can do this using the
835 <c>date</c> command.
836 </p>
837
838 <pre caption="Setting your system's date">
839 # <i>date</i>
840 Thu Feb 27 09:04:42 CST 2003
841 <comment>(If your date is wrong, set your date with this next command:)</comment>
842 # <i>date 022709042003</i>
843 <comment>(date MMDDhhmmCCYY)</comment>
844 </pre>
845
846 </body>
847 </section>
848 </chapter>
849
850 <chapter>
851 <title>Filesystems, partitions and block devices</title>
852 <section>
853 <title>Introduction to block devices</title>
854 <body>
855
856 <p>
857 In this section, we'll take a good look at disk-oriented aspects of Gentoo
858 Linux and Linux in general, including Linux filesystems, partitions and block
859 devices. Then, once you're familiar with the ins and outs of disks and
860 filesystems, you'll be guided through the process of setting up partitions
861 and filesystems for your Gentoo Linux installation.
862 </p>
863
864 <p>
865 To begin, I'll introduce "block devices". The most famous block device is
866 probably the one that represents the first IDE drive in a Linux system:
867 </p>
868
869 <pre caption="/dev/hda, the block device representing the primary master IDE drive in your system">
870 /dev/hda
871 </pre>
872
873 <p>
874 If your system uses SCSI drives, then your first hard drive will be:
875 </p>
876
877 <pre caption="/dev/sda, the block device representing the first logical SCSI drive in your system">
878 /dev/sda
879 </pre>
880
881 <p>
882 The block devices above represent an <e>abstract</e> interface to the disk.
883 User programs can use these block devices to interact with your disk without
884 worrying about whether your drives are IDE, SCSI or something else. The
885 program can simply address the storage on the disk as a bunch of contiguous,
886 randomly-accessible 512-byte blocks.
887 </p>
888
889 </body>
890 </section>
891 <section>
892 <title>Partitions and fdisk</title>
893 <body>
894
895 <p>
896 Under Linux, we create filesystems by using a special command called
897 <c>mkfs</c> (or <c>mke2fs</c>, <c>mkreiserfs</c>, etc.), specifying a particular
898 block device as a command-line argument.
899 </p>
900
901 <p>
902 However, although it is theoretically possible to use a "whole disk" block
903 device (one that represents the <e>entire</e> disk) like <path>/dev/hda</path>
904 or <path>/dev/sda</path> to house a single filesystem, this is almost never
905 done in practice. Instead, full disk block devices are split up into smaller,
906 more manageable block devices called "partitions". Partitions are created
907 using a tool called <c>fdisk</c>, which is used to create and edit the
908 partition table that's stored on each disk. The partition table defines
909 exactly how to split up the full disk.
910 </p>
911
912 <p>
913 We can take a look at a disk's partition table by running <c>fdisk</c>,
914 specifying a block device that represents a full disk as an argument:
915 </p>
916
917 <note>
918 Alternate interfaces to the disk's partition table include <c>cfdisk</c>,
919 <c>parted</c> and <c>partimage</c>. We recommend <c>fdisk</c> because it's
920 more powerful and well known in the Unix/Linux world.
921 </note>
922
923 <pre caption="Starting up fdisk">
924 # <i>fdisk /dev/hda</i>
925 </pre>
926
927 <p>
928 or
929 </p>
930
931 <pre caption="Starting up fdisk to look at the partition table on /dev/sda">
932 # <i>fdisk /dev/sda</i>
933 </pre>
934
935 <impo>
936 Note that you should <e>not</e> save or make any changes to a disk's
937 partition table if any of its partitions contain filesystems that are in use or
938 contain important data. Doing so will generally cause data on the disk to be
939 lost.
940 </impo>
941
942 <p>
943 Once in <c>fdisk</c>, you'll be greeted with a prompt that looks like this:
944 </p>
945
946 <pre caption="The fdisk prompt">
947 Command (m for help):
948 </pre>
949
950 <p>
951 Type <c>p</c> to display your disk's current partition configuration:
952 </p>
953
954 <pre caption="An example partition configuration">
955 Command (m for help): <i>p</i>
956
957 Disk /dev/hda: 240 heads, 63 sectors, 2184 cylinders
958 Units = cylinders of 15120 * 512 bytes
959
960 Device Boot Start End Blocks Id System
961 /dev/hda1 1 14 105808+ 83 Linux
962 /dev/hda2 15 49 264600 82 Linux swap
963 /dev/hda3 50 70 158760 83 Linux
964 /dev/hda4 71 2184 15981840 5 Extended
965 /dev/hda5 71 209 1050808+ 83 Linux
966 /dev/hda6 210 348 1050808+ 83 Linux
967 /dev/hda7 349 626 2101648+ 83 Linux
968 /dev/hda8 627 904 2101648+ 83 Linux
969 /dev/hda9 905 2184 9676768+ 83 Linux
970
971 Command (m for help):
972 </pre>
973
974 <p>
975 This particular disk is configured to house seven Linux filesystems (each
976 with a corresponding partition listed as "Linux") as well as a swap partition
977 (listed as "Linux swap").
978 </p>
979
980 <p>
981 Notice the name of the corresponding partition block
982 devices on the left hand side, starting with <path>/dev/hda1</path> and going
983 up to <path>/dev/hda9</path>. In the early days of the PC, partitioning
984 software only allowed a maximum of four partitions (called "primary"
985 partitions). This was too limiting, so a workaround called <e>extended
986 partitioning</e> was created. An extended partition is very similar to a
987 primary partition and counts towards the primary partition limit of four.
988 However, extended partitions can hold any number of so-called <e>logical</e>
989 partitions inside them, providing an effective means of working around the
990 four partition limit.
991 </p>
992
993 <p>
994 All partitions <path>/dev/hda5</path> and higher are logical partitions.
995 The numbers 1 through 4 are reserved for primary or extended partitions.
996 </p>
997
998 <p>
999 So, In our example, <path>/dev/hda1</path> through <path>/dev/hda3</path> are
1000 primary partitions. <path>/dev/hda4</path> is an extended partition that
1001 contains logical partitions <path>/dev/hda5</path> through
1002 <path>/dev/hda9</path>. You would never actually <e>use</e>
1003 <path>/dev/hda4</path> for storing any filesystems directly -- it simply
1004 acts as a container for partitions <path>/dev/hda5</path> through
1005 <path>/dev/hda9</path>.
1006 </p>
1007
1008 <p>
1009 Also, notice that each partition has an "Id", also called a "partition
1010 type". Whenever you create a new partition, you should ensure that the
1011 partition type is set correctly. '83' is the correct partition type for
1012 partitions that will be housing Linux filesystems, '82' is the correct
1013 partition type for Linux swap partitions and 'fd' is the recommended partition
1014 type for Software RAID partitions. You set the partition type using the
1015 <c>t</c> option in <c>fdisk</c>. The Linux kernel uses the partition type
1016 setting to auto-detect filesystems and swap devices on the disk at boot-time.
1017 </p>
1018
1019 </body>
1020 </section>
1021 <section>
1022 <title>Using fdisk to set up partitions</title>
1023 <body>
1024
1025 <p>
1026 Now that you've had your introduction to the way disk partitioning is
1027 done under Linux, it's time to walk you through the process of setting up disk
1028 partitions for your Gentoo Linux installation. After we walk you through the
1029 process of creating partitions on your disk, your partition configuration will
1030 look like this:
1031 </p>
1032
1033 <pre caption="The partition configuration that you will have after following these steps">
1034 Disk /dev/hda: 30.0 GB, 30005821440 bytes
1035 240 heads, 63 sectors/track, 3876 cylinders
1036 Units = cylinders of 15120 * 512 = 7741440 bytes
1037
1038 Device Boot Start End Blocks Id System
1039 /dev/hda1 * 1 14 105808+ 83 Linux
1040 /dev/hda2 15 81 506520 82 Linux swap
1041 /dev/hda3 82 3876 28690200 83 Linux
1042
1043 Command (m for help):
1044 </pre>
1045
1046 <p>
1047 In our suggested "newbie" partition configuration, we have three partitions.
1048 The first one (<path>/dev/hda1</path>) at the beginning of the disk is a small
1049 partition called a boot partition. The boot partition's purpose is to hold all
1050 the critical data related to booting -- GRUB boot loader information (if you
1051 will be using GRUB) as well as your Linux kernel(s). The boot partition gives
1052 us a safe place to store everything related to booting Linux. During normal
1053 day-to-day Gentoo Linux use, your boot partition should remain <e>unmounted</e>
1054 for safety. If you are setting up a SCSI system, your boot partition will
1055 likely end up being <path>/dev/sda1</path>.
1056 </p>
1057
1058 <p>
1059 It's recommended to have boot partitions (containing everything necessary for
1060 the boot loader to work) at the beginning of the disk. While not necessarily
1061 required anymore, it is a useful tradition from the days when the lilo boot
1062 loader wasn't able to load kernels from filesystems that extended beyond disk
1063 cylinder 1024.
1064 </p>
1065
1066 <p>
1067 The second partition (<path>/dev/hda2</path>) is used to for swap space. The
1068 kernel uses swap space as virtual memory when RAM becomes low. This partition,
1069 relatively speaking, isn't very big either, typically somewhere around 512MB.
1070 If you're setting up a SCSI system, this partition will likely end up
1071 being called <path>/dev/sda2</path>.
1072 </p>
1073
1074 <p>
1075 The third partition (<path>/dev/hda3</path>) is quite large and takes up the
1076 rest of the disk. This partition is called our "root" partition and will be
1077 used to store your main filesystem that houses Gentoo Linux itself. On a SCSI
1078 system, this partition would likely end up being <path>/dev/sda3</path>.
1079 </p>
1080
1081 <p>
1082 Before we partition the disk, here's a quick technical overview of the
1083 suggested partition and filesystem configuration to use when installing Gentoo
1084 Linux:
1085 </p>
1086
1087 <table>
1088 <tcolumn width="1.5in"/>
1089 <tcolumn width="2.5in"/>
1090 <tcolumn width="2.5in"/>
1091 <tcolumn width="1in"/>
1092 <tr>
1093 <th>Partition</th>
1094 <th>Size</th>
1095 <th>Type</th>
1096 <th>Example device</th>
1097 </tr>
1098 <tr>
1099 <ti>Boot partition, containing kernel(s) and boot information</ti>
1100 <ti>32 Megabytes</ti>
1101 <ti>
1102 Ext2/3 highly recommended (easiest); if ReiserFS then mount with <c>-o
1103 notail</c>. If you will be using ext3 or ReiserFS, you must add the size of
1104 the journal to the partitionsize; in these cases 64 Megabytes is
1105 recommended.
1106 </ti>
1107 <ti><path>/dev/hda1</path></ti>
1108 </tr>
1109 <tr>
1110 <ti>Swap partition (no longer a 128 Megabyte limit, now 2GB)</ti>
1111 <ti>
1112 Generally, configure a swap area that is between one and two times the
1113 size of the physical RAM in your system
1114 </ti>
1115 <ti>Linux swap</ti>
1116 <ti><path>/dev/hda2</path></ti>
1117 </tr>
1118 <tr>
1119 <ti>Root partition, containing main filesystem (/usr, /home, etc.)</ti>
1120 <ti>&gt;=1.5 Gigabytes</ti>
1121 <ti>ReiserFS, ext3 recommended; ext2 ok</ti>
1122 <ti><path>/dev/hda3</path></ti>
1123 </tr>
1124 </table>
1125
1126 <p>
1127 OK, now to create the partitions as in the example and table above. First,
1128 enter fdisk by typing <c>fdisk /dev/hda</c> or <c>fdisk /dev/sda</c>,
1129 depending on whether you're using IDE or SCSI. Then, type <c>p</c> to view your
1130 current partition configuration. Is there anything on the disk that you need
1131 to keep? If so, <b>stop now</b>. If you continue with these directions, <b>all
1132 existing data on your disk will be erased</b>.
1133 </p>
1134
1135 <impo>
1136 Following these instructions below will cause all prior data on your disk
1137 to <b>be erased</b>! If there is anything on your drive, please be sure that it
1138 is non-critical information that you don't mind losing. Also make sure that you
1139 <b>have selected the correct drive</b> so that you don't mistakenly wipe data
1140 from the wrong drive.
1141 </impo>
1142
1143 <p>
1144 Now, it's time to delete any existing partitions. To do this, type <c>d</c>
1145 and hit Enter. You will then be prompted for the partition number you would like
1146 to delete. To delete a pre-existing <path>/dev/hda1</path>, you would type:
1147 </p>
1148
1149 <pre caption="Deleting a partition">
1150 Command (m for help): <i>d</i>
1151 Partition number (1-4): <i>1</i>
1152 </pre>
1153
1154 <p>
1155 The partition has been scheduled for deletion. It will no longer show up if
1156 you type <c>p</c>, but it will not be erased until your changes have been
1157 saved. If you made a mistake and want to abort without saving your changes,
1158 type <c>q</c> immediately and hit enter and your partition will not be
1159 deleted.
1160 </p>
1161
1162 <p>
1163 Now, assuming that you do indeed want to wipe out all the partitions on your
1164 system, repeatedly type <c>p</c> to print out a partition listing and then type
1165 <c>d</c> and the number of the partition to delete it. Eventually, you'll end up
1166 with a partition table with nothing in it:
1167 </p>
1168
1169 <pre caption="An empty partition table">
1170 Disk /dev/hda: 30.0 GB, 30005821440 bytes
1171 240 heads, 63 sectors/track, 3876 cylinders
1172 Units = cylinders of 15120 * 512 = 7741440 bytes
1173
1174 Device Boot Start End Blocks Id System
1175
1176 Command (m for help):
1177 </pre>
1178
1179 <p>
1180 Now that the in-memory partition table is empty, we're ready to create a
1181 boot partition. To do this, type <c>n</c> to create a new partition, then
1182 <c>p</c> to tell fdisk you want a primary partition. Then type <c>1</c> to
1183 create the first primary partition. When prompted for the first cylinder, hit
1184 enter. When prompted for the last cylinder, type <c>+32M</c> to create a
1185 partition 32MB in size. You can see output from these steps below:
1186 </p>
1187
1188 <note>
1189 Journaled filesystems require extra space for their journal. Default settings
1190 require about 33 Megabytes of space. Therefore, if you are using a journaled
1191 filesystem for <path>/boot</path>, you should type <c>+64M</c> when prompted
1192 for the last cylinder.
1193 </note>
1194
1195 <pre caption="Steps to create our boot partition">
1196 Command (m for help): <i>n</i>
1197 Command action
1198 e extended
1199 p primary partition (1-4)
1200 <i>p</i>
1201 Partition number (1-4): <i>1</i>
1202 First cylinder (1-3876, default 1): <comment>(Hit Enter)</comment>
1203 Using default value 1
1204 Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): <i>+32M</i>
1205 </pre>
1206
1207 <p>
1208 Now, when you type <c>p</c>, you should see the following partition
1209 printout:
1210 </p>
1211
1212 <pre caption="Our first partition has been created">
1213 Command (m for help): <i>p</i>
1214
1215 Disk /dev/hda: 30.0 GB, 30005821440 bytes
1216 240 heads, 63 sectors/track, 3876 cylinders
1217 Units = cylinders of 15120 * 512 = 7741440 bytes
1218
1219 Device Boot Start End Blocks Id System
1220 /dev/hda1 1 14 105808+ 83 Linux
1221 </pre>
1222
1223 <p>
1224 Next, let's create the swap partition. To do this, type <c>n</c> to create a
1225 new partition, then <c>p</c> to tell fdisk that you want a primary partition.
1226 Then type <c>2</c> to create the second primary partition,
1227 <path>/dev/hda2</path> in our case. When prompted for the first cylinder,
1228 hit enter. When prompted for the last cylinder, type <c>+512M</c> to create
1229 a partition 512MB in size. After you've done this, type <c>t</c> to set the
1230 partition type, <c>2</c> to select the partition you just created and then
1231 type in <c>82</c> to set the partition type to "Linux Swap". After completing
1232 these steps, typing <c>p</c> should display a partition table that looks
1233 similar to this:
1234 </p>
1235
1236 <pre caption="Our swap partition has been created">
1237 Command (m for help): <i>p</i>
1238
1239 Disk /dev/hda: 30.0 GB, 30005821440 bytes
1240 240 heads, 63 sectors/track, 3876 cylinders
1241 Units = cylinders of 15120 * 512 = 7741440 bytes
1242
1243 Device Boot Start End Blocks Id System
1244 /dev/hda1 1 14 105808+ 83 Linux
1245 /dev/hda2 15 81 506520 82 Linux swap
1246 </pre>
1247
1248 <p>
1249 Finally, let's create the root partition. To do this, type <c>n</c> to
1250 create a new partition, then <c>p</c> to tell fdisk that you want a primary
1251 partition. Then type <c>3</c> to create the third primary partition,
1252 <path>/dev/hda3</path> in our case. When prompted for the first cylinder,
1253 hit enter. When prompted for the last cylinder, hit enter to create a
1254 partition that takes up the rest of the remaining space on your disk. After
1255 completing these steps, typing <c>p</c> should display a partition table that
1256 looks similar to this:
1257 </p>
1258
1259 <pre caption="Our root partition has been created">
1260 Command (m for help): <i>p</i>
1261
1262 Disk /dev/hda: 30.0 GB, 30005821440 bytes
1263 240 heads, 63 sectors/track, 3876 cylinders
1264 Units = cylinders of 15120 * 512 = 7741440 bytes
1265
1266 Device Boot Start End Blocks Id System
1267 /dev/hda1 1 14 105808+ 83 Linux
1268 /dev/hda2 15 81 506520 82 Linux swap
1269 /dev/hda3 82 3876 28690200 83 Linux
1270 </pre>
1271
1272 <p>
1273 Finally, we need to set the "bootable" flag on our boot partition and then write
1274 our changes to disk. To tag <path>/dev/hda1</path> as a "bootable" partition,
1275 type <c>a</c> at the menu and then type in <c>1</c> for the partition number.
1276 If you type <c>p</c> now, you'll now see that <path>/dev/hda1</path> has a
1277 <c>*</c> in the "Boot" column. Now, let's write our changes to disk. To do
1278 this, type <c>w</c> and hit enter. Your disk partitions are now properly
1279 configured for a Gentoo Linux install.
1280 </p>
1281
1282 <note>
1283 If <c>fdisk</c> or <c>cfdisk</c> instruct you to do so, please reboot to
1284 allow your system to detect the new partition configuration.
1285 </note>
1286
1287 </body>
1288 </section>
1289 <section>
1290 <title>Creating filesystems</title>
1291 <body>
1292
1293 <p>
1294 Now that the partitions have been created, it's time to set up filesystems on
1295 the boot and root partitions so that they can be mounted and used to store
1296 data. We will also configure the swap partition to serve as swap storage.
1297 </p>
1298
1299 <p>
1300 Gentoo Linux supports a variety of different types of filesystems; each type has
1301 its strengths and weaknesses and its own set of performance characteristics.
1302 Currently, we support the creation of ext2, ext3, XFS, JFS and ReiserFS
1303 filesystems.
1304 </p>
1305
1306 <p>
1307 ext2 is the tried and true Linux filesystem but doesn't have metadata
1308 journaling, which means that routine ext2 filesystem checks at startup time can
1309 be quite time-consuming. There is now quite a selection of newer-generation
1310 <e>journaled</e> filesystems that can be checked for consistency very quickly
1311 and are thus generally preferred over their non-journaled counterparts.
1312 Journaled filesystems prevent long delays when you boot your system and your
1313 filesystem happens to be in an <e>inconsistent</e> state.
1314 </p>
1315
1316 <p>
1317 ext3 is the journaled version of the ext2 filesystem, providing metadata
1318 journaling for fast recovery in addition to other enhanced journaling modes
1319 like full data and ordered data journaling. ext3 is a very good and reliable
1320 filesystem. It offers generally decent performance under most conditions.
1321 Because it does not extensively employ the use of "trees" in its internal
1322 design, it doesn't scale very well, meaning that it is not an ideal choice for
1323 very large filesystems, or situations where you will be handling very large
1324 files or large quantities of files in a single directory. But when used within
1325 its design parameters, ext3 is an excellent filesystem.
1326 </p>
1327
1328 <p>
1329 ReiserFS is a B*-tree based filesystem that has very good overall
1330 performance and greatly outperforms both ext2 and ext3 when dealing with small
1331 files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
1332 extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
1333 now rock-solid and highly recommended for use both as a general-purpose
1334 filesystem and for extreme cases such as the creation of large filesystems, the
1335 use of many small files, very large files and directories containing tens of
1336 thousands of files. ReiserFS is the filesystem we recommend by default for all
1337 non-boot partitions.
1338 </p>
1339
1340 <p>
1341 XFS is a filesystem with metadata journaling that is fully supported under
1342 Gentoo Linux's <c>xfs-sources</c> kernel. It comes with a robust
1343 feature-set and is optimized for scalability. We only recommend using this
1344 filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
1345 a uninterruptible power supply. Because XFS aggressively caches in-transit data
1346 in RAM, improperly designed programs (those that don't take proper precautions
1347 when writing files to disk and there are quite a few of them) can lose a good
1348 deal of data if the system goes down unexpectedly.
1349 </p>
1350
1351 <p>
1352 JFS is IBM's high-performance journaling filesystem. It has recently
1353 become production-ready and there hasn't been a sufficient track record to
1354 comment positively nor negatively on its general stability at this
1355 point.
1356 </p>
1357
1358 <p>
1359 If you're looking for the most rugged journaling filesystem, use ext3. If
1360 you're looking for a good general-purpose high-performance filesystem with
1361 journaling support, use ReiserFS; both ext3 and ReiserFS are mature,
1362 refined and recommended for general use.
1363 </p>
1364
1365 <p>
1366 Based on our example above, we will use the following commands to initialize
1367 all our partitions for use:
1368 </p>
1369
1370 <pre caption="Initializing our partitions (example)">
1371 # <i>mke2fs /dev/hda1</i>
1372 # <i>mkswap /dev/hda2</i>
1373 # <i>mkreiserfs /dev/hda3</i>
1374 </pre>
1375
1376 <p>
1377 We choose ext2 for our <path>/dev/hda1</path> boot partition because it is a
1378 robust filesystem supported by all major boot loaders. We used
1379 <c>mkswap</c> for our <path>/dev/hda2</path> swap partition -- the choice is
1380 obvious here. And for our main root filesystem on <path>/dev/hda3</path> we
1381 choose ReiserFS, since it is a solid journaling filesystem offering excellent
1382 performance. Now, go ahead and initialize your partitions.
1383 </p>
1384
1385 <p>
1386 For your reference, here are the various <c>mkfs</c>-like commands available
1387 during the installation process:
1388 </p>
1389
1390 <p>
1391 <c>mkswap</c> is the command that is used to initialize swap partitions:
1392 </p>
1393
1394 <pre caption="Initializing Swap">
1395 # <i>mkswap /dev/hda2</i>
1396 </pre>
1397
1398 <p>
1399 You can use the <c>mke2fs</c> command to create ext2 filesystems:
1400 </p>
1401
1402 <pre caption="Creating an ext2 Filesystem">
1403 # <i>mke2fs /dev/hda1</i>
1404 </pre>
1405
1406 <p>
1407 If you would like to use ext3, you can create ext3 filesystems using
1408 <c>mke2fs -j</c>:
1409 </p>
1410
1411 <pre caption="Creating an ext3 Filesystem">
1412 # <i>mke2fs -j /dev/hda3</i>
1413 </pre>
1414
1415 <note>
1416 You can find out more about using ext3 under Linux 2.4 at
1417 <uri>http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html</uri>.
1418 </note>
1419
1420 <p>
1421 To create ReiserFS filesystems, use the <c>mkreiserfs</c> command:
1422 </p>
1423
1424 <pre caption="Creating a ReiserFS Filesystem">
1425 # <i>mkreiserfs /dev/hda3</i>
1426 </pre>
1427
1428 <p>
1429 To create an XFS filesystem, use the <c>mkfs.xfs</c> command:
1430 </p>
1431
1432 <pre caption="Creating a XFS Filesystem">
1433 # <i>mkfs.xfs /dev/hda3</i>
1434 </pre>
1435
1436 <note>
1437 You may want to add a couple of additional flags to the <c>mkfs.xfs</c>
1438 command: <c>-d agcount=3 -l size=32m</c>. The <c>-d agcount=3</c> command
1439 will lower the number of allocation groups. XFS will insist on using at
1440 least 1 allocation group per 4 GB of your partition, so, for example, if
1441 you have a 20 GB partition you will need a minimum agcount of 5. The
1442 <c>-l size=32m</c> command increases the journal size to 32 Mb, increasing
1443 performance.
1444 </note>
1445
1446 <p>
1447 To create JFS filesystems, use the <c>mkfs.jfs</c> command:
1448 </p>
1449
1450 <pre caption="Creating a JFS Filesystem">
1451 # <i>mkfs.jfs /dev/hda3</i>
1452 </pre>
1453
1454 </body>
1455 </section>
1456 </chapter>
1457
1458 <chapter>
1459 <title>Mount Partitions</title>
1460 <section>
1461 <body>
1462
1463 <p>
1464 Now, we will activate our newly-initialized swap volume, since we may need
1465 the additional virtual memory that it provides later:
1466 </p>
1467
1468 <pre caption="Activating Swap">
1469 # <i>swapon /dev/hda2</i>
1470 </pre>
1471
1472 <p>
1473 Next, we will create the <path>/mnt/gentoo/boot</path> mount point,
1474 and we will mount our filesystems to the mount points. Once our boot and
1475 root filesystems are mounted, any files we copy or create inside
1476 <path>/mnt/gentoo</path> will be placed on our new filesystems.
1477 Note that if you are setting up Gentoo Linux with separate
1478 <path>/usr</path> or <path>/var</path> filesystems, these would get mounted to
1479 <path>/mnt/gentoo/usr</path> and <path>/mnt/gentoo/var</path> respectively.
1480 </p>
1481
1482 <impo>
1483 If your <path>/boot</path> partition (the one holding the kernel) is ReiserFS,
1484 be sure to mount it with the <c>-o notail</c> option so GRUB gets properly
1485 installed. Make sure that <c>notail</c> ends up in your new
1486 <path>/etc/fstab</path> boot partition entry, too.
1487 We will get to that in a bit. If you are going to use LILO with ReiserFS,
1488 then the <c>-o notail</c> is not needed. It's always safe to specify the
1489 <c>-o notail</c> option with ReiserFS if you're not sure what to do.
1490 </impo>
1491
1492 <pre caption="Creating Mount Points">
1493 # <i>mount /dev/hda3 /mnt/gentoo</i>
1494 # <i>mkdir /mnt/gentoo/boot</i>
1495 # <i>mount /dev/hda1 /mnt/gentoo/boot</i>
1496 </pre>
1497
1498 <impo>
1499 If you are having problems mounting your boot partition with ext2, try using
1500 <c>mount /dev/hXX /mnt/gentoo/boot -t ext2</c>
1501 </impo>
1502
1503 </body>
1504 </section>
1505 </chapter>
1506
1507 <chapter>
1508 <title>Stage tarballs and chroot</title>
1509 <section>
1510 <title>Selecting the desired stage tarball</title>
1511 <body>
1512
1513 <p>
1514 Now, you need to decide which one you would like to use as a
1515 basis for the install if you haven't already. The stages on the Live CD are
1516 in <path>/mnt/cdrom/stages/</path> and you can type <c>ls
1517 /mnt/cdrom/stages/</c> to see what's available on your CD.
1518 </p>
1519
1520 <p>
1521 <b>GRP users</b> should use the <path>stage3-xx-yy.tar.bz2</path> tarball.
1522 </p>
1523
1524 <p>
1525 If you would like to perform an install using a stage tarball that is
1526 <e>not</e> on your CD (which will likely be the case if you're using our
1527 "basic" Live CD), this is still possible, but you'll need to download the
1528 stage you want using the following instructions. If you already have the stage
1529 tarball you want to use (which most users will have), then proceed to the
1530 "Extracting the stage tarball" section.
1531 </p>
1532
1533 <note>
1534 If you want to use a proxy (say proxy.server.tld:8080), add
1535 <c>-http-proxy proxy.server.tld:8080</c> to the <c>links</c> command
1536 mentioned below.
1537 </note>
1538
1539 <pre caption="Downloading Required Stages">
1540 # <i>cd /mnt/gentoo</i>
1541 <comment>Use links to get the URL for your tarball:</comment>
1542 # <i>links http://gentoo.oregonstate.edu/releases/x86/1.4/</i>
1543 <comment>Use <c>Up</c> and <c>Down</c> arrows keys (or the <c>TAB</c> key) to go to the right directory
1544 Highlight the appropriate stage you want to download
1545 Press <c>d</c> which will initiate the download
1546 Save the file and quit the browser
1547
1548 <b>OR</b> use wget from the command line:</comment>
1549 # <i>wget </i><comment>(insert URL to the required stage tarball here)</comment>
1550 </pre>
1551
1552 </body>
1553 </section>
1554 <section>
1555 <title>Extracting the stage tarball</title>
1556 <body>
1557
1558 <p>
1559 Now it is time to extract the compressed stage tarball of your choice to
1560 <path>/mnt/gentoo/</path>. Remember, you only need to unpack <b>one</b> stage
1561 tarball, either a stage1, stage2 or stage3. So, if you wanted to perform a
1562 stage3 install of Gentoo, then you would just unpack the stage3 tarball.
1563 Unpack the stage tarball as follows:
1564 </p>
1565
1566 <impo>
1567 Be sure to use the <c>p</c> option with <c>tar</c>. Forgetting to do this will
1568 cause certain files to have incorrect permissions.
1569 </impo>
1570
1571 <pre caption="Unpacking the Stages">
1572 # <i>cd /mnt/gentoo</i>
1573 <comment>Change "stage3" to "stage2" or "stage1" if you want to start from these stages instead.</comment>
1574 <comment>If you downloaded your stage tarball, change the path below to begin with "/mnt/gentoo/"
1575 instead of "/mnt/cdrom/stages/".</comment>
1576 # <i>tar -xvjpf /mnt/cdrom/stages/stage3-*.tar.bz2</i>
1577 </pre>
1578
1579 <p>
1580 If you downloaded your stage tarball to <path>/mnt/gentoo</path>, you can now
1581 delete it by typing <c>rm /mnt/gentoo/stage*.tar.bz2</c>.
1582 </p>
1583
1584 </body>
1585 </section>
1586
1587 <section>
1588 <title>GRP package/snapshot steps</title>
1589 <body>
1590
1591 <impo>
1592 The following instructions are for GRP users only. If you are not using
1593 GRP, continue with "Selecting Mirrors (Optional)".
1594 </impo>
1595
1596 <p>
1597 <b>GRP Users</b>: There is a Portage snapshot on the Live CD. You will
1598 need to use this snapshot so that you can skip the <c>emerge sync</c> step
1599 later in this document, since <c>emerge sync</c> requires a network
1600 connection. Untar this snapshot as follows:
1601 </p>
1602
1603 <pre caption="Using Portage snapshot">
1604 <comment>Replace yyyymmdd with the datestamp in the filename.</comment>
1605 # <i>tar -xvjf /mnt/cdrom/snapshots/portage-yyyymmdd.tar.bz2 -C /mnt/gentoo/usr</i>
1606 </pre>
1607
1608 <p>
1609 This will extract a snapshot of the Portage tree to your fresh Gentoo
1610 install. Now you won't need to connect to the Internet and use <c>emerge
1611 sync</c> to download a Portage tree. Now, copy distfiles and packages
1612 from the Live CD into place:
1613 </p>
1614
1615 <pre caption="Copying GRP files">
1616 # <i>cp -R /mnt/cdrom/distfiles /mnt/gentoo/usr/portage/distfiles</i>
1617 # <i>cp -a /mnt/cdrom/packages /mnt/gentoo/usr/portage/packages</i>
1618 </pre>
1619
1620 <p>
1621 All relevant files are now in place for using GRP. You should now have
1622 everything copied over and unpacked that you'll need to install Gentoo Linux
1623 -- even without a network connection.
1624 </p>
1625
1626 </body>
1627 </section>
1628 <section>
1629 <title>Selecting Mirrors (Optional)</title>
1630 <body>
1631
1632 <p>
1633 <c>mirrorselect</c> is a tool designed to automatically pick the fastest
1634 mirrors based on your location, or manually pick a mirror from a list.
1635 Unfortunately, <c>mirrorselect</c> does not work well behind all routers.
1636 </p>
1637
1638 <pre caption="Using mirrorselect">
1639 <comment>(To select a mirror automatically:)</comment>
1640 # <i>mirrorselect -a -s4 -o &gt;&gt; /mnt/gentoo/etc/make.conf</i>
1641 <comment>(To select a mirror interactively:)</comment>
1642 # <i>mirrorselect -i -o &gt;&gt; /mnt/gentoo/etc/make.conf</i>
1643 </pre>
1644
1645 <p>
1646 If for some reason <c>mirrorselect</c> fails you should be able to
1647 continue with this guide since no changes are made. One of the reasons why
1648 <c>mirrorselect</c> can fail is simply because it isn't there.
1649 <c>mirrorselect</c> isn't available from all installation media.
1650 </p>
1651
1652 </body>
1653 </section>
1654 <section>
1655 <title>Entering the chroot</title>
1656 <body>
1657
1658 <p>
1659 Next, we will <c>chroot</c> over to the new Gentoo Linux build installation to
1660 "enter" the new Gentoo Linux system:
1661 </p>
1662
1663 <note>
1664 You may receive a notice during <c>env-update</c> telling you that
1665 <path>/etc/make.profile/make.defaults</path> isn't available: ignore it. We are
1666 going to issue <c>emerge sync</c> later on in this document, which will resolve
1667 the problem.
1668 </note>
1669
1670 <pre caption="Prepping and entering the chroot environment">
1671 # <i>mount -t proc proc /mnt/gentoo/proc</i>
1672 # <i>cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</i>
1673 # <i>chroot /mnt/gentoo /bin/bash</i>
1674 # <i>env-update</i>
1675 Regenerating /etc/ld.so.cache...
1676 # <i>source /etc/profile</i>
1677 <comment>(The above points your shell to the new paths and updated binaries)</comment>
1678 </pre>
1679
1680 <p>
1681 After you execute these commands, you will be "inside" your new Gentoo Linux
1682 environment in <path>/mnt/gentoo</path>. We can perform the rest of the
1683 installation process inside the chroot.
1684 </p>
1685
1686 </body>
1687 </section>
1688 </chapter>
1689
1690 <chapter>
1691 <title>Getting the Current Portage Tree using sync</title>
1692 <section>
1693 <body>
1694
1695 <impo>
1696 If you are doing a GRP install then you can ignore the following section on
1697 <c>emerge sync</c>.
1698 </impo>
1699
1700 <p>
1701 Now, you will need to run <c>emerge sync</c>. This command tells Portage
1702 to download the most recent copy of the Gentoo Linux Portage tree from the
1703 Internet. If you extracted a Portage tree snapshot from <e>CD 1</e> earlier,
1704 you can safely skip this step. The Portage tree contains all the scripts
1705 (called ebuilds) used to build every package under Gentoo Linux. Currently,
1706 we have ebuild scripts for close to 4000 packages. Once <c>emerge sync</c>
1707 completes, you will have a complete Portage tree in
1708 <path>/usr/portage</path>:
1709 </p>
1710
1711 <pre caption="Updating Using sync">
1712 # <i>emerge sync</i>
1713 </pre>
1714
1715 <p>
1716 If you are warned that a new Portage version is available and that you should
1717 update Portage, run <c>emerge -u portage</c> to get your Portage up to date:
1718 </p>
1719
1720 <pre caption="Updating Portage">
1721 # <i>emerge -u portage</i>
1722 </pre>
1723
1724 </body>
1725 </section>
1726 </chapter>
1727
1728 <chapter>
1729 <title>Setting Gentoo optimizations (make.conf)</title>
1730 <section>
1731 <body>
1732
1733 <p>
1734 Now that you have a working copy of the Portage tree, it is time to
1735 customize the optimization and optional build-time settings to use on your
1736 Gentoo Linux system. Portage will use these settings when compiling any
1737 programs for you. To do this, edit the file <path>/etc/make.conf</path>. In
1738 this file, you should set your USE flags, which specify optional
1739 functionality that you would like to be built into packages if available;
1740 generally, the defaults (an <e>empty</e> or unset USE variable) are fine.
1741 More information on USE flags can be found in the <uri
1742 link="http://www.gentoo.org/doc/en/use-howto.xml">Gentoo Guide to USE
1743 flags</uri>. A complete list of current USE flags can be found in the <uri
1744 link="http://www.gentoo.org/dyn/use-index.xml">Gentoo Linux Use Variable
1745 Descriptions</uri> document.
1746 </p>
1747
1748 <p>
1749 If you are starting from a stage1 tarball, You also should set appropriate
1750 CHOST, CFLAGS and CXXFLAGS settings for the kind of system that you are
1751 creating (commented examples can be found further down in the file).
1752 </p>
1753
1754 <warn>
1755 If you are using a stage2 or stage3 tarball, these settings will already be
1756 configured optimally. The CHOST-setting <e>may not</e> be changed as this
1757 could lead to a broken system.
1758 </warn>
1759
1760 <warn>
1761 <b>Advanced users:</b> If you are planning on installing an
1762 ACCEPT_KEYWORDS="~x86" Gentoo system, do not set ACCEPT_KEYWORDS until
1763 the bootstrap phase (stage1) is done.
1764 </warn>
1765
1766 <impo>
1767 <b>Advanced users:</b> The CFLAGS and CXXFLAGS settings are used to tell the
1768 C and C++ compiler how to optimize the code that is generated on your system.
1769 It is common for users with Athlon XP processors to specify a
1770 "-march=athlon-xp" setting in their CFLAGS and CXXFLAGS settings so that all
1771 packages built will be optimized for the instruction set and performance
1772 characteristics of their CPU, for example. The <path>/etc/make.conf</path>
1773 file contains a general guide for the proper settings of CFLAGS and CXXFLAGS.
1774 </impo>
1775
1776 <!-- needs qa
1777 <note>
1778 <b>Advanced users:</b>If you are building from a stage1 and don't want
1779 to manually configure CFLAGS and CXXFLAGS, you can use the <c>genflags</c>
1780 utility, which will try to guess accurate flags for your CPU architecture.
1781 Simply type <c>emerge -O genflags</c> and then execute
1782 <c>info2flags</c>. <c>info2flags</c> will suggest CHOST, CFLAGS and
1783 CXXFLAGS settings, which you can then add to
1784 <path>/etc/make.conf</path>.
1785 </note>
1786 -->
1787
1788 <p>
1789 If necessary, you can also set proxy information here if you are behind a
1790 firewall. Use the following command to edit <path>/etc/make.conf</path>
1791 using <c>nano</c>, a simple visual editor:
1792 </p>
1793
1794 <pre caption="Setting make.conf Options">
1795 # <i>nano -w /etc/make.conf</i>
1796 </pre>
1797
1798 <note>
1799 <b>Advanced users:</b> People who need to substantially customize the build
1800 process should take a look at the <path>/etc/make.globals</path> file. This
1801 file comprises gentoo defaults and should never be touched. If the defaults
1802 do not suffice, then new values should be put in <path>/etc/make.conf</path>,
1803 as entries in <path>make.conf</path> <e>override</e> the entries
1804 in <path>make.globals</path>. If you're interested in customizing USE
1805 settings, look in <path>/etc/make.profile/make.defaults</path>.
1806 If you want to turn off any USE settings found here, add an appropriate
1807 <c>USE="-foo"</c> in <path>/etc/make.conf</path> to turn off any <c>foo</c>
1808 USE setting enabled by default in <path>/etc/make.globals</path> or
1809 <path>/etc/make.profile/make.defaults</path>.
1810 </note>
1811
1812 <warn>
1813 Make sure not to add '<c>static</c>' to your USE variables until after
1814 stage1.
1815 </warn>
1816
1817 </body>
1818 </section>
1819 </chapter>
1820
1821 <chapter>
1822 <title>Starting from Stage1</title>
1823 <section>
1824 <body>
1825
1826 <note>
1827 If you are not starting from a stage1 tarball, skip this section.
1828 </note>
1829
1830 <p>
1831 The stage1 tarball is for complete customization and optimization. If you
1832 have picked this tarball, you are most likely looking to have an
1833 uber-optimized and up-to-date system. Have fun! Installing from a stage1
1834 takes a lot of time, but the result is a system that has been optimized
1835 from the ground up for your specific machine and needs.
1836 </p>
1837
1838 <p>
1839 Now, it is time to start the "bootstrap" process. This process takes
1840 about two hours on a 1200MHz AMD Athlon system. During this time, the GNU
1841 C library, compiler suite and other key system programs will be built. Start
1842 the bootstrap as follows:
1843 </p>
1844
1845 <pre caption="Bootstrapping">
1846 # <i>cd /usr/portage</i>
1847 # <i>scripts/bootstrap.sh</i>
1848 </pre>
1849
1850 <p>
1851 The "bootstrap" process will now begin.
1852 </p>
1853
1854 <note>
1855 <c>bootstrap.sh</c> now supports the <c>--fetchonly</c> option. Dial-up
1856 users will find this especially handy. It will download all bootstrap related
1857 files in one go for later compilation. See <c>bootstrap.sh -h</c> for more
1858 information.
1859 </note>
1860
1861 <note>
1862 Portage by default uses <path>/var/tmp</path> during package building,
1863 often using several hundred megabytes of temporary storage. If you would
1864 like to change where Portage stores these temporary files, set a new
1865 PORTAGE_TMPDIR <e>before</e> starting the bootstrap process, as follows:
1866 <pre caption="Changing Portage's Storage Path">
1867 # <i>export PORTAGE_TMPDIR="/otherdir/tmp"</i>
1868 </pre>
1869 </note>
1870
1871 <p>
1872 <c>bootstrap.sh</c> will build <c>binutils</c>, <c>gcc</c>, <c>gettext</c>,
1873 and <c>glibc</c>, rebuilding <c>gettext</c> after <c>glibc</c>. Needless to
1874 say, this process takes a while. Once this process completes, your system
1875 will be equivalent to a "stage2" system, which means you can now move on to
1876 the stage2 instructions.
1877 </p>
1878
1879 </body>
1880 </section>
1881 </chapter>
1882
1883 <chapter>
1884 <title>Starting from Stage2 and continuing Stage1</title>
1885 <section>
1886 <body>
1887
1888 <note>
1889 This section is for those continuing a stage1 install or starting at stage2. If
1890 this is not you (ie. you're using a stage3), then skip this section.
1891 </note>
1892
1893 <warn>
1894 If you start from stage2, don't change the CHOST variable in
1895 <path>/etc/make.conf</path>. Doing so results in strange and
1896 broad compilation failures.
1897 </warn>
1898
1899 <p>
1900 The stage2 tarball already has the bootstrapping done for you. All that you
1901 have to do is install the rest of the system:
1902 </p>
1903
1904 <note>
1905 If you are starting from a pre-built stage2 and want to ensure
1906 that your compiler toolchain is fully up-to-date, add the <c>-u</c>
1907 option to the commands below. If you don't know what this means, it's
1908 safe to skip this suggestion.
1909 </note>
1910
1911 <pre caption="Installing the rest of the system">
1912 # <i>emerge -p system</i>
1913 <comment>(lists the packages to be installed)</comment>
1914 # <i>emerge system</i>
1915 </pre>
1916
1917 <p>
1918 It is going to take a while to finish building the entire base system.
1919 Your reward is that it will be thoroughly optimized for your system.
1920 The drawback is that you have to find a way to keep yourself occupied for
1921 some time to come. The author suggests "Star Wars - Super Bombad Racing"
1922 for the PS2.
1923 </p>
1924
1925 <p>
1926 Building is now complete. Go ahead and skip down to the "Setting
1927 your time zone" section.
1928 </p>
1929
1930 </body>
1931 </section>
1932 </chapter>
1933
1934 <chapter>
1935 <title>Starting from Stage3</title>
1936 <section>
1937 <body>
1938
1939 <note>
1940 This section is for those <b>starting</b> with stage3 and not for those who
1941 have started with stage1 or stage2 who should skip this section. GRP users
1942 should skip ahead to the next section.
1943 </note>
1944
1945 <warn>
1946 Remember, if you start from stage3, don't change the CHOST variable in
1947 <path>/etc/make.conf</path>. Doing so can result in compilation failures.
1948 </warn>
1949
1950 <p>
1951 The stage3 tarball provides a fully-functional basic Gentoo system,
1952 so no building is required.
1953 </p>
1954
1955 <note>
1956 <b>Advanced users:</b> However, since the stage3 tarball is pre-built, it
1957 may be slightly out-of-date. If this is a concern for you, you can
1958 automatically update your existing stage3 to contain the most up-to-date
1959 versions of all system packages by making a backup of
1960 <path>/etc/make.conf</path>, then typing <c>CONFIG_PROTECT="-*"
1961 emerge -u system</c> (this requires a network connection) and replacing
1962 the backup afterwards. Note that this could take a long time if your stage3 is
1963 very old; otherwise, this process will generally be quick and will allow you
1964 to benefit from the very latest Gentoo updates and fixes. In any case, feel
1965 free to skip these steps and proceed to the next section if you like.
1966 </note>
1967
1968 </body>
1969 </section>
1970 </chapter>
1971
1972 <chapter>
1973 <title>Setting your time zone</title>
1974 <section>
1975 <body>
1976
1977 <p>
1978 Now you need to set your time zone.
1979 </p>
1980
1981 <p>
1982 Look for your time zone (or GMT if you are using Greenwich Mean Time)
1983 in <path>/usr/share/zoneinfo</path>. Then, make a symbolic link to
1984 <path>/etc/localtime</path> by typing:
1985 </p>
1986
1987 <pre caption="Creating a symbolic link for time zone">
1988 # <i>ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime</i>
1989 </pre>
1990
1991 </body>
1992 </section>
1993 </chapter>
1994
1995 <chapter>
1996 <title>Modifying /etc/fstab for your machine</title>
1997 <section>
1998 <body>
1999
2000 <impo>
2001 To edit files, remember to use <c>nano -w "filename"</c>.
2002 </impo>
2003
2004 <p>
2005 Your Gentoo Linux system is almost ready for use. All we need to do now is
2006 configure a few important system files and install the boot loader.
2007 The first file we need to configure is <path>/etc/fstab</path>. Remember
2008 that you should use the <c>notail</c> option for your boot partition if
2009 you chose to create a ReiserFS filesystem on it. Remember to specify
2010 <c>ext2</c>, <c>ext3</c> or <c>reiserfs</c> filesystem types as appropriate.
2011 </p>
2012
2013 <warn>
2014 Use something like the <path>/etc/fstab</path> listed below, but of course be
2015 sure to replace "BOOT", "ROOT" and "SWAP" with the actual block devices (such
2016 as <c>hda1</c>, etc.) and "ext2" and "ext3" with the actual filesystems you
2017 are using:
2018 </warn>
2019
2020 <pre caption="Editing fstab">
2021 <comment># /etc/fstab: static file system information.
2022 #
2023 # noatime turns off atimes for increased performance (atimes normally aren't
2024 # needed; notail increases performance of ReiserFS (at the expense of storage
2025 # efficiency). It is safe to drop the noatime options if you want and to
2026 # switch between notail and tail freely.
2027
2028 # &lt;fs&gt; &lt;mount point&gt; &lt;type&gt; &lt;opts&gt; &lt;dump/pass&gt;
2029
2030 # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
2031 </comment>
2032 /dev/BOOT /boot ext2 noauto,noatime 1 2
2033 /dev/ROOT / reiserfs noatime 0 1
2034 /dev/SWAP none swap sw 0 0
2035 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,user 0 0
2036 none /proc proc defaults 0 0
2037 </pre>
2038
2039 <warn>
2040 Please notice that <path>/boot</path> is <e>not</e> mounted at boot time. This
2041 is to protect the data in <path>/boot</path> from corruption. If you need to
2042 access <path>/boot</path>, please mount it!
2043 </warn>
2044
2045 </body>
2046 </section>
2047 </chapter>
2048
2049 <chapter>
2050 <title>Installing the kernel and system logger</title>
2051 <section>
2052 <title>Kernel selections</title>
2053 <body>
2054
2055 <p>
2056 There are two options for installing a kernel. You can either configure your
2057 own kernel or use the <c>genkernel</c> utility to configure and compile your
2058 kernel automatically.
2059 </p>
2060
2061 <p>
2062 Whether configuring a kernel by hand or using <c>genkernel</c>, you'll need
2063 to merge the Linux kernel sources you'd like to use. Gentoo provides
2064 several kernel ebuilds; a list can be found in the <uri
2065 link="/doc/en/gentoo-kernel.xml">Gentoo Linux Kernel Guide</uri>. If you are
2066 uncertain which kernel sources to choose, we advise using
2067 <c>gentoo-sources</c>. If you want XFS support, you should choose
2068 <c>xfs-sources</c> or <c>gs-sources</c>. Gentoo's LiveCD uses
2069 <c>gs-sources</c> and <c>xfs-sources</c>. There is also a
2070 <c>gaming-sources</c> kernel optimized for game-playing responsiveness that
2071 works wonderfully for this purpose when the "Preemptible kernel" option is
2072 enabled.
2073 </p>
2074
2075 <p>
2076 Choose a kernel and then merge as follows:
2077 </p>
2078
2079 <pre caption="Emerging Kernel Sources">
2080 # <i>emerge -k sys-kernel/gentoo-sources</i>
2081 </pre>
2082
2083 <p>
2084 The <path>/usr/src/linux</path> symbolic link will point to your
2085 newly-installed kernel source tree. Portage uses the
2086 <path>/usr/src/linux</path> symbolic link for a special purpose. Any ebuilds
2087 you install that contain kernel modules will be configured to work with the
2088 kernel source tree pointed to by <path>/usr/src/linux</path>.
2089 <path>/usr/src/linux</path> is created when you emerge your first kernel
2090 source package, but after it exists, Portage does not modify this symbolic
2091 link.
2092 </p>
2093
2094 </body>
2095 </section>
2096 <section>
2097 <title>Using genkernel to compile your kernel</title>
2098 <body>
2099
2100 <p>
2101 Now that your kernel source tree is installed, it's now time to compile your
2102 kernel. There are two ways to do this. The first way is to use our new
2103 <c>genkernel</c> script to automatically build a kernel for you.
2104 <c>genkernel</c> works by configuring a kernel nearly identically to the way
2105 our LiveCD kernel is configured. This means that when you use <c>genkernel</c>
2106 to build your kernel, your system will generally detect all your hardware at
2107 boot-time, just like our Live CD does. Because genkernel doesn't require any
2108 manual kernel configuration, it is an ideal solution for those users who may
2109 not be comfortable compiling their own kernels.
2110 </p>
2111
2112 <p>
2113 Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
2114 </p>
2115
2116 <pre caption="Emerging genkernel">
2117 # <i>emerge -k genkernel</i>
2118 </pre>
2119
2120 <p>
2121 Now, compile your kernel sources by running <c>genkernel</c>:
2122 </p>
2123
2124 <note>
2125 <b>Advanced users:</b> you can type <c>genkernel --config</c> instead,
2126 which will cause genkernel to allow you to tweak the default kernel
2127 configuration before building begins.
2128 </note>
2129
2130 <pre caption="Running genkernel">
2131 <comment>If you're using genkernel 1.2 (included in the 1.4-20030803 x86/i686 GRP set), use the following:</comment>
2132 # <i>genkernel gentoo-sources</i>
2133 <comment>If you're using genkernel 1.4 or newer, there's no need to specify a kernel:</comment>
2134 # <i>genkernel</i>
2135 Gentoo Linux genkernel, version 1.4
2136 Copyright 2003 Gentoo Technologies, Inc., Bob Johnson, Daniel Robbins
2137 Distributed under the GNU General Public License version 2
2138
2139 Settings:
2140 compile optimization: 1 processor(s)
2141 source tree: /usr/src/linux-2.4.20-gaming-r3
2142 config: gentoo (customized)
2143 config loc: /etc/kernels/config-2.4.20-gaming-r3
2144 initrd config: (default) /etc/kernels/settings
2145
2146 * Running "make oldconfig"... [ ok ]
2147 * Logging to /var/log/genkernel.log... [ ok ]
2148 * Starting 2.4.20-gaming-r3 build... [ ok ]
2149 * Running "make dep"... [ ok ]
2150 * Running "make bzImage"... [ ok ]
2151 * Running "make modules"... [ ok ]
2152 * Running "make modules_install"... [ ok ]
2153 * Moving bzImage to /boot/kernel-2.4.20-gaming-r3... [ ok ]
2154 * Building busybox... [ ok ]
2155 * Creating initrd... [ ok ]
2156
2157 * Build completed successfully!
2158
2159 * Please specify /boot/kernel-2.4.20-gaming-r3 and /boot/initrd-2.4.20-gaming-r3
2160 * when customizing your boot loader configuration files.
2161 </pre>
2162
2163 <p>
2164 Once <c>genkernel</c> completes, a kernel, full set of modules and
2165 <e>initial root disk</e> (initrd) will be created. We will use the kernel
2166 and initrd when configuring a boot loader later in this document. Write
2167 down the names of the kernel and initrd as you will need it when writing
2168 the bootloader configuration file. The initrd will be started immediately after
2169 booting to perform hardware autodetection (just like on the Live CD) before
2170 your "real" system starts up.
2171 </p>
2172
2173 <p>
2174 Now, let's perform one more step to get our system to be more like the Live
2175 CD -- let's emerge <c>hotplug</c>. While the initrd autodetects hardware that
2176 is needed to boot your system, <c>hotplug</c> autodetects everything else.
2177 To emerge and enable <c>hotplug</c>, type the following:
2178 </p>
2179
2180 <pre caption="Emerging and enabling hotplug">
2181 # <i>emerge -k hotplug</i>
2182 # <i>rc-update add hotplug default</i>
2183 </pre>
2184
2185 <p>
2186 Now that you've run and configured your system to use <c>genkernel</c>, you
2187 can skip the "manual kernel configuration" section below.
2188 </p>
2189
2190 </body>
2191 </section>
2192 <section>
2193 <title>Manual kernel configuration</title>
2194 <body>
2195
2196 <p>
2197 If you opted not to use genkernel to compile your kernel, this section
2198 will guide you through the process of configuring and compiling a kernel by
2199 hand. Please note that <path>/usr/src/linux</path> is a symlink to your
2200 current emerged kernel source package and is set automatically by Portage at
2201 emerge time. If you have multiple kernel source packages, it is necessary to
2202 set the <path>/usr/src/linux</path> symlink to the correct one before
2203 proceeding.
2204 </p>
2205
2206 <warn>
2207 If you are configuring your own kernel, be careful with the <i>grsecurity</i>
2208 option. Being too aggressive with your security settings can cause certain
2209 programs (such as X) to not run properly. If in doubt, leave it out.
2210 </warn>
2211
2212 <note>
2213 If you want to use the same configuration as the LiveCD kernel or base
2214 your configuration on it, you should execute <c>cd /usr/src/linux &amp;&amp; cat /proc/config > .config &amp;&amp; make oldconfig</c>.
2215 If you aren't using <c>xfs-sources</c>, this will ask some questions
2216 about differences between your kernelchoice and <c>xfs-sources</c>.
2217 </note>
2218
2219 <pre caption="Configuring the Linux Kernel">
2220 # <i>cd /usr/src/linux</i>
2221 # <i>make menuconfig</i>
2222 </pre>
2223
2224 <warn>
2225 For your kernel to function properly, there are several options that you will
2226 need to ensure are in the kernel proper -- that is, they should <e>be enabled
2227 and not compiled as modules</e>. Be sure to enable &quot;ReiserFS&quot; if you
2228 have any ReiserFS partitions; the same goes for &quot;Ext3&quot;. If you're
2229 using XFS, enable the &quot;SGI XFS filesystem support&quot; option. It's
2230 always a good idea to leave ext2 enabled whether you are using it or not.
2231 </warn>
2232
2233 <p>
2234 Below are some common options that you will need:
2235 </p>
2236
2237 <pre caption="make menuconfig options">
2238 Code maturity level options ---&gt;
2239 [*] Prompt for development and/or incomplete code/drivers&quot;
2240 <comment>(You need this to enable some of the options below)</comment>
2241 ...
2242
2243 File systems ---&gt;
2244 &lt;*&gt; Reiserfs support
2245 <comment>(Only needed if you are using reiserfs)</comment>
2246 ...
2247 &lt;*&gt; Ext3 journalling file system support
2248 <comment>(Only needed if you are using ext3)</comment>
2249 ...
2250 [*] Virtual memory file system support (former shm fs)
2251 <comment>(Required for Gentoo Linux)</comment>
2252 ...
2253 &lt;*&gt; JFS filesystem support
2254 <comment>(Only needed if you are using JFS)</comment>
2255 ...
2256 [*] /proc file system support
2257 <comment>(Required for Gentoo Linux)</comment>
2258 [*] /dev file system support (EXPERIMENTAL)
2259 [*] Automatically mount at boot
2260 <comment>(Required for Gentoo Linux)</comment>
2261 [ ] /dev/pts file system for Unix98 PTYs
2262 <comment>(Uncheck this, it is not needed unless you use a 2.6 kernel)</comment>
2263 ...
2264 &lt;*&gt; Second extended fs support
2265 <comment>(Only needed if you are using ext2)</comment>
2266 ...
2267 &lt;*&gt; XFS filesystem support
2268 <comment>(Only needed if you are using XFS)</comment>
2269 </pre>
2270
2271 <p>
2272 If you use PPPoE to connect to Internet, you will need the following
2273 options in the kernel (built-in or as preferably as modules) : &quot;PPP
2274 (point-to-point protocol) support&quot;, &quot;PPP support for async serial
2275 ports&quot;, &quot;PPP support for sync tty ports&quot;. The two compression
2276 options won't harm but are not definitely needed, neither does the &quot;PPP
2277 over Ethernet&quot; option, that might only be used by <c>rp-pppoe</c> when
2278 configured to do kernel mode PPPoE.
2279 </p>
2280
2281 <p>
2282 If you have an IDE cd burner, then you need to enable SCSI emulation in the
2283 kernel. Turn on &quot;ATA/IDE/MFM/RLL support&quot; ---&gt; &quot;IDE, ATA
2284 and ATAPI Block devices&quot; ---&gt; &quot;SCSI emulation support&quot;
2285 (I usually make it a module), then under &quot;SCSI support&quot; enable
2286 &quot;SCSI support&quot;, &quot;SCSI CD-ROM support&quot; and &quot;SCSI
2287 generic support&quot; (again, I usually compile them as modules). If you
2288 also choose to use modules, then <c>echo -e &quot;ide-scsi\nsg\nsr_mod&quot;
2289 &gt;&gt; /etc/modules.autoload.d/kernel-2.4</c> to have them automatically
2290 added at boot time.
2291 </p>
2292
2293 <p>
2294 If you require it, don't forget to include support in the kernel for your
2295 ethernet card.
2296 </p>
2297
2298 <note>
2299 For those who prefer it, it is possible to install Gentoo Linux with a 2.2
2300 kernel. However, doing this comes at a price: you will lose many of the nifty
2301 features that are new to the 2.4 series kernels (such as XFS and tmpfs
2302 filesystems, iptables and more), although the 2.2 kernel sources can be
2303 patched with ReiserFS and devfs support.
2304 Gentoo linux boot scripts require either tmpfs or ramdisk support in the
2305 kernel, so 2.2 kernel users need to make sure that ramdisk support is compiled
2306 in (ie, not a module). It is <comment>vital</comment> that a
2307 <e>gentoo=notmpfs</e> flag be added to the kernel line in
2308 <path>/boot/grub/grub.conf</path> or to the append line in
2309 <path>/etc/lilo.conf</path> for the 2.2 kernel so that a ramdisk is mounted
2310 for the boot scripts instead of tmpfs. If you choose not to use devfs, then
2311 <e>gentoo=notmpfs,nodevfs</e> should be used instead.
2312 </note>
2313
2314 <pre caption = "Compiling and Installing the kernel">
2315 # <i>make dep &amp;&amp; make clean bzImage modules modules_install</i>
2316 # <i>cp /usr/src/linux/arch/i386/boot/bzImage /boot</i>
2317 </pre>
2318
2319 </body>
2320 </section>
2321 <section>
2322 <title>Installing additional hardware-specific ebuilds</title>
2323 <body>
2324
2325 <p>
2326 Finally, you should emerge ebuilds for any additional hardware that is on
2327 your system. Here is a list of kernel-related ebuilds that you could emerge:
2328 </p>
2329
2330 <table>
2331 <tcolumn width="1in"/>
2332 <tcolumn width="4in"/>
2333 <tcolumn width="2in"/>
2334 <tr>
2335 <th>Ebuild</th>
2336 <th>Purpose</th>
2337 <th>Command</th>
2338 </tr>
2339 <tr>
2340 <ti>nvidia-kernel</ti>
2341 <ti>Accelerated NVIDIA graphics for XFree86</ti>
2342 <ti><c>emerge -k nvidia-kernel</c></ti>
2343 </tr>
2344 <tr>
2345 <ti>nforce-net</ti>
2346 <ti>On-board ethernet controller on NVIDIA NForce(2) motherboards</ti>
2347 <ti><c>emerge nforce-net</c></ti>
2348 </tr>
2349 <tr>
2350 <ti>nforce-audio</ti>
2351 <ti>On-board audio on NVIDIA NForce(2) motherboards</ti>
2352 <ti><c>emerge nforce-audio</c></ti>
2353 </tr>
2354 <tr>
2355 <ti>e100</ti>
2356 <ti>Intel e100 Fast Ethernet Adapters</ti>
2357 <ti><c>emerge e100</c></ti>
2358 </tr>
2359 <tr>
2360 <ti>e1000</ti>
2361 <ti>Intel e1000 Gigabit Ethernet Adapters</ti>
2362 <ti><c>emerge e1000</c></ti>
2363 </tr>
2364 <tr>
2365 <ti>emu10k1</ti>
2366 <ti>Creative Sound Blaster Live!/Audigy support</ti>
2367 <ti><c>emerge emu10k1</c></ti>
2368 </tr>
2369 <tr>
2370 <ti>ati-drivers</ti>
2371 <ti>Accelerated ATI Radeon 8500+/FireGL graphics for XFree86</ti>
2372 <ti><c>emerge ati-drivers</c></ti>
2373 </tr>
2374 <tr>
2375 <ti>xfree-drm</ti>
2376 <ti>
2377 Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
2378 other cards for XFree86
2379 </ti>
2380 <ti><c>VIDEO_CARDS="yourcard" emerge xfree-drm</c></ti>
2381 </tr>
2382 </table>
2383
2384 <p>
2385 The <c>nvidia-kernel</c>, <c>ati-drivers</c> and <c>xfree-drm</c> packages
2386 will require additional configuration to be enabled. All other ebuilds listed
2387 above should be auto-detected at boot-time by the <c>hotplug</c> package. If
2388 you are not using hotplug, be sure to add the appropriate modules to
2389 <path>/etc/modules.autoload.d/kernel-2.4</path>.
2390 </p>
2391
2392 <p>
2393 More information on <c>xfree-drm</c> can be found in our <uri
2394 link="/doc/en/dri-howto.xml">Direct Rendering Guide</uri>.
2395 </p>
2396
2397
2398 </body>
2399 </section>
2400 <section>
2401 <title>Installing a system logger</title>
2402 <body>
2403
2404 <p>
2405 Your new custom kernel (and modules) are now installed. Now you need to choose
2406 a system logger that you would like to install. We offer sysklogd, which is
2407 the traditional set of system logging daemons. We also have msyslog and
2408 syslog-ng as well as metalog. If in doubt, you may want to try
2409 syslog-ng, since it is very flexible and feature-rich. To merge your logger of
2410 choice, type <e>one</e> of the next four command sets:
2411 </p>
2412
2413 <pre caption="Emerging System Logger of Choice">
2414 # <i>emerge -k app-admin/sysklogd</i>
2415 # <i>rc-update add sysklogd default</i>
2416 <comment>or</comment>
2417 # <i>emerge -k app-admin/syslog-ng</i>
2418 # <i>rc-update add syslog-ng default</i>
2419 <comment>or</comment>
2420 # <i>emerge -k app-admin/metalog</i>
2421 # <i>rc-update add metalog default</i>
2422 <comment>or</comment>
2423 # <i>emerge -k app-admin/msyslog</i>
2424 # <i>rc-update add msyslog default</i>
2425 </pre>
2426
2427 <impo>
2428 If you chose <c>metalogd</c>, please read <uri
2429 link="faq.xml#doc_chap6_sect3">Chapter 6, Section 3 of the Gentoo Linux
2430 FAQ</uri> on metalogd's buffering.
2431 </impo>
2432
2433 <p>
2434 Now, you may optionally choose a cron package that you would like to use.
2435 Right now, we offer dcron, fcron and vcron. If you do not know which one to
2436 choose, you might as well grab vcron.
2437 </p>
2438
2439 <pre caption="Choosing a CRON Daemon">
2440 # <i>emerge -k sys-apps/dcron</i>
2441 # <i>rc-update add dcron default</i>
2442 # <i>crontab /etc/crontab</i>
2443 <comment>or</comment>
2444 # <i>emerge -k sys-apps/fcron</i>
2445 # <i>rc-update add fcron default</i>
2446 # <i>crontab /etc/crontab</i>
2447 <comment>or</comment>
2448 # <i>emerge -k sys-apps/vcron</i>
2449 # <i>rc-update add vcron default</i>
2450 <comment>You do not need to run <i>crontab /etc/crontab</i> if using vcron.</comment>
2451 </pre>
2452
2453 <p>
2454 For more information on starting programs and daemons at startup, see the
2455 <uri link="/doc/en/rc-scripts.xml">Gentoo Linux Init System</uri> Guide.
2456 </p>
2457
2458 </body>
2459 </section>
2460 </chapter>
2461
2462 <chapter>
2463 <title>Installing miscellaneous necessary packages</title>
2464 <section>
2465 <body>
2466
2467 <p>
2468 If you need rp-pppoe to connect to the net, be aware that at this point
2469 it has not been installed. It would be the good time to do it:
2470 </p>
2471
2472 <pre caption="Installing rp-pppoe">
2473 # <i>USE="-X" emerge rp-pppoe</i>
2474 <comment>(GRP users should type the following:)</comment>
2475 # <i>emerge -K rp-pppoe</i>
2476 </pre>
2477
2478 <note>
2479 The <i>USE="-X"</i> prevents pppoe from installing its optional X interface,
2480 which is a good thing, because X and its dependencies would also be emerged.
2481 You can always recompile <i>rp-pppoe</i> with X support later. The GRP version
2482 of rp-pppoe has the optional X interface enabled. If you're not using GRP,
2483 compile from source as in the first example.
2484 </note>
2485 <!-- this pkg is a candidate for moving from .tbz2 to distfiles/ (source) -->
2486
2487
2488 <note>
2489 Please note that the rp-pppoe is built but not configured. You will have to
2490 do it again using <c>adsl-setup</c> when you boot into your Gentoo system
2491 for the first time.
2492 </note>
2493
2494 <p>
2495 You may need to install some additional packages in the Portage tree
2496 if you are using any optional features like XFS, ReiserFS or LVM. If you're
2497 using XFS, you should emerge the <c>xfsprogs</c> package:
2498 </p>
2499
2500 <pre caption="Emerging Filesystem Tools">
2501 # <i>emerge -k xfsprogs</i>
2502 <comment>If you would like to use ReiserFS, you should emerge the ReiserFS tools: </comment>
2503 # <i>emerge -k reiserfsprogs</i>
2504 <comment>If you would like to use JFS, you should emerge the JFS tools: </comment>
2505 # <i>emerge -k jfsutils</i>
2506 <comment>If you're using LVM, you should emerge the <c>lvm-user</c> package: </comment>
2507 # <i>emerge -k lvm-user</i>
2508 </pre>
2509
2510 <p>
2511 If you're a laptop user and wish to use your PCMCIA slots on your first
2512 real reboot, you will want to make sure you install the <i>pcmcia-cs</i>
2513 package.
2514 </p>
2515
2516 <pre caption="Emerging PCMCIA-cs">
2517 # <i>emerge -k sys-apps/pcmcia-cs</i>
2518 </pre>
2519
2520 <!-- fix the bug or fix the docs, don't send the user in circles
2521 (drobbins)
2522 <warn>You will have to re-emerge <i>pcmcia-cs</i> after installation to get PCMCIA
2523 to work.
2524 </warn>
2525 -->
2526
2527 </body>
2528 </section>
2529 </chapter>
2530
2531 <chapter>
2532 <title>User Management</title>
2533 <section>
2534 <title>Setting a root password</title>
2535 <body>
2536
2537 <p>
2538 Before you forget, set the root password by typing:
2539 </p>
2540
2541 <pre caption="Setting the root Password">
2542 # <i>passwd</i>
2543 </pre>
2544
2545 </body>
2546 </section>
2547 <section>
2548 <title>Adding a user for day-to-day use</title>
2549 <body>
2550
2551 <p>
2552 Working as root on a Unix/Linux system is <e>dangerous</e> and
2553 should be avoided as much as possible. Therefor it is <e>strongly</e>
2554 recommended to add a user for day-to-day use:
2555 </p>
2556
2557 <pre caption = "Adding a user">
2558 # <i>useradd your_user -m -G users,wheel,audio -s /bin/bash</i>
2559 # <i>passwd your_user</i>
2560 </pre>
2561
2562 <p>
2563 Substitute <c>your_user</c> with your username.
2564 </p>
2565
2566 <p>
2567 Whenever you need to perform some task that only root can handle,
2568 use <c>su -</c> to change your privileges to root-privileges, or take
2569 a look at the <c>sudo</c> package.
2570 </p>
2571
2572 </body>
2573 </section>
2574 </chapter>
2575
2576 <chapter>
2577 <title>Setting your Hostname</title>
2578 <section>
2579 <body>
2580
2581 <p>
2582 Edit <path>/etc/hostname</path> so that it contains your hostname
2583 on a single line, i.e. <c>mymachine</c>.
2584 </p>
2585
2586 <pre caption="Configuring Hostname">
2587 # <i>echo mymachine &gt; /etc/hostname</i>
2588 </pre>
2589
2590 <p>
2591 Then edit <path>/etc/dnsdomainname</path> so that it contains your DNS
2592 domainname, i.e. <c>mydomain.com</c>.
2593 </p>
2594
2595 <pre caption="Configuring Domainname">
2596 # <i>echo mydomain.com &gt; /etc/dnsdomainname</i>
2597 </pre>
2598
2599 <p>
2600 If you have a NIS domain, you should set it in
2601 <path>/etc/nisdomainname</path>.
2602 </p>
2603
2604 <pre caption="Configuring NIS Domainname">
2605 # <i>echo nis.mydomain.com &gt; /etc/nisdomainname</i>
2606 </pre>
2607
2608 </body>
2609 </section>
2610 </chapter>
2611
2612 <chapter>
2613 <title>Modifying /etc/hosts</title>
2614 <section>
2615 <body>
2616
2617 <p>
2618 This file contains a list of IP addresses and their associated hostnames.
2619 It is used by the system to resolve the IP addresses of any hostnames that
2620 may not be in your nameservers. Here is a template for this file:
2621 </p>
2622
2623 <pre caption="Hosts Template">
2624 127.0.0.1 localhost
2625 <comment># the next line contains your IP for your local LAN and your associated machine name</comment>
2626 192.168.1.1 mymachine.mydomain.com mymachine
2627 </pre>
2628
2629 <note>
2630 If you are on a DHCP network, it might be helpful to add your
2631 machine's actual hostname after <i>localhost</i>. This will help
2632 GNOME and many other programs in name resolution.
2633 </note>
2634
2635 </body>
2636 </section>
2637 </chapter>
2638
2639 <chapter>
2640 <title>Final Network Configuration</title>
2641 <section>
2642 <title>Loading the Kernel Modules</title>
2643 <body>
2644
2645 <p>
2646 Add the names of any modules that are necessary for the proper functioning of
2647 your system to <path>/etc/modules.autoload.d/kernel-2.4</path> file (you can
2648 also add any options you need to the same line). When Gentoo Linux boots, these
2649 modules will be automatically loaded. Of particular importance is your
2650 ethernet card module, if you happened to compile it as a module:
2651 </p>
2652
2653 <pre caption="/etc/modules.autoload.d/kernel-2.4">
2654 <comment>This is assuming that you are using a 3com card.
2655 Check /lib/modules/&lt;kernel version&gt;/kernel/drivers/net for your card. </comment>
2656 3c59x
2657 </pre>
2658
2659 </body>
2660 </section>
2661 <section>
2662 <title>Configuring the Network Interfaces</title>
2663 <body>
2664
2665 <p>
2666 Edit the <path>/etc/conf.d/net</path> script to get your network configured
2667 for your first boot.
2668 </p>
2669
2670 <pre caption="Boot time Network Configuration">
2671 # <i>nano -w /etc/conf.d/net</i>
2672 </pre>
2673
2674 <p>
2675 If you want eth0 to automatically receive its IP, set <c>iface_eth0</c>
2676 to <e>dhcp</e>. Otherwise fill in your IP, broadcast address and
2677 netmask. If you have several interfaces, do the same for <c>iface_eth1</c>,
2678 <c>iface_eth2</c> etc.
2679 </p>
2680
2681 <p>
2682 Now add the <c>net.eth0</c> initscript to the default runlevel <e>if</e>
2683 it isn't a PCMCIA network card:
2684 </p>
2685
2686 <pre caption="Automatically start the network interfaces during boot">
2687 # <i>rc-update add net.eth0 default</i>
2688 </pre>
2689
2690 <p>
2691 If you have multiple network cards or tokenring interfaces, you need to create
2692 additional <path>net.eth</path><comment>x</comment> or
2693 <path>net.tr</path><comment>x</comment> scripts respectively for each one
2694 (<comment>x</comment> = 1, 2, ...):
2695 </p>
2696
2697 <pre caption="Multiple Network Interfaces">
2698 # <i>cd /etc/init.d</i>
2699 # <i>ln -s net.eth0 net.eth<comment>x</comment></i>
2700 </pre>
2701
2702 <p>
2703 Now for each created initscript, add it to the default runlevel (again
2704 only if it isn't a PCMCIA network card):
2705 </p>
2706
2707 <pre caption = "Adding net.ethx to the default runlevel">
2708 # <i>rc-update add net.eth<comment>x</comment> default</i>
2709 </pre>
2710
2711 </body>
2712 </section>
2713 <section>
2714 <title>Only for PCMCIA Users</title>
2715 <body>
2716
2717 <p>
2718 If you have a PCMCIA card installed, have a quick look into
2719 <path>/etc/conf.d/pcmcia</path> to verify that things seem all right for
2720 your setup, then run the following command:
2721 </p>
2722
2723 <pre caption = "Have PCMCIA services start automatically">
2724 # <i>rc-update add pcmcia boot</i>
2725 </pre>
2726
2727 <p>
2728 This makes sure that the PCMCIA drivers are autoloaded whenever your network
2729 is loaded. The appropriate <path>/etc/init.d/net.eth*</path> services
2730 will be started by the pcmcia service automatically.
2731 </p>
2732
2733 </body>
2734 </section>
2735 </chapter>
2736
2737 <chapter>
2738 <title>Final steps: Configure Basic Settings (including the international keymap setting)</title>
2739 <section>
2740 <body>
2741
2742 <pre caption="Basic Configuration">
2743 # <i>nano -w /etc/rc.conf</i>
2744 </pre>
2745
2746 <p>
2747 Follow the directions in the file to configure the basic settings. All users
2748 will want to make sure that CLOCK is set to his/her liking. International
2749 keyboard users will want to set the KEYMAP variable (browse
2750 <path>/usr/share/keymaps</path> to see the various possibilities).
2751 </p>
2752
2753 </body>
2754 </section>
2755 </chapter>
2756
2757 <chapter>
2758 <title>Configure a Bootloader</title>
2759 <section>
2760 <title>Notes</title>
2761 <body>
2762
2763 <p>
2764 In the spirit of Gentoo, users now have more than one bootloader to choose
2765 from. Using our virtual package system, users are now able to choose between
2766 both GRUB and LILO as their bootloaders.
2767 </p>
2768
2769 <p>
2770 Please keep in mind that having both bootloaders installed is not necessary.
2771 In fact, it can be a hindrance, so please only choose one.
2772 </p>
2773
2774 <p>
2775 In addition, you will need to configure our bootloader differently depending
2776 upon whether you are using <c>genkernel</c> (with kernel and initrd) or a
2777 kernel you compiled by hand. Be sure to take note of the important
2778 differences.
2779 </p>
2780
2781 </body>
2782 </section>
2783 <section>
2784 <title>Configuring GRUB</title>
2785 <body>
2786
2787 <p>
2788 The most critical part of understanding GRUB is getting comfortable with how
2789 GRUB refers to hard drives and partitions. Your Linux partition
2790 <path>/dev/hda1</path> is called <path>(hd0,0)</path> under GRUB. Notice the
2791 parenthesis around the hd0,0 - they are required. Hard drives count from zero
2792 rather than "a" and partitions start at zero rather than one. Be aware too
2793 that with the hd devices, only hard drives are counted, not atapi-ide devices
2794 such as cdrom players, burners and that the same construct can be used with
2795 scsi drives. (Normally they get higher numbers than ide drives except when the
2796 bios is configured to boot from scsi devices.) Assuming you have a hard drive
2797 on <path>/dev/hda</path>, a cdrom player on <path>/dev/hdb</path>, a burner on
2798 <path>/dev/hdc</path>, a second hard drive on <path>/dev/hdd</path> and no
2799 SCSI hard drive, <path>/dev/hdd7</path> gets translated to
2800 <path>(hd1,6)</path>. It might sound tricky and tricky it is indeed, but as
2801 we will see, GRUB offers a tab completion mechanism that comes handy for
2802 those of you having a lot of hard drives and partitions and who are a little
2803 lost in the GRUB numbering scheme. Having gotten the feel for that, it is
2804 time to install GRUB.
2805 </p>
2806
2807 <p>
2808 The easiest way to install GRUB is to simply type <c>grub</c> at your chrooted
2809 shell prompt:
2810 </p>
2811
2812 <pre caption="Installing GRUB">
2813 # <i>emerge -k grub</i>
2814 # <i>grub</i>
2815 </pre>
2816
2817 <p>
2818 You will be presented with the <e>grub&gt;</e> grub command-line prompt.
2819 Now, you need to type in the right commands to install the GRUB boot record
2820 onto your hard drive. In my example configuration, I want to install the GRUB
2821 boot record on my hard drive's MBR (master boot record), so that the first
2822 thing I see when I turn on the computer is the GRUB prompt. In my case, the
2823 commands I want to type are:
2824 </p>
2825
2826 <pre caption="GRUB on the MBR">
2827 grub&gt; <i>root (hd0,0)</i> <comment>(Your boot partition)</comment>
2828 grub&gt; <i>setup (hd0)</i> <comment>(Where the boot record is installed; here, it is the MBR)</comment>
2829 </pre>
2830
2831 <pre caption="GRUB not on the MBR">
2832 <comment>Alternatively, if you wanted to install the bootloader somewhere other than the MBR:</comment>
2833 grub&gt; <i>root (hd0,0)</i> <comment>(Your boot partition)</comment>
2834 grub&gt; <i>setup (hd0,4)</i> <comment>(Where the boot record is installed; here it is /dev/hda5)</comment>
2835 grub&gt; <i>quit</i>
2836 </pre>
2837
2838 <p>
2839 Here is how the two commands work. The first <c>root ( )</c> command tells
2840 GRUB the location of your boot partition (in our example,
2841 <path>/dev/hda1</path> or <path>(hd0,0)</path> in GRUB terminology. Then, the
2842 second <c>setup ( )</c> command tells GRUB where to install the boot record -
2843 it will be configured to look for its special files at the <c>root ( )</c>
2844 location that you specified. In my case, I want the boot record on the MBR
2845 of the hard drive, so I simply specify <path>/dev/hda</path> (also known as
2846 <path>(hd0)</path>). If I were using another boot loader and wanted to set up
2847 GRUB as a secondary boot-loader, I could install GRUB to the boot record of
2848 a particular partition. In that case, I would specify a particular partition
2849 rather than the entire disk. Once the GRUB boot record has been successfully
2850 installed, you can type <c>quit</c> to quit GRUB.
2851 </p>
2852
2853 <note>
2854 The tab completion mechanism of GRUB can be used from within GRUB,
2855 assuming you wrote <c> root (</c> and that you hit the TAB key, you would
2856 be prompted with a list of the available devices (not only hard drives),
2857 hitting the TAB key having written <c> root (hd</c>, GRUB would print the
2858 available hard drives and hitting the TAB key after writing <c> root (hd0,</c>
2859 would make GRUB print the list of partitions on the first hard drive.
2860 Checking the syntax of the GRUB location with completion should really help
2861 to make the right choice.
2862 </note>
2863
2864 <p>
2865 Gentoo Linux is now installed, but we need to create the
2866 <path>/boot/grub/grub.conf</path> file so that we get a nice GRUB boot menu
2867 when the system reboots. Here is how to do it.
2868 </p>
2869
2870 <impo>
2871 To ensure backwards compatibility with GRUB, make sure to make a link from
2872 <path>grub.conf</path> to <path>menu.lst</path>. You can do this by typing
2873 <c>ln -s /boot/grub/grub.conf /boot/grub/menu.lst</c>.
2874 </impo>
2875
2876 <p>
2877 Now, create the <path>grub.conf</path> file (<c>nano -w
2878 /boot/grub/grub.conf</c>) and add the following to it:
2879 </p>
2880
2881 <pre caption="grub.conf for GRUB">
2882 default 0
2883 timeout 30
2884 splashimage=(hd0,0)/boot/grub/splash.xpm.gz
2885
2886 <comment># If you compiled your own kernel, use something like this:</comment>
2887 title=My example Gentoo Linux
2888 root (hd0,0)
2889 kernel (hd0,0)/boot/bzImage root=/dev/hda3
2890
2891 <comment># If you're using genkernel, use something like this instead:</comment>
2892 title=My example Gentoo Linux (genkernel)
2893 root (hd0,0)
2894 kernel (hd0,0)/boot/kernel-KV root=/dev/hda3
2895 initrd (hd0,0)/boot/initrd-KV
2896
2897 <comment># Below needed only for people who dual-boot</comment>
2898 title=Windows XP
2899 root (hd0,5)
2900 chainloader (hd0,5)+1
2901 </pre>
2902
2903 <warn>
2904 Substitute <c>KV</c> with the kernel version you have installed.
2905 </warn>
2906
2907 <note>
2908 (hd0,0) should be written without any spaces inside the parentheses.
2909 </note>
2910
2911 <impo>
2912 If you set up SCSI emulation for an IDE cd burner earlier, then to get it to
2913 actually work you need to add an <c>hdx=ide-scsi</c> fragment to the kernel
2914 line in <path>grub.conf</path> (where "hdx" should be the device for your cd
2915 burner).
2916 </impo>
2917
2918 <p>
2919 After saving this file, Gentoo Linux installation is complete. Selecting the
2920 first option will tell GRUB to boot Gentoo Linux without a fuss. The second
2921 part of the <path>grub.conf</path> file is optional and shows you how to use
2922 GRUB to boot a bootable Windows partition.
2923 </p>
2924
2925 <note>
2926 Above, <path>(hd0,0)</path> should point to your "boot" partition
2927 (<path>/dev/hda1</path> in our example config) and <path>/dev/hda3</path>
2928 should point to your root filesystem. <path>(hd0,5)</path> contains the NT
2929 boot loader.
2930 </note>
2931
2932 <note>
2933 The path to the kernel image is relative to the boot partition. If for
2934 example you have separated boot partition <path>(hd0,0)</path> and root
2935 partition <path>(hd0,1)</path>, all paths in the <path>grub.conf</path> file
2936 above will become <path>/bzImage</path>.
2937 </note>
2938
2939 <p>
2940 If you need to pass any additional options to the kernel, simply add them to
2941 the end of the <c>kernel</c> command. We're already passing one option
2942 (<c>root=/dev/hda3</c>), but you can pass others as well. In particular, you
2943 can turn off devfs by default (not recommended unless you know what you're
2944 doing) by adding the <c>gentoo=nodevfs</c> option to the <c>kernel</c>
2945 command.
2946 </p>
2947
2948 <note>
2949 Unlike in earlier versions of Gentoo Linux, you no longer have to add
2950 <c>devfs=mount</c> to the end of the <c>kernel</c> line to enable devfs.
2951 Now devfs is enabled by default.
2952 </note>
2953
2954 </body>
2955 </section>
2956 <section>
2957 <title>Configuring LILO</title>
2958 <body>
2959
2960 <p>
2961 While GRUB may be the new alternative for most people, it is not always the
2962 best choice. LILO, the LInuxLOader, is the tried and true workhorse of Linux
2963 bootloaders. Here is how to install LILO if you would like to use it instead
2964 of GRUB.
2965 </p>
2966
2967 <p>
2968 The first step is to emerge LILO:
2969 </p>
2970
2971 <pre caption="Emerging LILO">
2972 # <i>emerge -k lilo</i>
2973 </pre>
2974
2975 <p>
2976 Now it is time to configure LILO. Here is a sample configuration file
2977 <path>/etc/lilo.conf</path>:
2978 </p>
2979
2980 <pre caption="Example lilo.conf">
2981 boot=/dev/hda
2982 map=/boot/map
2983 install=/boot/boot.b
2984 prompt
2985 timeout=50
2986 lba32
2987 default=linux
2988
2989 <comment># Use something like the following 4 lines if you compiled your kernel yourself</comment>
2990 image=/boot/bzImage
2991 label=linux
2992 read-only
2993 root=/dev/hda3
2994
2995 <comment># If you used genkernel, use something like this:</comment>
2996 image=/boot/kernel-KV
2997 label=gk_linux
2998 root=/dev/hda3
2999 initrd=/boot/initrd-KV
3000 append="root=/dev/hda3 init=/linuxrc"
3001
3002
3003 <comment># For dual booting windows/other OS</comment>
3004 other=/dev/hda1
3005 label=dos
3006 </pre>
3007
3008 <warn>
3009 Substitute <c>KV</c> with the kernel version you have installed, and
3010 make sure that <c>default=</c> points to your label (<c>gk_linux</c> if
3011 you used genkernel).
3012 </warn>
3013
3014 <ul>
3015 <li>
3016 <c>boot=/dev/hda</c> tells LILO to install itself on the first hard disk on
3017 the first IDE controller
3018 </li>
3019 <li>
3020 <c>map=/boot/map</c> states the map file. In normal use, this should not be
3021 modified
3022 </li>
3023 <li>
3024 <c>install=/boot/boot.b</c> tells LILO to install the specified file as the
3025 new boot sector. In normal use, this should not be altered. If the install
3026 line is missing, LILO will assume a default of <path>/boot/boot.b</path> as
3027 the file to be used.
3028 </li>
3029 <li>
3030 The existence of <c>prompt</c> tells LILO to display the classic <e>lilo:</e>
3031 prompt at bootup. While it is not recommended that you remove the prompt line,
3032 if you do remove it, you can still get a prompt by holding down the [Shift]
3033 key while your machine starts to boot.
3034 </li>
3035 <li>
3036 <c>timeout=50</c> sets the amount of time that LILO will wait for user input
3037 before proceeding with booting the default line entry. This is measured in
3038 tenths of a second, with 50 as the default.
3039 </li>
3040 <li>
3041 <c>lba32</c> describes the hard disk geometry to LILO. Another common entry
3042 here is linear. You should not change this line unless you are very aware of
3043 what you are doing. Otherwise, you could put your system in an unbootable
3044 state.
3045 </li>
3046 <li>
3047 <c>default=linux</c> refers to the default operating system for LILO to boot
3048 from the options listed below this line. The name linux refers to the label
3049 line below in each of the boot options.
3050 </li>
3051 <li>
3052 <c>image=/boot/bzImage</c> specifies the linux kernel to boot with this
3053 particular boot option
3054 </li>
3055 <li>
3056 <c>label=linux</c> names the operating system option in the LILO screen. In
3057 this case, it is also the name referred to by the default line.
3058 </li>
3059 <li>
3060 <c>read-only</c> specifies that the root partition (see the root line below)
3061 is read-only and cannot be altered during the boot process.
3062 </li>
3063 <li>
3064 <c>root=/dev/hda3</c> tells LILO what disk partition to use as the root
3065 partition
3066 </li>
3067 </ul>
3068
3069 <p>
3070 After you have edited your <path>lilo.conf</path> file, it is time to run LILO
3071 to load the information into the MBR:
3072 </p>
3073
3074 <pre caption="Running LILO">
3075 # <i>/sbin/lilo</i>
3076 </pre>
3077
3078 <p>
3079 LILO is configured and now your machine is ready to boot into Gentoo Linux!
3080 </p>
3081
3082 </body>
3083 </section>
3084
3085 <section>
3086 <title>Using framebuffer</title>
3087 <body>
3088
3089 <p>
3090 People who have selected framebuffer in their kernel should add <c>vga=xxx</c>
3091 to their bootloader configuration file. <c>xxx</c> is one of the values in the
3092 following table:
3093 </p>
3094
3095 <table>
3096 <tcolumn width="1in"/>
3097 <tcolumn width="1in"/>
3098 <tcolumn width="1in"/>
3099 <tcolumn width="1in"/>
3100 <tr>
3101 <ti></ti>
3102 <th>640x480</th>
3103 <th>800x600</th>
3104 <th>1024x768</th>
3105 <th>1280x1024</th>
3106 </tr>
3107 <tr>
3108 <th>8 bpp</th>
3109 <ti>769</ti>
3110 <ti>771</ti>
3111 <ti>773</ti>
3112 <ti>775</ti>
3113 </tr>
3114 <tr>
3115 <th>16 bpp</th>
3116 <ti>785</ti>
3117 <ti>788</ti>
3118 <ti>791</ti>
3119 <ti>794</ti>
3120 </tr>
3121 <tr>
3122 <th>32 bpp</th>
3123 <ti>786</ti>
3124 <ti>789</ti>
3125 <ti>792</ti>
3126 <ti>795</ti>
3127 </tr>
3128 </table>
3129
3130 <p>
3131 LILO-users will have to add <c>vga=xxx</c> on top of their configuration
3132 file.
3133 </p>
3134
3135 <p>
3136 GRUB-users will have to append <c>vga=xxx</c> to the <c>kernel
3137 (hd0,0)...</c> line.
3138 </p>
3139
3140 </body>
3141 </section>
3142 </chapter>
3143
3144 <chapter>
3145 <title>Creating Bootdisks</title>
3146 <section>
3147 <title>GRUB Bootdisks</title>
3148 <body>
3149
3150 <impo>
3151 Don't forget to insert a floppy in your floppydrive before proceeding.
3152 </impo>
3153
3154 <p>
3155 It is always a good idea to make a boot disk the first
3156 time you install any Linux distribution. This is a security
3157 blanket and generally not a bad thing to do. If your hardware doesn't
3158 let you install a working bootloader from the chrooted environment,
3159 you may <e>need</e> to make a GRUB boot disk.
3160 If you are in this camp, make a GRUB boot disk and when you reboot
3161 the first time you can install GRUB to the MBR. Make your bootdisks
3162 like this:
3163 </p>
3164
3165 <pre caption="Creating a GRUB Bootdisk">
3166 # <i>cd /usr/share/grub/i386-pc/</i>
3167 # <i>cat stage1 stage2 &gt; /dev/fd0</i>
3168 </pre>
3169
3170 <p>
3171 Now reboot and load the floppy. At the floppy's <c>grub&gt;</c> prompt, you
3172 can now execute the necessary <c>root</c> and <c>setup</c> commands.
3173 </p>
3174
3175 </body>
3176 </section>
3177 <section>
3178 <title>LILO Bootdisks</title>
3179 <body>
3180
3181 <impo>
3182 Don't forget to insert a floppy in your floppydrive before proceeding.
3183 </impo>
3184
3185 <p>
3186 If you are using LILO, it is also a good idea to make a bootdisk:
3187 </p>
3188
3189 <pre caption="Making a Bootdisk">
3190 <comment>(This will only work if your kernel is smaller than 1.4MB)</comment>
3191 # <i>dd if=/boot/your_kernel of=/dev/fd0 </i>
3192 </pre>
3193
3194 </body>
3195 </section>
3196 </chapter>
3197
3198 <chapter>
3199 <title>Using GRP</title>
3200 <section>
3201 <body>
3202
3203 <p>
3204 GRP users can, at this point, install binary packages:
3205 </p>
3206
3207 <pre caption="Installing from GRP">
3208 # <i>emerge -k xfree</i>
3209 </pre>
3210
3211 <p>
3212 CD 1 contains enough applications to install a working system with XFree86.
3213 Additionally, CD2 of the 2-CD GRP set contains other applications including
3214 KDE, GNOME, Mozilla and others. To install these packages, you will need to
3215 reboot into your new Gentoo system first (covered in the "Installation
3216 complete!" section near the end of this document). After you are running your
3217 basic Gentoo system from the hard drive, you can mount the second CD and copy
3218 files:
3219 </p>
3220
3221 <pre caption="Loading binary packages from CD2">
3222 # <i>mount /dev/cdrom /mnt/cdrom</i>
3223 # <i>cp -a /mnt/cdrom/packages/* /usr/portage/packages/</i>
3224 </pre>
3225
3226 <p>
3227 Now various other applications can be installed the same way. For example:
3228 </p>
3229
3230 <pre caption="Installing KDE from GRP">
3231 # <i>emerge -k kde</i>
3232 </pre>
3233
3234 </body>
3235 </section>
3236 </chapter>
3237
3238 <chapter>
3239 <title>Installation Complete!</title>
3240 <section>
3241 <body>
3242
3243 <p>
3244 Now, Gentoo Linux is installed. The only remaining step is to update necessary
3245 configuration files, exit the chrooted shell, safely unmount your partitions
3246 and reboot the system:
3247 </p>
3248
3249 <warn>
3250 <c>etc-update</c> can provide you with a list of configuration files
3251 that have newer versions at your disposal. Verify that none of the
3252 configuration files have a big impact (such as <path>/etc/fstab</path>,
3253 <path>/etc/make.conf</path>, <path>/etc/rc.conf</path>, ...). Merge the
3254 files that don't have such a big impact, remove the updates of the
3255 others or view the diff and manually update the configuration file.
3256 </warn>
3257
3258 <pre caption="Rebooting the System">
3259 # <i>etc-update</i>
3260 # <i>exit</i>
3261 <comment>(This exits the chrooted shell; you can also type <i>^D</i>)</comment>
3262 # <i>cd / </i>
3263 # <i>umount /mnt/gentoo/boot</i>
3264 # <i>umount /mnt/gentoo/proc</i>
3265 # <i>umount /mnt/gentoo</i>
3266 # <i>reboot</i>
3267 <comment>(Don't forget to remove the bootable CD)</comment>
3268 </pre>
3269
3270 <note>
3271 After rebooting, it is a good idea to run the <c>modules-update</c> command to
3272 create the <path>/etc/modules.conf</path> file. Instead of modifying this
3273 file directly, you should generally make changes to the files in
3274 <path>/etc/modules.d</path>.
3275 </note>
3276
3277 <p>
3278 If you have any questions or would like to get involved with Gentoo Linux
3279 development, consider joining our gentoo-user and gentoo-dev mailing lists
3280 (more information on our <uri
3281 link="http://www.gentoo.org/main/en/lists.xml">mailing lists</uri> page).
3282 We also have a handy <uri
3283 link="http://www.gentoo.org/doc/en/desktop.xml">Desktop Configuration
3284 Guide</uri> that will help you to continue configuring your new Gentoo Linux
3285 system and a useful <uri
3286 link="http://www.gentoo.org/doc/en/portage-user.xml">Portage User
3287 Guide</uri> to help familiarize you with Portage basics. You can find the
3288 rest of the Gentoo Documentation on our <uri
3289 link="http://www.gentoo.org/main/en/docs.xml">Gentoo Linux User
3290 Documentation Resources</uri> page. If you have any other questions
3291 involving installation or anything for that matter, please check the <uri
3292 link="http://www.gentoo.org/doc/en/faq.xml">Gentoo Linux FAQ</uri>. Enjoy
3293 and welcome to Gentoo Linux!
3294 </p>
3295
3296 </body>
3297 </section>
3298 </chapter>
3299
3300 <!--
3301 Gentoo Stats is down currently. Commenting out for the
3302 time being. I've also changed double-dash to dash-space-dash
3303 because otherwise commenting fails.
3304 <chapter>
3305 <title>Gentoo-Stats</title>
3306 <section>
3307 <body>
3308
3309 <p>
3310 The Gentoo Linux usage statistics program was started as an attempt to give
3311 the developers a way to find out about their user base. It collects information
3312 about Gentoo Linux usage to help us in set priorities our development.
3313 Installing it is completely optional and it would be greatly appreciated if
3314 you decide to use it. Compiled statistics can be viewed at
3315 <uri>http://stats.gentoo.org/</uri>.
3316 </p>
3317
3318 <p>
3319 The gentoo-stats server will assign a unique ID to your system.
3320 This ID is used to make sure that each system is counted only once. The ID
3321 will not be used to individually identify your system, nor will it be matched
3322 against an IP address or other personal information. Every precaution has been
3323 taken to assure your privacy in the development of this system. The following
3324 are the things that we are monitoring right now through our "gentoo-stats"
3325 program:
3326 </p>
3327
3328 <ul>
3329 <li>installed packages and their version numbers</li>
3330 <li>
3331 CPU information: speed (MHz), vendor name, model name, CPU flags (like "mmx"
3332 or "3dnow")
3333 </li>
3334 <li>
3335 Memory information (total available physical RAM, total available swap
3336 space)
3337 </li>
3338 <li>PCI cards and network controller chips</li>
3339 <li>
3340 The Gentoo Linux profile your machine is using (that is, where the
3341 <path>/etc/make.profile</path> link is pointing to)
3342 </li>
3343 </ul>
3344
3345 <p>
3346 We are aware that disclosure of sensitive information is a threat to most
3347 Gentoo Linux users (just as it is to the developers).
3348 </p>
3349
3350 <ul>
3351 <li>
3352 Unless you modify the gentoo-stats program, it will never transmit sensitive
3353 information such as your passwords, configuration data, shoe size...
3354 </li>
3355 <li>
3356 Transmission of your e-mail addresses is optional and turned off by default
3357 </li>
3358 <li>
3359 The IP address your data transmission originates from will never be logged
3360 in such a way that we can identify you. There are no "IP address/system ID"
3361 pairs.
3362 </li>
3363 </ul>
3364
3365 <p>
3366 The installation is easy - just run the following commands:
3367 </p>
3368
3369 <pre caption="Installing gentoo-stats">
3370 # <i>emerge gentoo-stats</i> <comment>(Installs gentoo-stats)</comment>
3371 # <i>gentoo-stats - -new</i> <comment>(Obtains a new system ID)</comment>
3372 </pre>
3373
3374 <p>
3375 The second command above will request a new system ID and enter it into
3376 <path>/etc/gentoo-stats/gentoo-stats.conf</path> automatically. You can view
3377 this file to see additional configuration options.
3378 </p>
3379
3380 <p>
3381 After that, the program should be run on a regular schedule (gentoo-stats does
3382 not have to be run as root). Add this line to your <path>crontab</path>:
3383 </p>
3384
3385 <pre caption="Updating gentoo-stats with cron">
3386 0 0 * * 0,4 /usr/sbin/gentoo-stats - -update &gt; /dev/null
3387 </pre>
3388
3389 <p>
3390 The <c>gentoo-stats</c> program is a simple perl script which can be
3391 viewed with your favorite pager or editor: <path>/usr/sbin/gentoo-stats</path>.
3392 </p>
3393
3394 </body>
3395 </section>
3396 </chapter>
3397
3398 -->
3399
3400 <chapter>
3401 <title>Gentoo On Less-Common Hardware</title>
3402 <section>
3403 <title>Hardware ATA RAID</title>
3404 <body>
3405
3406 <p>
3407 Users who want to install Gentoo on Hardware ATA RAID must pay
3408 attention to the next steps in order for them to succesfully
3409 install Gentoo Linux:
3410 </p>
3411
3412 <ul>
3413 <li>Be sure to start the LiveCD with the <c>doataraid</c> kerneloption</li>
3414 <li>
3415 If you've forgotten to select <c>doataraid</c> during bootup, or the modules
3416 mysteriously didn't load, load them as needed:
3417 <pre caption = "Loading RAID modules">
3418 # <i>modprobe ataraid</i>
3419 <comment>(For Promise Raid Controllers:)</comment>
3420 # <i>modprobe pdcraid</i>
3421 <comment>(For Highpoint Raid Controllers:)</comment>
3422 # <i>modprobe hptraid</i>
3423 </pre>
3424 </li>
3425 <li>
3426 Some ATA RAID Controllers require you to reboot after partitioning;
3427 formatting will otherwise fail
3428 </li>
3429 <li>Before chrooting, mount the devicetree into the new environment:
3430 <pre caption = "Mounting /dev into /mnt/gentoo/dev">
3431 # <i>mount -o bind /dev /mnt/gentoo/dev</i>
3432 </pre>
3433 </li>
3434 <li>During kernel configuration, select the required RAID options:
3435 <pre caption = "RAID in the Linux Kernel Configuration">
3436 <comment>For Highpoint RAID controllers:</comment>
3437 ATA/IDE/MFM/RLL support ---&gt;
3438 [*] HPT36X/37X chipset support
3439 [*] Support for IDE Raid controllers
3440 [*] Highpoint 370 software RAID
3441 <comment>For Promise RAID controllers:</comment>
3442 ATA/IDE/MFM/RLL support ---&gt;
3443 [*] PROMISE PDC202{46|62|65|67} support
3444 <comment>and/or</comment>
3445 [*] PROMISE PDC202{68|69|70|71|75|76|77} support
3446 [*] Support for IDE Raid controllers
3447 [*] Support Promise software RAID (Fasttrak(tm))
3448 </pre>
3449 </li>
3450 <li>
3451 When using GRUB add <c>--stage2=/boot/grub/stage2</c> when running
3452 <c>grub</c> to the <c>setup</c> command:
3453 <pre caption = "Installing GRUB for Hardware RAID systems">
3454 grub&gt; <i>root (hd0,0)</i>
3455 grub&gt; <i>setup --stage2=/boot/grub/stage2 (hd0)</i>
3456 grub&gt; <i>quit</i>
3457 </pre>
3458 Also, in the GRUB configuration be sure to point the <c>root</c>
3459 to the appropriate RAID device:
3460 <pre caption = "grub.conf for RAID">
3461 title=My Gentoo Linux on RAID
3462 root (hd0,0)
3463 kernel (hd0,0)/boot/bzImage root=/dev/ataraid/dXpY
3464 </pre>
3465 </li>
3466 <li>
3467 LILO users should set the <c>root</c> option to the appropriate RAID device:
3468 <pre caption = "lilo.conf for RAID">
3469 image=/boot/bzImage
3470 label=linux
3471 read-only
3472 root=/dev/ataraid/dXpY
3473 </pre>
3474 </li>
3475 </ul>
3476
3477 <p>
3478 If you still have problems installing Gentoo Linux on your Hardware
3479 RAID, be sure to report them on <uri>http://bugs.gentoo.org</uri>.
3480 </p>
3481
3482 <p>
3483 Thanks for using Gentoo Linux, and have fun with your new installation!
3484 </p>
3485
3486
3487 </body>
3488 </section>
3489 </chapter>
3490 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20