/[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.163 - (show annotations) (download) (as text)
Thu Sep 4 15:27:08 2003 UTC (14 years, 3 months ago) by swift
Branch: MAIN
Changes since 1.162: +19 -5 lines
File MIME type: application/xml
Fix 26282, 27583, 27697 and a minor patch

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

  ViewVC Help
Powered by ViewVC 1.1.20