/[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.171 - (show annotations) (download) (as text)
Wed Sep 24 06:04:23 2003 UTC (14 years, 2 months ago) by erwin
Branch: MAIN
Changes since 1.170: +5 -5 lines
File MIME type: application/xml
Fixed #29426: dropped sys-fs for now

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

  ViewVC Help
Powered by ViewVC 1.1.20