/[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.177 - (show annotations) (download) (as text)
Wed Oct 15 11:16:41 2003 UTC (15 years ago) by swift
Branch: MAIN
Changes since 1.176: +418 -211 lines
File MIME type: application/xml
Change internal coding conform the new regulations... NO CONTENT CHANGE!

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

  ViewVC Help
Powered by ViewVC 1.1.20