/[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.115 - (show annotations) (download) (as text)
Thu May 8 06:59:04 2003 UTC (14 years, 4 months ago) by swift
Branch: MAIN
Changes since 1.114: +28 -14 lines
File MIME type: application/xml
Fix http://bugs.gentoo.org/show_bug.cgi?id=20581
Fix http://bugs.gentoo.org/show_bug.cgi?id=20469
Fix http://bugs.gentoo.org/show_bug.cgi?id=19385
Fix http://bugs.gentoo.org/show_bug.cgi?id=15899

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_rc4 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">
10 <mail link="">Jerry Alexandratos</mail>
11 </author>
12 <author title="Ghost">
13 <mail link="g2boojum@gentoo.org">Grant Goodyear</mail>
14 </author>
15 <author title="Editor">
16 <mail link="zhen@gentoo.org">John P. Davis</mail>
17 </author>
18 <author title="Editor">
19 <mail link="Pierre-Henri.Jondot@wanadoo.fr">Pierre-Henri Jondot</mail>
20 </author>
21 <author title="Editor">
22 <mail link="stocke2@gentoo.org">Eric Stockbridge</mail>
23 </author>
24 <author title="Editor">
25 <mail link="rajiv@gentoo.org">Rajiv Manglani</mail>
26 </author>
27 <author title="Editor">
28 <mail link="seo@gentoo.org">Jungmin Seo</mail>
29 </author>
30 <author title="Editor">
31 <mail link="zhware@gentoo.org">Stoyan Zhekov</mail>
32 </author>
33 <author title="Editor">
34 <mail link="jhhudso@gentoo.org">Jared Hudson</mail>
35 </author>
36 <author title="Editor">
37 <mail link="">Colin Morey</mail>
38 </author>
39 <author title="Editor">
40 <mail link="peesh@gentoo.org">Jorge Paulo</mail>
41 </author>
42 <author title="Editor">
43 <mail link="carl@gentoo.org">Carl Anderson</mail>
44 </author>
45 <author title="Editor">
46 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
47 </author>
48 <abstract>These instructions step you through the process of installing Gentoo
49 Linux 1.4_rc4. The Gentoo Linux installation process supports various installation
50 approaches, depending upon how much of the system you want to custom-build from
51 scratch.
52 </abstract>
53 <version>2.6.1</version>
54 <date>8 May 2003</date>
55 <chapter>
56 <title>About the Install</title>
57 <section>
58 <body>
59 <p>This new boot CD will boot from nearly any modern IDE CD-ROM drive, as well
60 as many SCSI CD-ROM drives, assuming that your CD-ROM and BIOS both support booting.
61 Included on the CD-ROM is Linux support for IDE (and PCI IDE) (built-in to the
62 kernel) as well as support for all SCSI devices (available as modules.) In
63 addition, we provide modules for literally every kind of network card that
64 Linux supports, as well as tools to allow you to configure your network and
65 establish outbound (as well as inbound) <c>ssh</c> connections and to download
66 files. </p>
67 <p>To install from the build CD, you will need to have a 486+ processor and
68 ideally at least 64 Megabytes of RAM. (Gentoo Linux has been successfully
69 built with 64MB of RAM + 64MB of swap space, but the build process is awfully
70 slow under those conditions.)</p>
71 <p>Gentoo Linux can be installed using one of three &quot;stage&quot; tarball files. The
72 one you choose depends on how much of the system you want to compile yourself.
73 The stage1 tarball is used when you want to bootstrap and build the entire
74 system from scratch. The stage2 tarball is used for building the entire system
75 from a bootstrapped state. The stage3 tarball already contains a basic Gentoo Linux system.</p>
76 <p><b>So, should you choose to start from a stage1, stage2, or stage3 tarball?</b>
77 Starting from a stage1 allows you to have total control over the optimization settings
78 and optional build-time functionality that is initially enabled on your system. This
79 makes stage1 installs good for power users who know what they are doing. Stage2 installs
80 allow you to skip the bootstrap process, and doing this is fine if you are happy with
81 the optimization settings that we chose for your particular stage2 tarball. Choosing to
82 go with a stage3 allows for the fastest install of Gentoo Linux, but also means that
83 your base system will have the optimization settings that we chose for you. Since major
84 releases of Gentoo Linux have stage3's specifically optimized for various popular processors,
85 this may be sufficient for you. <b>If you're installing Gentoo Linux for the first time, consider
86 using a stage3 tarball for installation.</b></p>
87
88
89 <p> So, how does one begin the install process? First, you will want to decide which one of our LiveCD ISO images to grab from
90 <uri>http://www.ibiblio.org/gentoo/releases/1.4_rc4/x86/</uri> . Please consider using one of our mirrors to alleviate the heavy load from
91 the main server. A list of servers can be found at <uri>http://www.gentoo.org/main/en/mirrors.xml</uri>.
92 </p>
93 <p> The LiveCDs are full CD images that should be burned to a CDR or CD-RW
94 using CD burning software. Currently, we have two types of LiveCDs. The first
95 carries the &quot;gentoo-basic&quot; label, and is approximately 40MB in size, contains only the stage 1 tarball and lives
96 in the <path>x86/livecd/</path> directory. This LiveCD is of minimal size to
97 allow for a initial quick download and contains a stage1 tarball that can be
98 found in <path>/mnt/cdrom/gentoo/</path> after the CD has booted.</p>
99 <p>The second flavor of LiveCD we currently offer is labeled &quot;gentoo-3stages.&quot;
100 This CD is also found in <path>x86/livecd</path>. It
101 contains stage 1, 2 and 3 tarballs. Using this LiveCD, it will be possible
102 for you to install a fully-functional Gentoo Linux system very quickly.</p>
103 <p><b>What happened to i686, pentium3, athlon, athlon-mp stages, LiveCDs and GRP (Gentoo Reference Platform)?</b>
104 Gentoo 1.4_rc4 is meant to be a minimal release candidate only. 1.4_final will contain all the usual x86 architectures and GRP. If you want to install stages optimized for these other x86 architectures or GRP, use the 1.4_rc2 documentation, which can be found at <uri>http://www.gentoo.org/doc/en/gentoo-x86-1.4_rc2-install.xml</uri>
105 </p>
106 <impo>If you encounter a problem with any part of the install and wish to
107 report it as a bug, report it to <uri>http://bugs.gentoo.org</uri>. If the bug
108 needs to be sent upstream to the original software developers (eg the KDE team) the
109 <e>Gentoo Linux developers</e> will take care of that for you.
110 </impo>
111 <p>Now, let us quickly review the install process. First, we will download, burn
112 and boot a LiveCD. After getting a root prompt, we will create partitions, create
113 our filesystems, and extract either a stage1, stage2 or stage3 tarball. If we
114 are using a stage1 or stage2 tarball, we will take the appropriate steps to get
115 our system to stage3. Once our system is at stage3, we can configure it
116 (customize configuration files, install a boot loader, etc) and boot it and have a
117 fully-functional Gentoo Linux system. Depending on what stage of the build
118 process you're starting from, here is what is required for installation: </p>
119 <table>
120 <tr>
121 <th>stage tarball</th>
122 <th>requirements for installation</th>
123 </tr>
124 <tr>
125 <ti>1</ti>
126 <ti>partition/filesystem setup, emerge sync, bootstrap, emerge system, emerge kernel sources, final configuration</ti>
127 </tr>
128 <tr>
129 <ti>2</ti>
130 <ti>partition/filesystem setup, emerge sync, emerge system, emerge kernel sources, final configuration</ti>
131 </tr>
132 <tr>
133 <ti>3</ti>
134 <ti>partition/filesystem setup, emerge sync, final configuration</ti>
135 </tr>
136 </table>
137 </body>
138 </section>
139 </chapter>
140 <chapter>
141 <title>Booting</title>
142 <section>
143 <body>
144 <p>Start by booting the LiveCD. You should see a fancy boot screen
145 with the Gentoo Linux logo on it. At this screen, you can hit Enter to begin the boot process,
146 or boot the LiveCD with custom boot options by specifying a kernel followed by boot options and then hitting Enter. For example <c>gentoo nousb nohotplug</c>. Consult the following table for a list of available kernels and options or press F2 to view the help screen.</p>
147
148 <table>
149 <tr>
150 <th>Available kernels.</th>
151 <th>description</th>
152 </tr>
153
154 <tr><ti>gentoo</ti><ti>basic gentoo kernel (default)</ti></tr>
155 <tr><ti>800</ti><ti>800x600 framebuffer mode</ti></tr>
156 <tr><ti>1024</ti><ti>1024x768 framebuffer mode (default)</ti></tr>
157 <tr><ti>1280</ti><ti>1280x1024 framebuffer mode</ti></tr>
158 <tr><ti>nofb</ti><ti>framebuffer mode disabled</ti></tr>
159 <tr><ti>smp</ti><ti>loads a smp kernel in noframebuffer mode</ti></tr>
160 <tr><ti>acpi</ti><ti>enables acpi=on + loads acpi modules during init</ti></tr>
161 <tr><ti>memtest</ti><ti>boots the memory testing program</ti></tr>
162
163 </table>
164
165 <p>
166 <table>
167 <tr>
168 <th>Available boot options.</th>
169 <th>description</th>
170 </tr>
171
172 <tr><ti>doataraid</ti>
173 <ti>loads ide raid modules from initrd</ti></tr>
174
175 <tr><ti>dofirewire</ti>
176 <ti>modprobes firewire modules in initrd (for firewire cdroms,etc)</ti></tr>
177
178 <tr><ti>dokeymap</ti>
179 <ti>enable keymap selection for non-us keyboard layouts</ti></tr>
180
181 <tr><ti>dopcmcia</ti>
182 <ti>starts pcmcia service</ti></tr>
183
184 <tr><ti>doscsi</ti>
185 <ti>scan for scsi devices (breaks some ethernet cards)</ti></tr>
186
187 <tr><ti>noapm</ti>
188 <ti>disables apm module load</ti></tr>
189
190 <tr><ti>nodetect</ti>
191 <ti>causes hwsetup/kudzu and hotplug not to run</ti></tr>
192
193 <tr><ti>nodhcp</ti>
194 <ti>dhcp does not automatically start if nic detected</ti></tr>
195
196 <tr><ti>nohotplug</ti>
197 <ti>disables loading hotplug service</ti></tr>
198
199 <tr><ti>noraid</ti>
200 <ti>disables loading of evms modules</ti></tr>
201
202 <tr><ti>nousb</ti>
203 <ti>disables usb module load from initrd, disables hotplug</ti></tr>
204
205 <tr><ti>ide=nodma</ti>
206 <ti>Force disabling of dma for malfunctioning ide devices</ti></tr>
207
208 <tr><ti>cdcache</ti>
209 <ti>Cache the entire runtime portion of cd in ram, This uses 40mb of RAM , but allows you to umount /mnt/cdrom and mount another cdrom.</ti></tr>
210
211 </table></p>
212
213 <p> Once you hit Enter, you will be greeted with the standard kernel
214 booting output, kernel and initrd messages, followed by the normal Gentoo
215 Linux boot sequence. You will be automatically logged in as
216 &quot;<c>root</c>&quot; and the root password will be set to a random string
217 for security purposes. You should have a root (&quot;<c>#</c>&quot;) prompt
218 on the current console, and can also switch to other consoles by pressing
219 Alt-F2, Alt-F3 and Alt-F4. Get back to the one you started on by pressing
220 Alt-F1. At this point you should set the root password, type <c>passwd</c> and
221 follow the prompts.
222 </p>
223 <p>You've probably also noticed that above your <c>#</c> prompt is a bunch of help text
224 that explains how to do things like configure your Linux networking and telling you where you can find
225 the Gentoo Linux stage tarballs and packages on your CD.
226 </p>
227 </body>
228 </section>
229 </chapter>
230 <chapter>
231 <title>Load Kernel Modules</title>
232 <section>
233 <body>
234 <p>If the PCI autodetection missed some of your hardware, you
235 will have to load the appropriate kernel modules manually.
236 To view a list of all available network card modules, type <c>ls
237 /lib/modules/*/kernel/drivers/net/*</c>. To load a particular module,
238 type:
239 </p>
240 <pre caption="PCI Modules Configuration">
241 # <c>modprobe pcnet32</c>
242 <comment>(replace pcnet32 with your NIC module)</comment>
243 </pre>
244 <p>Likewise, if you want to be able to access any SCSI hardware that wasn't detected
245 during the initial boot autodetection process, you will need to load the appropriate
246 modules from /lib/modules, again using <c>modprobe</c>:
247 </p>
248 <pre caption="Loading SCSI Modules">
249 # <c>modprobe aic7xxx</c>
250 <comment>(replace aic7xxx with your SCSI adapter module)</comment>
251 # <c>modprobe sd_mod</c>
252 <comment>(sd_mod is the module for SCSI disk support)</comment>
253 </pre>
254 <note>
255 Support for a SCSI CD-ROMs and disks are built-in in the kernel.
256 </note>
257 <p>If you are using hardware RAID, you will need to load the
258 ATA-RAID modules for your RAID controller.
259 </p>
260 <pre caption="Loading RAID Modules">
261 # <c>modprobe ataraid</c>
262 # <c>modprobe pdcraid</c>
263 <comment>(Promise Raid Controller)</comment>
264 # <c>modprobe hptraid</c>
265 <comment>(Highpoint Raid Controller)</comment>
266 </pre>
267 <p>The Gentoo LiveCD should have enabled DMA on your disks, but if it did not,
268 <c>hdparm</c> can be used to set DMA on your drives. </p>
269 <pre caption="Setting DMA">
270 <comment>Replace hdX with your disk device.</comment>
271 # hdparm -d 1 /dev/hdX <comment>Enables DMA </comment>
272 # hdparm -d1 -A1 -m16 -u1 -a64 /dev/hdX
273 <comment>(Enables DMA and other safe performance-enhancing options)</comment>
274 # hdparm -X66 /dev/hdX
275 <comment>(Force-enables Ultra-DMA -- dangerous -- may cause some drives to mess up)</comment>
276 </pre>
277 </body>
278 </section>
279 </chapter>
280 <!-- THIS SECTION SHOULD BE DEPRECATED WITH HOTPLUG ENABLED IN 1.4_rc3 (drobbins)
281 <chapter>
282 <title>Loading PCMCIA Kernel Modules</title>
283 <section>
284 <body>
285 <p>If you have a PCMCIA network card, you will need to perform a few extra steps.
286 </p>
287 <warn>To avoid problems with <c>cardmgr</c>, you <e>must</e> run it <e>before</e> you enter the chroot
288 portion of the install. </warn>
289 <pre caption="Loading PCMCIA Modules">
290 # <i>modprobe pcmcia_core</i>
291 # <i>modprobe i82365</i>
292 # <i>modprobe ds</i>
293 # <i>cardmgr -f</i>
294 </pre>
295 <p>As <c>cardmgr</c> detects which hardware is present, your speaker should emit a
296 few reassuring beeps, and your PCMCIA network card should be active. You can
297 of course insert the PCMCIA card after loading <c>cardmgr</c> too, if that is
298 preferable. (Technically, you need not run
299 <c>cardmgr</c> if you know exactly which module your PCMCIA card requires.
300 But if you don't, loading all PCMCIA modules and see which sticks won't work,
301 as all PCMCIA modules load obligingly and hang around for a PCMCIA card to
302 drop by. <c>cardmgr</c> will also unload the module(s) for any card when you
303 remove it). </p>
304 </body>
305 </section>
306 </chapter>
307 -->
308 <chapter>
309 <title>Configuring Networking</title>
310 <section>
311 <title>Maybe it just works?</title>
312 <body>
313 <p>If you're using a 1.4_rc3 or later LiveCD, it is possible that your networking has already been
314 configured automatically for you. If so, you should be able to take advantage of the many included
315 network-aware commands on the LiveCD such as <c>ssh</c>, <c>scp</c>, <c>ping</c>, <c>irssi</c>, <c>wget</c> and <c>lynx</c>,
316 among others.</p>
317
318 <p>If networking has been configured for you, the <c>/sbin/ifconfig</c> command should
319 list some internet interfaces besides <c>lo</c>, such as <c>eth0</c>:
320 </p>
321 <pre caption="/sbin/ifconfig for a working network card">
322 eth0 Link encap:Ethernet HWaddr 00:50:BA:8F:61:7A
323 inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
324 inet6 addr: fe80::50:ba8f:617a/10 Scope:Link
325 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
326 RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0
327 TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0
328 collisions:1984 txqueuelen:100
329 RX bytes:485691215 (463.1 Mb) TX bytes:123951388 (118.2 Mb)
330 Interrupt:11
331 </pre>
332 <p>You may want to also try pinging your ISP's DNS server (found in <path>/etc/resolv.conf</path>),
333 and a Web site of choice, just to make sure that your packets are reaching the net, DNS name
334 resolution is working correctly, etc.
335 </p>
336 <pre caption="Further Network Testing">
337 # <c>ping -c 3 www.yahoo.com </c>
338 </pre>
339 <p>Are you able to use your network? If so, you can skip the rest of this section.</p>
340 </body>
341 </section>
342 <section>
343 <title> PPPoE configuration</title>
344 <body>
345 <p>Assuming you need PPPoE to connect to the internet, the LiveCD (any version) has
346 made things easy for you by including <c>rp-pppoe</c>. Use the provided <c>adsl-setup</c>
347 script to configure your connection. You will be prompted for the ethernet
348 device that is connected to your adsl modem, your username and password,
349 the IPs of your DNS servers, and if you need a basic firewall or not. </p>
350 <pre caption="Configuring PPPoE">
351 # <c> adsl-setup </c>
352 # <c> adsl-start </c>
353 </pre>
354 <p>If something goes wrong, double-check that you correctly typed
355 your username and password by looking at <path>/etc/ppp/pap-secrets</path> or
356 <path>/etc/ppp/chap-secrets</path>, and make sure you are using the right ethernet device. </p>
357 </body>
358 </section>
359 <section>
360 <title> Automatic Network Configuration </title>
361 <body>
362 <p>The simplest way to set up networking if it didn't get configured automatically is to run the <c>net-setup</c> script.</p>
363 <pre caption="Net-Setup Script">
364 # <c>net-setup eth0</c>
365 </pre>
366 <p>Of course, if you prefer, you may still set up networking manually. This is covered next.</p>
367 </body>
368 </section>
369 <section>
370 <title>Manual DHCP Configuration</title>
371 <body>
372 <p>Network configuration is simple with DHCP; If your ISP is not using
373 DHCP, skip down to the static configuration section below. </p>
374 <pre caption="Network configuration with DHCP">
375 # <c>dhcpcd eth0</c>
376 </pre>
377 <note>Some ISPs require you to provide a hostname. To do that,
378 add a <c>-h myhostname</c> flag to the dhcpcd command line above.
379 </note>
380 <p>If you receive <i>dhcpConfig</i> warnings, don't panic; the errors
381 are most likely cosmetic. Skip down to Network testing below.</p>
382 </body>
383 </section>
384 <section>
385 <title>Manual Static Configuration</title>
386 <body>
387 <p>We need to setup just enough networking so that we can download
388 sources for the system build, as well as the required localhost interface.
389 Type in the following commands, replacing
390 $IFACE with your network interface (typically <c>eth0</c>), $IPNUM
391 with your IP address, $BCAST with your broadcast address, and $NMASK
392 with your network mask. For the <c>route</c> command, replace
393 $GTWAY with your default gateway.
394 </p>
395 <pre caption="Static IP Network Configuration">
396 # <c>ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK</c>
397 # <c>/sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1</c>
398 </pre>
399 <p>Now it is time to create the <path>/etc/resolv.conf</path>
400 file so that name resolution (finding Web/FTP sites by name, rather
401 than just by IP address) will work. You can use <c>nano -w
402 /etc/resolv.conf</c> to create <path>/etc/resolv.conf</path>.
403 <c>nano</c> is a small and easy-to-use editor.</p>
404 <p>Here is a template to follow for creating your /etc/resolv.conf file: </p>
405 <pre caption="/etc/resolv.conf template">
406 domain mydomain.com
407 nameserver 10.0.0.1
408 nameserver 10.0.0.2
409 </pre>
410 <p>Replace <c>10.0.0.1</c> and <c>10.0.0.2</c> with the IP addresses of your
411 primary and secondary DNS servers respectively.</p>
412 </body>
413 </section>
414 <section>
415 <title>Proxy Configuration</title>
416 <body>
417 <p>If you are behind a proxy, it could be necessary to configure your proxy before
418 you continue. We will export some variables to set up the proxy accordingly.
419 </p>
420 <pre caption="Setting a Proxy">
421 <codenote>If the proxy restricts HTTP traffic:</codenote>
422 # <c>export http_proxy=&quot;machine.company.com:1234&quot; </c>
423 <codenote>If the proxy restricts FTP traffic:</codenote>
424 # <c>export ftp_proxy=&quot;machine.company.com&quot; </c>
425 <codenote>If the proxy restricts RSYNC traffic:</codenote>
426 # <c>export RSYNC_PROXY=&quot;machine.company.com&quot; </c>
427 </pre>
428 </body>
429 </section>
430 <section>
431 <title>Networking is go!</title>
432 <body>
433 <p>Networking should now be configured and usable. You should be able to use the included
434 <c>ssh</c>, <c>scp</c>, <c>lynx</c>, <c>irssi</c> and <c>wget</c> commands to connect to other machines on your LAN or the Internet.</p>
435 </body>
436 </section>
437 <section>
438 <title>I don't have networking!</title>
439 <body>If you don't have networking there is some help in the
440 <uri link="http://forums.gentoo.org/">Gentoo Forums</uri>.
441 Some useful links can be found at <uri>http://forums.gentoo.org/viewtopic.php?t=43025</uri>.
442 </body>
443 </section>
444 </chapter>
445 <chapter>
446 <title>Setting your system's date and time</title>
447 <section>
448 <body>
449 <p>Now you need to set your system's date and time.
450 You can do this using the <c>date</c> command.</p>
451 <pre caption="Setting your system's date">
452 # <c>date</c>
453 Thu Feb 27 09:04:42 CST 2003
454 <comment>(If your date is wrong, set your date with this next command)</comment>
455 # <c>date 022709042003</c>
456 <comment>(date MMDDhhmmCCYY)</comment>
457 </pre>
458 </body>
459 </section>
460 </chapter>
461 <chapter>
462 <title>Filesystems, partitions and block devices</title>
463 <section>
464 <title>Introduction to block devices</title>
465 <body>
466 <p>
467 In this section, we'll take a good look at disk-oriented aspects of Gentoo Linux and Linux in general, including
468 Linux filesystems, partitions and block devices. Then, once you're familiar with the ins and outs of disks and
469 filesystems, you'll be guided through the process of setting up partitions and filesystems for your Gentoo Linux
470 install.
471 </p>
472 <p>
473 To begin, I'll introduce "block devices". The most famous block device is
474 probably the one that represents the first IDE drive in a Linux system:
475 </p>
476 <pre caption="/dev/hda, the block device representing the primary master IDE drive in your system">
477 /dev/hda
478 </pre>
479
480 <p>
481 If your system uses SCSI drives, then your first hard drive will be:
482 </p>
483
484 <pre caption="/dev/sda, the block device representing the first logical SCSI drive in your system">
485 /dev/sda
486 </pre>
487
488 <p>The block devices above represent an <i>abstract</i> interface to the disk.
489 User programs can use these block devices to interact with your disk without
490 worrying about whether your drivers are IDE, SCSI or something else. The
491 program can simply address the storage on the disk as a bunch of contiguous,
492 randomly-accessible 512-byte blocks. </p>
493 </body>
494 </section>
495 <section>
496 <title>Partitions and fdisk</title>
497 <body>
498 <p> Under Linux, we create filesystems by using a special command called
499 <c>mkfs</c> (or <c>mke2fs</c>, <c>mkreiserfs</c>, etc,) specifying a particular
500 block device as a command-line argument. </p>
501
502 <p> However, although it is theoretically possible to use a "whole disk" block
503 device (one that represents the <i>entire</i> disk) like <c>/dev/hda</c> or
504 <c>/dev/sda</c> to house a single filesystem, this is almost never done in
505 practice. Instead, full disk block devices are split up into smaller, more
506 manageable block devices called "partitions". Partitions are created using a
507 tool called <c>fdisk</c>, which is used to create and edit the partition table
508 that's stored on each disk. The partition table defines exactly how to split
509 up the full disk. </p>
510
511 <p> We can take a look at a disk's partition table by running <c>fdisk</c>,
512 specifying a block device that represents a full disk as an argument: </p>
513
514 <note>Alternate interfaces to the disk's partition table include <c>cfdisk</c>,
515 <c>parted</c> and <c>partimage</c></note>
516
517 <pre caption="Starting up fdisk">
518 # fdisk /dev/hda
519 </pre>
520 <p>
521 or
522 </p>
523 <pre caption="Starting up fdisk to look at the partition table on /dev/sda">
524 # fdisk /dev/sda
525 </pre>
526
527 <impo>
528 <b>Note that you should <i>not</i> save or make any changes to a disk's
529 partition table if any of its partitions contain filesystems that are in use or
530 contain important data. Doing so will generally cause data on the disk to be
531 lost.</b>
532 </impo>
533
534 <p>
535 Once in fdisk, you'll be greeted with a prompt that looks like this:
536 </p>
537
538 <pre caption="The fdisk prompt">
539 Command (m for help):
540 </pre>
541
542
543 <p>
544 Type <c>p</c> to display your disk's current partition configuration:
545 </p>
546
547 <pre caption="An example partition configuration">
548 Command (m for help): p
549
550 Disk /dev/hda: 240 heads, 63 sectors, 2184 cylinders
551 Units = cylinders of 15120 * 512 bytes
552
553 Device Boot Start End Blocks Id System
554 /dev/hda1 1 14 105808+ 83 Linux
555 /dev/hda2 15 49 264600 82 Linux swap
556 /dev/hda3 50 70 158760 83 Linux
557 /dev/hda4 71 2184 15981840 5 Extended
558 /dev/hda5 71 209 1050808+ 83 Linux
559 /dev/hda6 210 348 1050808+ 83 Linux
560 /dev/hda7 349 626 2101648+ 83 Linux
561 /dev/hda8 627 904 2101648+ 83 Linux
562 /dev/hda9 905 2184 9676768+ 83 Linux
563
564 Command (m for help):
565 </pre>
566
567 <p> This particular disk is configured to house seven Linux filesystems (each
568 with a corresponding partition listed as "Linux") as well as a swap partition
569 (listed as "Linux swap"). </p>
570
571 <p>
572 Notice the name of the corresponding partition block
573 devices on the left hand side, starting with <c>/dev/hda1</c> and going up to
574 <c>/dev/hda9</c>. In the early days of the PC, partitioning software only
575 allowed a maximum of four partitions (called "primary" partitions). This was
576 too limiting, so a workaround called an <i>extended partitioning</i> was
577 created. An extended partition is very similar to a primary partition, and
578 counts towards the primary partition limit of four. However, extended
579 partitions can hold any number of so-called <i>logical</i> partitions inside
580 them, providing an effective means of working around the four partition limit.
581 </p>
582
583 <p>
584 All partitions <c>hda5</c> and higher are logical partitions. The numbers 1
585 through 4 are reserved for primary or extended partitions. </p>
586
587 <p> So, In our example, <c>hda1</c> through <c>hda3</c> are primary partitions.
588 <c>hda4</c> is an extended partition that contains logical partitions
589 <c>hda5</c> through <c>hda9</c>. You would never actually
590 <i>use</i> <c>/dev/hda4</c> for storing any filesystems directly -- it simply
591 acts as a container for partitions <c>hda5</c> through <c>hda9</c>. </p>
592
593 <p> Also, notice that each partition has an "Id", also called a "partition
594 type". Whenever you create a new partition, you should ensure that the
595 partition type is set correctly. '83' is the correct partition type for
596 partitions that will be housing Linux filesystems, '82' is the correct
597 partition type for Linux swap partitions and 'fd' is the recommended partition
598 type for Software RAID partitions. You set the partition type using the
599 <c>t</c> option in <c>fdisk</c>. The Linux kernel uses the partition type
600 setting to auto-detect filesystems and swap devices on the disk at boot-time.
601 </p>
602 </body>
603 </section>
604 <section>
605 <title>Using fdisk to set up partitions</title>
606 <body>
607
608 <p>Now that you've had your introduction to the way disk partitioning is
609 done under Linux, it's time to walk you through the process of setting up disk
610 partitions for your Gentoo Linux installation. After we walk you through the
611 process of creating partitions on your disk, your partition configuration will
612 look like this: </p>
613
614 <pre caption="The partition configuration that you will have after following these steps">
615 Disk /dev/hda: 30.0 GB, 30005821440 bytes
616 240 heads, 63 sectors/track, 3876 cylinders
617 Units = cylinders of 15120 * 512 = 7741440 bytes
618
619 Device Boot Start End Blocks Id System
620 /dev/hda1 * 1 14 105808+ 83 Linux
621 /dev/hda2 15 81 506520 82 Linux swap
622 /dev/hda3 82 3876 28690200 83 Linux
623
624 Command (m for help):
625 </pre>
626
627 <p>In our suggested "newbie" partition configuration, we have three partitions.
628 The first one (<c>/dev/hda1</c>) at the beginning of the disk is a small
629 partition called a boot partition. The boot partition's purpose is to hold all
630 the critical data related to booting -- GRUB boot loader information (if you
631 will be using GRUB) as well as your Linux kernel(s). The boot partition gives
632 us a safe place to store everything related to booting Linux. During normal
633 day-to-day Gentoo Linux use, your boot partition should remain <e>unmounted</e>
634 for safety. If you are setting up a SCSI system, your boot partition will
635 likely end up being <c>/dev/sda1</c>.</p>
636
637 <p>It's recommended to have boot partitions (containing everything necessary for
638 the boot loader to work) at the beginning of the disk. While not necessarily
639 required anymore, it is a useful tradition from the days when the lilo boot
640 loader wasn't able to load kernels from filesystems that extended beyond disk
641 cylinder 1024.
642 </p>
643
644 <p>The second partition (<c>/dev/hda2</c>) is used to for swap space. The
645 kernel uses swap space as virtual memory when RAM becomes low. This partition,
646 relatively speaking, isn't very big either, typically somewhere around 512MB.
647 If you're setting up a SCSI system, this partition will likely end up
648 being called <c>/dev/sda2</c>. </p>
649
650 <p>The third partition (<c>/dev/hda3</c>) is quite large and takes up the rest
651 of the disk. This partition is called our "root" partition and will be used to
652 store your main filesystem that houses Gentoo Linux itself. On a SCSI system,
653 this partition would likely end up being <c>/dev/sda3</c>.</p>
654
655
656 <p>Before we partition the disk, here's a quick technical overview of the
657 suggested partition and filesystem configuration to use when installing Gentoo
658 Linux:</p>
659
660 <table>
661 <tr>
662 <th>Partition</th>
663 <th>Size</th>
664 <th>Type</th>
665 <th>example device</th>
666 </tr>
667 <tr>
668 <ti>boot partition, containing kernel(s) and boot information</ti>
669 <ti>32 Megabytes</ti>
670 <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 te size; in these cases 64 Megabytes is recommended</ti>
671 <ti>/dev/hda1</ti>
672 </tr>
673 <tr>
674 <ti>swap partition (no longer a 128 Megabyte limit, now 2GB)</ti>
675 <ti>Generally, configure a swap area that is between one to two times the size of the physical RAM
676 in your system.</ti>
677 <ti>Linux swap</ti>
678 <ti>/dev/hda2</ti>
679 </tr>
680 <tr>
681 <ti>root partition, containing main filesystem (/usr, /home, etc)</ti>
682 <ti>&gt;=1.5 Gigabytes</ti>
683 <ti>ReiserFS, ext3 recommended; ext2 ok</ti>
684 <ti>/dev/hda3</ti>
685 </tr>
686 </table>
687
688 <p>OK, now to create the partitions as in the example and table above. First,
689 enter fdisk by typing <c>fdisk /dev/hda</c> or <c>fdisk /dev/sda</c>,
690 depending on whether you're using IDE or SCSI. Then, type <c>p</c> to view your
691 current partition configuration. Is there anything on the disk that you need
692 to keep? If so, <b>stop now</b>. If you continue with these directions, <b>all
693 existing data on your disk will be erased.</b></p>
694
695 <impo>Following these instructions below will cause all prior data on your disk
696 to <b>be erased</b>! If there is anything on your drive, please be sure that it
697 is non-critical information that you don't mind losing. Also make sure that you
698 <b>have selected the correct drive</b> so that you don't mistakenly wipe data
699 from the wrong drive.</impo>
700
701 <p>Now, it's time to delete any existing partitions. To do this, type <c>d</c>
702 and hit Enter. You will then be prompted for the partition number you would like
703 to delete. To delete a pre-existing <c>/dev/hda1</c>, you would type:</p>
704
705 <pre caption="Deleting a partition">
706 Command (m for help): d
707 Partition number (1-4): 1
708 </pre>
709
710 <p>The partition has been scheduled for deletion. It will no longer show up if
711 you type <c>p</c>, but it will not be erased until your changes have been
712 saved. If you made a mistake and want to abort without saving your changes,
713 type <c>q</c> immediately and hit enter and your partition will not be
714 deleted.</p>
715 <!-- NOTE: THis is not sufficient documentation to cover ATA Raid and I just
716 find it confusing, so I'm commenting it out (drobbins)
717 <note>If you are using RAID your partitions will be a little different. You
718 will have the partitions like this: <path>/dev/ataraid/discX/partY</path> X are
719 the arrays you have made, so if you only have made 1 array, then it will be
720 disc0.Y is the partition number as in <path>/dev/hdaY</path> </note>
721 -->
722 <p>Now, assuming that you do indeed want to wipe out all the partitions on your
723 system, repeatedly type <c>p</c> to print out a partition listing and then type
724 <c>d</c> and the number of the partition to delete it. Eventually, you'll end up
725 with a partition table with nothing in it:</p>
726
727 <pre caption="An empty partition table">
728 Disk /dev/hda: 30.0 GB, 30005821440 bytes
729 240 heads, 63 sectors/track, 3876 cylinders
730 Units = cylinders of 15120 * 512 = 7741440 bytes
731
732 Device Boot Start End Blocks Id System
733
734 Command (m for help):
735 </pre>
736
737 <p>Now that the in-memory partition table is empty, we're ready to create a
738 boot partition. To do this, type <c>n</c> to create a new partition, then
739 <c>p</c> to tell fdisk you want a primary partition. Then type <c>1</c> to
740 create the first primary partition. When prompted for the first cylinder, hit
741 enter. When prompted for the last cylinder, type <c>+32M</c> to create a
742 partition 32MB in size. You can see output from these steps below:</p>
743
744 <note>
745 Journaled filesystems require extra space for their journal. Default settings
746 require about 33 Megabytes of space. Therefor, if you are using a journaled
747 filesystem for <path>/boot</path>, you should type <c>+64M</c> when prompted
748 for the last cylinder.
749 </note>
750
751 <pre caption="Steps to create our boot partition">
752 Command (m for help): n
753 Command action
754 e extended
755 p primary partition (1-4)
756 p
757 Partition number (1-4): 1
758 First cylinder (1-3876, default 1):
759 Using default value 1
760 Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): +32M
761 </pre>
762
763 <p>Now, when you type <c>p</c>, you should see the following partition printout:</p>
764
765 <pre caption="Our first partition has been created">
766 Command (m for help): p
767
768 Disk /dev/hda: 30.0 GB, 30005821440 bytes
769 240 heads, 63 sectors/track, 3876 cylinders
770 Units = cylinders of 15120 * 512 = 7741440 bytes
771
772 Device Boot Start End Blocks Id System
773 /dev/hda1 1 14 105808+ 83 Linux
774 </pre>
775
776 <p>Next, let's create the swap partition. To do this, type <c>n</c> to create a
777 new partition, then <c>p</c> to tell fdisk that you want a primary partition. Then
778 type <c>2</c> to create the second primary partition, <c>/dev/hda2</c> in our case.
779 When prompted for the first cylinder, hit enter. When prompted for the last cylinder,
780 type <c>+512M</c> to create a partition 512MB in size. After you've done this, type
781 <c>t</c> to set the partition type, and then type in <c>82</c> to set the partition
782 type to "Linux Swap". After completing these steps, typing <c>p</c> should display
783 a partition table that looks similar to this:</p>
784
785 <pre caption="Our swap partition has been created">
786 Command (m for help): p
787
788 Disk /dev/hda: 30.0 GB, 30005821440 bytes
789 240 heads, 63 sectors/track, 3876 cylinders
790 Units = cylinders of 15120 * 512 = 7741440 bytes
791
792 Device Boot Start End Blocks Id System
793 /dev/hda1 1 14 105808+ 83 Linux
794 /dev/hda2 15 81 506520 82 Linux swap
795 </pre>
796
797 <p>Finally, let's create the root partition. To do this, type <c>n</c> to
798 create a new partition, then <c>p</c> to tell fdisk that you want a primary
799 partition. Then type <c>3</c> to create the third primary partition,
800 <c>/dev/hda3</c> in our case. When prompted for the first cylinder, hit enter.
801 When prompted for the last cylinder, hit enter to create a partition that takes
802 up the rest of the remaining space on your disk. After completing these steps,
803 typing <c>p</c> should display a partition table that looks similar to
804 this:</p>
805
806 <pre caption="Our root partition has been created">
807 Command (m for help): p
808
809 Disk /dev/hda: 30.0 GB, 30005821440 bytes
810 240 heads, 63 sectors/track, 3876 cylinders
811 Units = cylinders of 15120 * 512 = 7741440 bytes
812
813 Device Boot Start End Blocks Id System
814 /dev/hda1 1 14 105808+ 83 Linux
815 /dev/hda2 15 81 506520 82 Linux swap
816 /dev/hda3 82 3876 28690200 83 Linux
817 </pre>
818
819 <p>
820 Finally, we need to set the "bootable" flag on our boot partition and then write
821 our changes to disk. To tag <c>/dev/hda1</c> as a "bootable" partition, type
822 <c>a</c> at the menu and then type in <c>1</c> for the partition number. If you
823 type <c>p</c> now, you'll now see that <c>/dev/hda1</c> has a <c>*</c> in the "Boot"
824 column. Now, let's write our changes to disk. To do this, type <c>w</c> and hit
825 enter. Your disk partitions are now properly configured for a Gentoo Linux
826 install.
827 </p>
828
829 <note>If <c>fdisk</c> or <c>cfdisk</c> instruct you to do so, please reboot to
830 allow your system to detect the new partition configuration.</note>
831 </body>
832 </section>
833 <section>
834 <title>Creating filesystems</title>
835 <body>
836 <p>Now that the partitions have been created, it's time to set up filesystems on
837 the boot and root partitions so that they can be mounted and used to store data.
838 We will also configure the swap partition to serve as swap storage.
839 </p>
840
841 <p>Gentoo Linux supports a variety of different types of filesystems; each type has
842 its strengths and weaknesses and its own set of performance characteristics. Currently,
843 we support the creation of ext2, ext3, XFS, JFS and ReiserFS filesystems.</p>
844
845 <p>ext2 is the tried and true Linux filesystem but doesn't have metadata
846 journaling, which means that routine ext2 filesystem checks at startup time can
847 be quite time-consuming. There is now quite a selection of newer-generation
848 <i>journaled</i> filesystems that can be checked for consistency very quickly
849 and are thus generally preferred over their non-journaled counterparts.
850 Journaled filesystems prevent long delays when you boot your system and your
851 filesystem happens to be in an <i>inconsistent</i> state.</p>
852
853 <p>ext3 is the journaled version of the ext2 filesystem, providing metadata
854 journaling for fast recovery in addition to other enhanced journaling modes
855 like full data and ordered data journaling. ext3 is a very good and reliable
856 filesystem. It offers generally decent performance under most conditions.
857 Because it does not extensively employ the use of "trees" in its internal
858 design, it doesn't scale very well, meaning that it is not an ideal choice for
859 very large filesystems, or situations where you will be handling very large
860 files or large quantities of files in a single directory. But when used within
861 its design parameters, ext3 is an excellent filesystem.</p>
862
863 <p>ReiserFS is a B*-tree based filesystem that has very good overall
864 performance and greatly outperforms both ext2 and ext3 when dealing with small
865 files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
866 extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
867 now rock-solid and highly recommended for use both as a general-purpose
868 filesystem and for extreme cases such as the creation of large filesystems, the
869 use of many small files, very large files, and directories containing tens of
870 thousands of files. ReiserFS is the filesystem we recommend by default for all
871 non-boot partitions.</p>
872
873 <p>XFS is a filesystem with metadata journaling that is fully supported under
874 Gentoo Linux's <path>xfs-sources</path> kernel. It comes with a robust
875 feature-set and is optimized for scalability. We only recommend using this
876 filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
877 a uninterruptible power supply. Because XFS aggressively caches in-transit data
878 in RAM, improperly designed programs (those that don't take proper precautions
879 when writing files to disk, and there are quite a few of them) can lose a good
880 deal of data if the system goes down unexpectedly.</p>
881
882 <p>JFS is IBM's own high performance journaling filesystem. It has recently
883 become production-ready, and there hasn't been a sufficient track record to
884 comment either positively nor negatively on its general stability at this
885 point.</p>
886
887 <p>If you're looking for the most rugged journaling filesystem, use ext3. If
888 you're looking for a good general-purpose high-performance filesystem with
889 journaling support, use ReiserFS; both ext3 and ReiserFS are mature,
890 refined and recommended for general use.</p>
891
892 <!-- Corner case, confusing
893 <p>But before creating filesystems, you may want to initialize the
894 beginning of your partition using <c>dd</c> if you are using a pre-existing partition that has been used before.
895 This is particularly helpful when you're going to create a new XFS filesystem on a partition that previously contained
896 a ReiserFS filesystem. Doing this will ensure that your new filesystem
897 will not be mis-identified by Linux's filesystem auto-detection code.
898 This can be done as follows:
899 </p>
900 <pre caption="Initializing first 1024 bytes of your partition">
901 # <c>dd if=/dev/zero of=/dev/hda3 bs=1k count=1</c>
902 <comment>(Replace /dev/hda3 with the partition you wish to &quot;clean.&quot;)</comment>
903 </pre>
904 <warn>The command above will destroy all data from <path>/dev/hda3</path>.
905 Be careful and check twice which partition you specify for zeroing.
906 If you make a mistake it might result in a loss of data.
907 </warn>
908 -->
909
910 <p>Based on our example above, we will use the following commands to initialize
911 all our partitions for use:</p>
912
913 <pre caption="Initializing our partitions (example)">
914 # mke2fs -j /dev/hda1
915 # mkswap /dev/hda2
916 # mkreiserfs /dev/hda3
917 </pre>
918
919 <p>We choose ext3 for our <c>/dev/hda1</c> boot partition because it is a
920 robust journaling filesystem supported by all major boot loaders. We used
921 <c>mkswap</c> for our <c>/dev/hda2 </c> swap partition -- the choice is obvious
922 here. And for our main root filesystem on <c>/dev/hda3</c> we choose ReiserFS,
923 since it is a solid journaling filesystem offering excellent performance. Now,
924 go ahead and initialize your partitions.</p>
925
926 <p>For your reference, here are the various <c>mkfs</c>-like commands available
927 during the installation process:</p>
928
929 <p><c>mkswap</c> is the command that is used to initialize swap partitions:</p>
930 <pre caption="Initializing Swap">
931 # <c>mkswap /dev/hda2</c>
932 </pre>
933 <p>You can use the <c>mke2fs</c> command to create ext2 filesystems:</p>
934 <pre caption="Creating an ext2 Filesystem">
935 # <i>mke2fs /dev/hda1</i>
936 </pre>
937 <p>If you would like to use ext3, you can create ext3 filesystems using
938 <c>mke2fs -j</c>:</p>
939 <pre caption="Creating an ext3 Filesystem">
940 # <c>mke2fs -j /dev/hda3</c>
941 </pre>
942 <note>You can find out more about using ext3 under Linux 2.4 at
943 <uri>http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html</uri>.</note>
944 <p>To create ReiserFS filesystems, use the <c>mkreiserfs</c> command:</p>
945 <pre caption="Creating a ReiserFS Filesystem">
946 # <c>mkreiserfs /dev/hda3</c>
947 </pre>
948 <p>To create an XFS filesystem, use the <c>mkfs.xfs</c> command:</p>
949 <pre caption="Creating a XFS Filesystem">
950 # <c>mkfs.xfs /dev/hda3</c>
951 </pre>
952 <note>You may want to add a couple of additional flags to the
953 <c>mkfs.xfs</c> command: <c>-d agcount=3 -l size=32m</c>.
954 The <c>-d agcount=3</c> command will lower the number of allocation groups.
955 XFS will insist on using at least 1 allocation group per 4 GB of your
956 partition, so, for example, if you have a 20 GB partition you will need
957 a minimum agcount of 5. The <c>-l size=32m</c> command increases the
958 journal size to 32 Mb, increasing performance.</note>
959
960 <p>To create JFS filesystems, use the <c>mkfs.jfs</c> command:</p>
961 <pre caption="Creating a JFS Filesystem">
962 # <c>mkfs.jfs /dev/hda3</c>
963 </pre>
964 </body>
965 </section>
966 </chapter>
967 <chapter>
968 <title>Mount Partitions</title>
969 <section>
970 <body>
971 <p>Now, we will activate our newly-initialized swap volume, since we may need the additional virtual memory that it
972 provides later:
973 </p>
974 <pre caption="Activating Swap">
975 # <c>swapon /dev/hda2</c>
976 </pre>
977
978 <p>Next, we will create the <path>/mnt/gentoo</path> and <path>/mnt/gentoo/boot</path> mount points,
979 and we will mount our filesystems to these mount points. Once our boot and root filesystems are
980 mounted, any files we copy or create inside <path>/mnt/gentoo</path> will be placed on our new filesystems.
981 Note that if you are setting up Gentoo
982 Linux with separate <path>/usr</path> or <path>/var</path> filesystems, these would get mounted to
983 <path>/mnt/gentoo/usr</path> and <path>/mnt/gentoo/var</path> respectively.
984 </p>
985
986 <impo>If your <e>boot</e> partition (the one holding the kernel) is ReiserFS, be sure to mount it
987 with the <c>-o notail</c> option so GRUB gets properly installed. Make sure
988 that <c>notail</c> ends up in your new <path>/etc/fstab</path> boot partition entry, too.
989 We will get to that in a bit. If you are going to use LILO with ReiserFS, then the <c>-o notail</c>
990 is not needed. It's always safe to specify the <c>-o notail</c> option with ReiserFS if you're
991 not sure what to do.
992 </impo>
993
994 <pre caption="Creating Mount Points">
995 # <c>mkdir /mnt/gentoo</c>
996 # <c>mount /dev/hda3 /mnt/gentoo</c>
997 # <c>mkdir /mnt/gentoo/boot</c>
998 # <c>mount /dev/hda1 /mnt/gentoo/boot</c>
999 </pre>
1000
1001 <impo>If you are having problems mounting your boot partition with ext2, try using
1002 <c>mount /dev/hXX /mnt/gentoo/boot -t ext2 </c> </impo>
1003 </body>
1004 </section>
1005 </chapter>
1006 <chapter>
1007 <title>Stage tarballs and chroot</title>
1008 <section>
1009 <title>Selecting the desired stage tarball</title>
1010 <body>
1011
1012 <p>
1013 Now, you need to decide which one you would like to use as a
1014 basis for the install if you haven't already.</p>
1015
1016 <p>If you are using the &quot;from scratch, build everything&quot; install
1017 method, you will want to use the <path>stage1-x86-1.4_rc4.tar.bz2</path> image.
1018 If you're using one of our bigger CDs like the "3stages" ISO, you will also
1019 have a choice of a stage2 and stage3 image. These images allow you to save
1020 time at the expense of configurability (we've already chosen compiler
1021 optimizations and default USE variables for you.) The stages on the CD are
1022 accessible at <path>/mnt/cdrom/gentoo</path>, and you can type <c>ls /mnt/cdrom/gentoo</c>
1023 to see what's available on your CD.</p>
1024
1025 <p>If you would like to perform an install using a stage tarball that is
1026 <i>not</i> on your CD , this is still possible, but you'll need to download the
1027 stage you want using the following instructions. If you already have the stage
1028 tarball you want to use (most users), then proceed to the "Extracting the stage
1029 tarball" section.</p>
1030
1031 <pre caption="Downloading Required Stages">
1032 # <c>cd /mnt/gentoo</c>
1033 <comment>Use lynx to get the URL for your tarball:</comment>
1034 # <c>lynx http://www.ibiblio.org/pub/Linux/distributions/gentoo/releases/1.4_rc4/x86/</c>
1035 <comment>Use <c>Up</c> and <c>Down</c> arrows keys (or the <c>TAB</c> key) to go to the right directory
1036 Highlight the appropriate stage you want to download
1037 Press <c>d</c> which will initiate the download
1038 Save the file and quit the browser
1039
1040 <b>OR</b> use wget from the command line:</comment>
1041 # <c>wget <comment>insert URL to the required stage tarball here.</comment></c>
1042 </pre>
1043 </body>
1044 </section>
1045 <section>
1046 <title>Extracting the stage tarball</title>
1047 <body>
1048
1049 <p>Now it is time to extract the compressed stage tarball of your choice to
1050 <path>/mnt/gentoo/</path>. Remember, you only need to unpack <b>one</b> stage
1051 tarball, either a stage1, stage2 or stage3. So, if you wanted to perform a
1052 stage3 install of Gentoo, then you would just unpack the stage3 tarball.
1053 Unpack the stage tarball as follows:</p>
1054
1055 <impo>Be sure to use the <c>p</c> option with <c>tar</c>. Forgetting to do this will
1056 cause certain files to have incorrect permissions.</impo>
1057
1058 <pre caption="Unpacking the Stages">
1059 # <c>cd /mnt/gentoo</c>
1060 <comment>Change "stage3" to "stage2" or "stage1" if you want to start from these stages instead.</comment>
1061 <comment>If you downloaded your stage tarball, change the path below to begin with "/mnt/gentoo/"
1062 instead of "/mnt/cdrom/gentoo/".</comment>
1063 # <c>tar -xvjpf /mnt/cdrom/gentoo/stage3-*.tar.bz2</c>
1064 </pre>
1065
1066 <p>If you downloaded your stage tarball to <path>/mnt/gentoo</path>, you can now delete it by typing
1067 <c>rm /mnt/gentoo/stage*.tar.bz2</c>.</p>
1068 </body>
1069 </section>
1070 <section>
1071 <title>Entering the chroot</title>
1072 <body>
1073 <p>
1074 Next, we will <c>chroot</c> over to the new Gentoo Linux build installation to &quot;enter&quot; the new
1075 Gentoo Linux system.
1076 </p>
1077
1078 <note>
1079 You may receive a notice during <c>env-update</c> telling you that
1080 <path>/etc/make.profile/make.defaults</path> isn't available: ignore it. We are
1081 going to issue <c>emerge sync</c> later on in this document which will resolve
1082 the problem.
1083 </note>
1084
1085 <pre caption="Prepping and entering the chroot environment">
1086 # <c>mount -t proc proc /mnt/gentoo/proc</c>
1087 # <c>cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</c>
1088 # <c>chroot /mnt/gentoo /bin/bash</c>
1089 # <c>env-update</c>
1090 Regenerating /etc/ld.so.cache...
1091 # <c>source /etc/profile</c>
1092 <comment>(The above points your shell to the new paths and updated binaries.)</comment>
1093 </pre>
1094 <p>After you execute these commands, you will be &quot;inside&quot; your new Gentoo Linux environment in <path>/mnt/gentoo</path>.
1095 We can perform the rest of the installation process inside the chroot.
1096 </p>
1097 </body>
1098 </section>
1099 </chapter>
1100 <chapter>
1101 <title>Getting the Current Portage Tree using sync</title>
1102 <section>
1103 <body>
1104
1105 <p>Now, you will need to run <c>emerge sync</c>. This command tells Portage to download
1106 the most recent copy of the Gentoo Linux Portage tree.
1107 The Portage tree
1108 contains all the scripts (called ebuilds) used to build every package
1109 under Gentoo Linux. Currently, we have ebuild scripts for close to 4000 packages. Once <c>emerge sync</c>
1110 completes, you will have a complete Portage tree in <path>/usr/portage</path>.</p>
1111
1112 <pre caption="Updating Using sync">
1113 # <c>emerge sync</c>
1114 </pre>
1115
1116 </body>
1117 </section>
1118 </chapter>
1119 <chapter>
1120 <title>Setting Gentoo optimizations (make.conf)</title>
1121 <section>
1122 <body>
1123
1124 <p>Now that you have a working copy of the Portage tree, it is time to
1125 customize the optimization and optional build-time settings to use on your
1126 Gentoo Linux system. Portage will use these settings when compiling any
1127 programs for you. To do this, edit the file <path>/etc/make.conf</path>. In
1128 this file, you should set your <c>USE</c> flags, which specify optional
1129 functionality that you would like to be built into packages if available;
1130 generally, the defaults (an <e>empty</e> or unset <c>USE</c> variable) are
1131 fine. More information on <c>USE</c> flags can be found <uri
1132 link="http://www.gentoo.org/doc/en/use-howto.xml">here</uri>. A complete list
1133 of current USE flags can be found <uri
1134 link="http://www.gentoo.org/dyn/use-index.xml">here</uri>. </p>
1135
1136 <p>You also should set appropriate <c>CHOST</c>, <c>CFLAGS</c> and
1137 <c>CXXFLAGS</c> settings for the kind of system that you are creating
1138 (commented examples can be found further down in the file.) These settings
1139 will be used to tell the C and C++ compiler how to optimize the code that
1140 is generated on your system. It is common for users with Athlon XP processors
1141 to specify a "-march=athlon-xp" setting in their CFLAGS and CXXFLAGS settings
1142 so that all packages built will be optimized for the instruction set and
1143 performance characteristics of their CPU, for example. The <path>/etc/make.conf</path>
1144 file contains a general guide for the proper settings of CFLAGS and CXXFLAGS.</p>
1145
1146 <p>If necessary, you can also set proxy information here if you are behind a
1147 firewall. Use the following command to edit <path>/etc/make.conf</path> using <c>nano</c>,
1148 a simple visual editor.
1149 </p>
1150 <pre caption="Setting make.conf Options">
1151 # <c>nano -w /etc/make.conf</c>
1152 <comment>(Edit CHOST, CFLAGS, CXXFLAGS and any necessary USE or proxy settings)</comment>
1153 </pre>
1154 <note>
1155 People who need to substantially customize the build process should take a look at
1156 the <path>/etc/make.globals</path> file. This file comprises gentoo defaults and
1157 should never be touched. If the defaults do not suffice, then new values should
1158 be put in <path>/etc/make.conf</path>, as entries in <path>make.conf</path>
1159 <comment>override</comment> the entries in <path>make.globals</path>. If you're
1160 interested in customizing USE settings, look in <path>/etc/make.profile/make.defaults</path>.
1161 If you want to turn off any USE settings found here, add an appropriate <c>USE=&quot;-foo&quot;</c>
1162 in <path>/etc/make.conf</path> to turn off any <c>foo</c> USE setting enabled by default
1163 in <path>/etc/make.globals</path> or <path>/etc/make.profile/make.defaults</path>.
1164 </note>
1165 </body>
1166 </section>
1167 </chapter>
1168 <chapter>
1169 <title>Starting from Stage1</title>
1170 <section>
1171 <body>
1172 <note>If you are not starting from a stage1 tarball, skip this section.</note>
1173 <p>The stage1 tarball is for complete customization and optimization. If you have picked this tarball,
1174 you are most likely looking to have an uber-optimized and up-to-date system. Have fun, because optimization
1175 is what Gentoo Linux is all about! Installing from a stage1 takes a lot of time, but the result
1176 is a system that has been optimized from the ground up for your specific machine and needs.
1177 </p>
1178 <p>Now, it is time to start the &quot;bootstrap&quot; process. This process takes about two hours on
1179 my 1200MHz AMD Athlon system.
1180 During this time, the GNU C library, compiler suite and other key system programs will be built. Start the bootstrap
1181 as follows:</p>
1182 <pre caption="Bootstrapping">
1183 # <c>cd /usr/portage</c>
1184 # <c>scripts/bootstrap.sh</c>
1185 </pre>
1186 <p>The &quot;bootstrap&quot; process will now begin.
1187 </p>
1188 <note>
1189 Portage by default uses <c>/var/tmp</c> during package building, often
1190 using several hundred megabytes of temporary storage. If you would like to
1191 change where Portage stores these temporary files, set a new PORTAGE_TMPDIR <e>before</e>
1192 starting the bootstrap process, as follows:
1193 </note>
1194 <pre caption="Changing Portage's Storage Path">
1195 # <c>export PORTAGE_TMPDIR=&quot;/otherdir/tmp&quot;</c>
1196 </pre>
1197 <p><c>bootstrap.sh</c> will build <c>binutils</c>, <c>gcc</c>, <c>gettext</c>,
1198 and <c>glibc</c>, rebuilding <c>binutils</c>, <c>gcc</c>, and <c>gettext</c>
1199 after <c>glibc</c>. Needless to say, this process takes a while.
1200 Once this process completes, your system will be equivalent to a &quot;stage2&quot; system,
1201 which means you can now move on to the stage2 instructions.
1202 </p>
1203 </body>
1204 </section>
1205 </chapter>
1206 <chapter>
1207 <title>Starting from Stage2 and continuing Stage1</title>
1208 <section>
1209 <body>
1210
1211 <note>This section is for those continuing a stage1 install or starting at stage2. If
1212 this is not you (ie. you're using a stage3,) then skip this section.
1213 </note>
1214
1215 <p>The stage2 tarball already has the bootstrapping done for you. All that you have
1216 to do is install the rest of the system.
1217 </p>
1218 <note>If you are starting from a pre-built stage2 and want to ensure
1219 that your compiler toolchain is fully up-to-date, add the <c>-u</c>
1220 option to the commands below. If you don't know what this means, it's
1221 safe to skip this suggestion.</note>
1222
1223 <pre caption="Installing the Rest of the System">
1224 # <c>emerge -p system</c>
1225 <comment>(lists the packages to be installed)</comment>
1226 # <c>emerge system</c>
1227 </pre>
1228 <p>It is going to take a while
1229 to finish building the entire base system. Your reward is that it will be
1230 thoroughly optimized for your system. The drawback is that you have to find a
1231 way to keep yourself occupied for some time to come. The author suggests &quot;Star
1232 Wars - Super Bombad Racing&quot; for the PS2.
1233 </p>
1234 <p>
1235 Building is now complete. Go ahead and skip down to the "Setting
1236 your time zone" section.
1237 </p>
1238 </body>
1239 </section>
1240 </chapter>
1241 <chapter>
1242 <title>Starting from Stage3</title>
1243 <section>
1244 <body>
1245 <note>This section is for those <b>starting</b> with stage3, and not for those who have started
1246 with stage1 or stage2 who should skip this section.</note>
1247
1248 <p>The stage3 tarball provides a fully-functional basic Gentoo system, so no building is required.
1249 However, since the stage3 tarball is pre-built, it may be slightly out-of-date. If this is a concern
1250 for you, you can automatically update your existing stage3 to contain the most up-to-date versions of all system packages
1251 by performing the following steps. Note that this could take a long time if your stage3 is very old;
1252 otherwise, this process will generally be quick and will allow you to benefit from the very latest
1253 Gentoo updates and fixes.
1254 In any case, feel free to skip these
1255 steps and proceed to the next section if you like.
1256 </p>
1257
1258 <pre caption="Getting up-to-date">
1259 # <c>export CONFIG_PROTECT="-*"</c>
1260 # <c>emerge -up system</c>
1261 <comment>(lists the packages that would be installed)</comment>
1262 # <c>emerge -u system</c>
1263 <comment>(actually merges the packages)</comment>
1264 # <c>unset CONFIG_PROTECT</c>
1265 </pre>
1266 </body>
1267 </section>
1268 </chapter>
1269 <chapter>
1270 <title>Setting your time zone</title>
1271 <section>
1272 <body>
1273 <p>Now you need to set your time zone.</p>
1274 <p>Look for your time zone (or GMT if you are using Greenwich Mean Time)
1275 in <path>/usr/share/zoneinfo</path>. Then, make a symbolic link to
1276 /etc/localtime by typing:</p>
1277 <pre caption="Creating a symbolic link for time zone">
1278 # <c>ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime</c>
1279 </pre>
1280 </body>
1281 </section>
1282 </chapter>
1283 <chapter>
1284 <title>Installing the kernel and a System Logger</title>
1285 <section>
1286 <body>
1287 <note>
1288 If you haven't done so, please edit <path>/etc/make.conf</path> to your flavor.
1289 </note>
1290 <p>You now need to merge Linux kernel sources. Here are the ones we currently
1291 offer:
1292 </p>
1293 <table>
1294 <tr>
1295 <th>ebuild</th>
1296 <th>description</th>
1297 </tr>
1298 <tr>
1299 <ti>
1300 <path>gentoo-sources</path>
1301 </ti>
1302 <ti>Our own performance and functionality-enhanced kernel does not include XFS support.</ti>
1303 </tr>
1304 <tr>
1305 <ti>
1306 <path>xfs-sources</path>
1307 </ti>
1308 <ti>Highly-compatible kernel with XFS support.</ti>
1309 </tr>
1310 <tr>
1311 <ti>
1312 <path>openmosix-sources</path>
1313 </ti>
1314 <ti>A stock Linux kernel source tree patched with support for the GPL <uri link="http://www.openmosix.com">openMosix</uri> load-balancing/clustering technology</ti>
1315 </tr>
1316 <tr>
1317 <ti>
1318 <path>usermode-sources</path>
1319 </ti>
1320 <ti>A stock Linux kernel source tree patched with support for User-Mode Linux. (&quot;Linux inside Linux&quot; technology)</ti>
1321 </tr>
1322 <tr>
1323 <ti>
1324 <path>vanilla-sources</path>
1325 </ti>
1326 <ti>A stock Linux kernel source tree, just like you would get from kernel.org</ti>
1327 </tr>
1328 </table>
1329 <warn>
1330 If you are configuring your own kernel, be careful with the <i>grsecurity</i> option. Being too aggressive with your
1331 security settings can cause certain programs (such as X) to not run properly. If in doubt, leave it out.
1332 </warn>
1333 <p>Choose a kernel and then merge as follows:</p>
1334 <pre caption="Emerging Kernel Sources">
1335 # <c>emerge sys-kernel/gentoo-sources</c>
1336 </pre>
1337 <p>Once you have a Linux kernel source tree available, it is time to compile your own custom kernel.
1338 </p>
1339 <p>Please note that <path>/usr/src/linux</path> is a symlink to your current emerged kernel source package,
1340 and is set automatically by Portage at emerge time.
1341 If you have multiple kernel source packages, it is necessary to set the <path>/usr/src/linux</path> symlink
1342 to the correct one before proceeding.
1343 </p>
1344 <pre caption="Compiling the Linux Kernel">
1345 # <c>cd /usr/src/linux</c>
1346 # <c>make menuconfig</c>
1347 # <c>make dep &amp;&amp; make clean bzImage modules modules_install</c>
1348 # <c>cp /usr/src/linux/arch/i386/boot/bzImage /boot</c>
1349 </pre>
1350 <warn>For your kernel to function properly, there are several options that you will
1351 need to ensure are in the kernel proper -- that is, they should <i>be enabled and not
1352 compiled as modules</i>. Be sure to enable &quot;ReiserFS&quot; if you have
1353 any ReiserFS partitions; the same goes for &quot;Ext3&quot;. If you're using XFS, enable the
1354 &quot;SGI XFS filesystem support&quot; option. It's always a good idea to leave ext2
1355 enabled whether you are using it or not. Below are some common options that you will need:</warn>
1356 <pre caption="make menuconfig options">
1357 Code maturity level options ---&gt;
1358 [*] Prompt for development and/or incomplete code/drivers&quot;
1359 <comment>(You need this to enable some of the options below.)</comment>
1360 ...
1361
1362 File systems ---&gt;
1363 &lt;*&gt; Reiserfs support
1364 <comment>(Only needed if you are using reiserfs.)</comment>
1365 ...
1366 &lt;*&gt; Ext3 journalling file system support
1367 <comment>(Only needed if you are using ext3.)</comment>
1368 ...
1369 [*] Virtual memory file system support (former shm fs)
1370 <comment>(Required for Gentoo Linux.)</comment>
1371 ...
1372 &lt;*&gt; JFS filesystem support
1373 <comment>(Only needed if you are using JFS.)</comment>
1374 ...
1375 [*] /proc file system support
1376 <comment>(Required for Gentoo Linux.)</comment>
1377 [*] /dev file system support (EXPERIMENTAL)
1378 [*] Automatically mount at boot
1379 <comment>(Required for Gentoo Linux.)</comment>
1380 [ ] /dev/pts file system for Unix98 PTYs
1381 <comment>(Uncheck this, it is NOT needed.)</comment>
1382 ...
1383 &lt;*&gt; Second extended fs support
1384 <comment>(Only needed if you are using ext2.)</comment>
1385 ...
1386 &lt;*&gt; XFS filesystem support
1387 <comment>(Only needed if you are using XFS.)</comment>
1388 </pre>
1389 <p>If you are using hardware RAID you will need to enable a couple more options in the kernel:
1390 For Highpoint RAID controllers select hpt366 chipset support, support for IDE RAID controllers and Highpoint
1391 370 software RAID.For Promise RAID controllers select PROMISE PDC202{46|62|65|67|68|69|70} support,
1392 support for IDE RAID
1393 controllers and Support Promise software RAID (Fasttrak(tm))
1394 </p>
1395 <p>If you use PPPoE to connect to Internet, you will need the following
1396 options in the kernel (built-in or as preferably as modules) :
1397 &quot;PPP (point-to-point protocol) support&quot;, &quot;PPP support for async serial ports&quot;,
1398 &quot;PPP support for sync tty ports&quot;. The two compression options won't harm but
1399 are not definitely needed, neither does the &quot;PPP over Ethernet&quot; option,
1400 that might only be used by <i>rp-pppoe</i> when configured to do kernel mode PPPoE.
1401 </p>
1402 <p>If you have an IDE cd burner, then you need to enable SCSI emulation in the
1403 kernel. Turn on &quot;ATA/IDE/MFM/RLL support&quot; ---&gt; &quot;IDE, ATA and ATAPI Block
1404 devices&quot; ---&gt; &quot;SCSI emulation support&quot; (I usually make it a module), then
1405 under &quot;SCSI support&quot; enable &quot;SCSI support&quot;, &quot;SCSI CD-ROM support&quot; and
1406 &quot;SCSI generic support&quot; (again, I usually compile them as modules). If you
1407 also choose to use modules, then <c>echo -e &quot;ide-scsi\nsg\nsr_mod&quot;
1408 &gt;&gt; /etc/modules.autoload</c> to have them automatically added at boot time.
1409 </p>
1410 <note>
1411 For those who prefer it,
1412 it is now possible to install Gentoo Linux with a 2.2 kernel.
1413 However, doing this comes at a price:
1414 you will lose many of the nifty features that
1415 are new to the 2.4 series kernels (such as XFS and tmpfs
1416 filesystems, iptables, and more), although the 2.2 kernel sources can be
1417 patched with ReiserFS and devfs support.
1418 Gentoo linux boot scripts require either tmpfs or ramdisk support in the kernel, so
1419 2.2 kernel users need to make sure that ramdisk support is compiled in (ie, not a module).
1420 It is <comment>vital</comment> that a <e>gentoo=notmpfs</e> flag be added to the kernel
1421 line in <path>/boot/grub/grub.conf</path> or to the append line in <path>/etc/lilo.conf</path> for the 2.2 kernel so
1422 that a ramdisk is mounted for the boot scripts instead of tmpfs. If you choose not to use devfs, then
1423 <e>gentoo=notmpfs,nodevfs</e> should be used instead.
1424 </note>
1425 <p>Your new custom kernel (and modules) are now installed. Now you need to choose a system
1426 logger that you would like to install. We offer sysklogd, which is the traditional set
1427 of system logging daemons. We also have msyslog and syslog-ng as well as metalog. Power users seem
1428 to gravitate away from sysklogd (not very good performance) and towards the
1429 newer alternatives.
1430 If in doubt, you may want to try metalog, since it seems to be quite popular.
1431 To merge your logger of choice, type <e>one</e> of the next four lines:
1432 </p>
1433 <pre caption="Emerging System Logger of Choice">
1434 # <c>emerge app-admin/sysklogd</c>
1435 # <c>rc-update add sysklogd default</c>
1436 <comment>or</comment>
1437 # <c>emerge app-admin/syslog-ng</c>
1438 # <c>rc-update add syslog-ng default</c>
1439 <comment>or</comment>
1440 # <c>emerge app-admin/metalog</c>
1441 # <c>rc-update add metalog default</c>
1442 <comment>or</comment>
1443 # <c>emerge app-admin/msyslog</c>
1444 # <c>rc-update add msyslog default</c>
1445 </pre>
1446 <impo>
1447 Metalog flushes output to the disk in blocks, so messages aren't immediately recorded into
1448 the system logs. If you are trying to debug a daemon, this performance-enhancing behavior
1449 is less than helpful. When your Gentoo Linux system is up and running, you can send
1450 metalog a USR1 signal to temporarily turn off this message buffering (meaning that
1451 <i>tail -f <path>/var/log/everything/current</path></i> will now work
1452 in real time, as expected),
1453 and a USR2 signal to turn buffering back on
1454 again. If you want to disable buffering permanently, you can change METALOG_OPTS="-B" to METALOG_OPTS="-B -s"
1455 in <path>/etc/conf.d/metalog</path>.
1456 </impo>
1457 <pre caption="Turning metalog buffering on/off">
1458 <codenote>To turn the buffering off:</codenote>
1459 # <c>killall -USR1 metalog</c>
1460 <codenote>To turn the buffering back on:</codenote>
1461 # <c>killall -USR2 metalog</c>
1462 </pre>
1463 <p>Now, you may optionally choose a cron package that you would like to use.
1464 Right now, we offer dcron, fcron and vcron. If you do not know which one to choose,
1465 you might as well grab vcron. They can be installed as follows:
1466 </p>
1467 <pre caption="Choosing a CRON Daemon">
1468 # <c>emerge sys-apps/dcron</c>
1469 # <c>rc-update add dcron default</c>
1470 # <c>crontab /etc/crontab</c>
1471 <comment>or</comment>
1472 # <c>emerge sys-apps/fcron</c>
1473 # <c>rc-update add fcron default</c>
1474 # <c>crontab /etc/crontab</c>
1475 <comment>or</comment>
1476 # <c>emerge sys-apps/vcron</c>
1477 # <c>rc-update add vcron default</c>
1478 <comment>You do not need to run <c>crontab /etc/crontab</c> if using vcron.</comment>
1479 </pre>
1480 <p>For more information on starting programs and daemons at startup, see the
1481 <uri link="/doc/en/rc-scripts.xml">rc-script guide</uri>.
1482 </p>
1483 </body>
1484 </section>
1485 </chapter>
1486 <chapter>
1487 <title>Installing miscellany necessary packages</title>
1488 <section>
1489 <body>
1490 <p>If you need rp-pppoe to connect to the net, be aware that at this point
1491 it has not been installed. It would be the good time to do it. </p>
1492 <pre caption="Installing rp-pppoe">
1493 # <c>USE="-X" emerge rp-pppoe</c>
1494 </pre>
1495
1496 <note>The <i>USE="-X"</i> prevents pppoe from installing its optional X interface, which is a good thing,
1497 because X and its dependencies would also be emerged. You can always recompile <i>rp-pppoe</i> with
1498 X support later.
1499 </note>
1500 <note> Please note that the rp-pppoe is built but not configured.
1501 You will have to do it again using <c>adsl-setup</c> when you boot into your Gentoo system
1502 for the first time.
1503 </note>
1504 <p>You may need to install some additional packages in the Portage tree
1505 if you are using any optional features like XFS, ReiserFS or LVM. If you're
1506 using XFS, you should emerge the <c>xfsprogs</c> package:
1507 </p>
1508 <pre caption="Emerging Filesystem Tools">
1509 # <c>emerge sys-apps/xfsprogs</c>
1510 <comment>If you would like to use ReiserFS, you should emerge the ReiserFS tools: </comment>
1511 # <c>emerge sys-apps/reiserfsprogs</c>
1512 <comment>If you would like to use JFS, you should emerge the JFS tools: </comment>
1513 # <c>emerge jfsutils</c>
1514 <comment>If you're using LVM, you should emerge the <c>lvm-user</c> package: </comment>
1515 # <c>emerge sys-apps/lvm-user</c>
1516 </pre>
1517 <p>If you're a laptop user and wish to use your PCMCIA slots on your first
1518 real reboot, you will want to make sure you install the <i>pcmcia-cs</i> package.
1519 </p>
1520 <pre caption="Emerging PCMCIA-cs">
1521 # <c>emerge sys-apps/pcmcia-cs</c>
1522 </pre>
1523 <warn>You will have to re-emerge <i>pcmcia-cs</i> after installation to get PCMCIA
1524 to work.
1525 </warn>
1526 </body>
1527 </section>
1528 </chapter>
1529 <chapter>
1530 <title>Modifying /etc/fstab for your machine</title>
1531 <section>
1532 <body>
1533 <p>Your Gentoo Linux system is almost ready for use. All we need to do now is configure
1534 a few important system files and install the boot loader.
1535 The first file we need to
1536 configure is <path>/etc/fstab</path>. Remember that you should use
1537 the <c>notail</c> option for your boot partition if you chose to create a ReiserFS filesystem on it.
1538 Remember to specify <c>ext2</c>, <c>ext3</c> or <c>reiserfs</c> filesystem types as appropriate.
1539 </p>
1540 <p>Use something like the <path>/etc/fstab</path> listed below, but of course be sure to replace &quot;BOOT&quot;,
1541 &quot;ROOT&quot; and &quot;SWAP&quot; with the actual block devices you are using (such as <c>hda1</c>, etc.)</p>
1542 <pre caption="Editing fstab">
1543 <comment># /etc/fstab: static file system information.
1544 #
1545 # noatime turns off atimes for increased performance (atimes normally aren't
1546 # needed; notail increases performance of ReiserFS (at the expense of storage
1547 # efficiency). It is safe to drop the noatime options if you want and to
1548 # switch between notail and tail freely.
1549
1550 # &lt;fs&gt; &lt;mount point&gt; &lt;type&gt; &lt;opts&gt; &lt;dump/pass&gt;
1551
1552 # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
1553 </comment>
1554 /dev/BOOT /boot ext2 noauto,noatime 1 2
1555 /dev/ROOT / ext3 noatime 0 1
1556 /dev/SWAP none swap sw 0 0
1557 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
1558 proc /proc proc defaults 0 0
1559 </pre>
1560 <warn>Please notice that <i>/boot</i> is NOT mounted at boot time.
1561 This is to protect the data in <i>/boot</i> from
1562 corruption. If you need to access <i>/boot</i>, please mount it!
1563 </warn>
1564 </body>
1565 </section>
1566 </chapter>
1567 <chapter>
1568 <title>Setting the Root Password</title>
1569 <section>
1570 <body>
1571 <p>Before you forget, set the root password by typing: </p>
1572 <pre caption="Setting the root Password">
1573 # <c>passwd</c>
1574 </pre>
1575
1576 <p>You will also want to add a non-root user for everyday use. Please consult
1577 the <uri link="http://www.gentoo.org/doc/en/faq.xml">Gentoo FAQ</uri>.
1578 </p>
1579 </body>
1580 </section>
1581 </chapter>
1582 <chapter>
1583 <title>Setting your Hostname</title>
1584 <section>
1585 <body>
1586 <p>Edit this file so that it contains your fully-qualified domain name on a single line,
1587 i.e. <c>mymachine.mydomain.com</c>.
1588 </p>
1589 <pre caption="Configuring Hostname">
1590 # <c>echo mymachine.mydomain.com &gt; /etc/hostname</c>
1591 </pre>
1592 </body>
1593 </section>
1594 </chapter>
1595 <chapter>
1596 <title>Modifying /etc/hosts</title>
1597 <section>
1598 <body>
1599 <p>This file contains a list of IP addresses and their associated hostnames.
1600 It is used by the system to resolve the IP addresses
1601 of any hostnames that may not be in your nameservers. Here is a template for this file:
1602 </p>
1603 <pre caption="Hosts Template">
1604 127.0.0.1 localhost
1605 <comment># the next line contains your IP for your local LAN, and your associated machine name</comment>
1606 192.168.1.1 mymachine.mydomain.com mymachine
1607 </pre>
1608 <note>If you are on a DHCP network, it might be helpful to set <i>localhost</i> to your machine's
1609 actual hostname. This will help GNOME and many other programs in name resolution.
1610 </note>
1611 </body>
1612 </section>
1613 </chapter>
1614 <chapter>
1615 <title>Final Network Configuration</title>
1616 <section>
1617 <body>
1618 <p>Add the names of any modules that are necessary for the proper functioning of your system to
1619 <path>/etc/modules.autoload</path> file (you can also add any options you
1620 need to the same line.) When Gentoo Linux boots, these modules will be automatically
1621 loaded. Of particular importance is your ethernet card module, if you happened to compile
1622 it as a module:
1623 </p>
1624 <pre caption="/etc/modules.autoload"><comment>This is assuming that you are using a 3com card.
1625 Check <path>/lib/modules/`uname -r`/kernel/drivers/net</path> for your card. </comment>
1626 3c59x
1627 </pre>
1628 <p>Edit the <path>/etc/conf.d/net</path> script to get your network configured for your
1629 first boot: </p>
1630 <pre caption="Boot time Network Configuration">
1631 # <c>nano -w /etc/conf.d/net</c>
1632 # <c>rc-update add net.eth0 default</c>
1633 </pre>
1634 <p>If you have multiple network cards or tokenring interfaces, you need to create additional <path>net.eth<comment>x</comment></path> or <path>net.tr<comment>x</comment></path>
1635 scripts respectively for each one (<comment>x</comment> = 1, 2, ...): </p>
1636 <pre caption="Multiple Network Interfaces">
1637 # <c>cd /etc/init.d</c>
1638 # <c>cp net.eth0 net.eth<comment>x</comment></c>
1639 # <c>rc-update add net.eth<comment>x</comment> default</c>
1640 </pre>
1641 <p>If you have a PCMCIA card installed, have a quick look into
1642 <path>/etc/init.d/pcmcia</path> to verify that things seem all right for your setup,
1643 then add this line to the top of <path>/etc/init.d/net.ethx</path>:
1644 </p>
1645 <pre caption="PCMCIA depend in /etc/init.d/net.ethx">
1646 depend() {
1647 need pcmcia
1648 }
1649 </pre>
1650 <p>This makes sure that the PCMCIA drivers are autoloaded whenever your network is loaded.
1651 </p>
1652 </body>
1653 </section>
1654 </chapter>
1655 <chapter>
1656 <title>Final steps: Configure Basic Settings (including the international keymap setting)</title>
1657 <section>
1658 <body>
1659 <pre caption="Basic Configuration">
1660 # <c>nano -w /etc/rc.conf</c>
1661 </pre>
1662 <p>Follow the directions in the file to configure the basic settings.
1663 All users will want to make sure that <c>CLOCK</c> is set to his/her
1664 liking. International keyboard users will want to set the <c>KEYMAP</c>
1665 variable (browse <path>/usr/share/keymaps</path> to see the various
1666 possibilities).
1667 </p>
1668 </body>
1669 </section>
1670 </chapter>
1671 <chapter>
1672 <title>Configure a Bootloader</title>
1673 <section>
1674 <title>Notes</title>
1675 <body>
1676 <p> In the spirit of Gentoo, users now have more than one bootloader to choose from.
1677 Using our virtual package system, users are now able to choose between both GRUB and
1678 LILO as their bootloaders.
1679 </p>
1680 <p> Please keep in mind that having both bootloaders installed is not necessary.
1681 In fact, it can be a hindrance, so please only choose one.
1682 </p>
1683 <impo>If you are installing Gentoo Linux on a system with an NVIDIA nForce or nForce2 chipset
1684 with an integrated GeForce graphics card, you should use LILO and avoid GRUB. With on-board
1685 video enabled, the low memory area of your RAM may be used as video RAM. Since GRUB also uses low
1686 memory at boot time, it may experience an "out of memory" condition. So, if you have an nForce
1687 or potentially other board with on-board video, use LILO. Even if you're using off-board video
1688 right now, it would be nice to be able to remove the graphics card and use the on-board video in a
1689 pinch, wouldn't it? :)</impo>
1690
1691 </body>
1692 </section>
1693 <section>
1694 <title>Configuring GRUB</title>
1695 <body>
1696 <p>The most critical part of understanding GRUB is getting comfortable with how GRUB
1697 refers to hard drives and partitions. Your Linux partition <path>/dev/hda1</path> is called
1698 <path>(hd0,0)</path> under GRUB. Notice the parenthesis around the hd0,0 - they are required.
1699 Hard drives count from zero rather than &quot;a&quot;, and partitions start at zero rather than one.
1700 Be aware too that with the hd devices, only harddrives are counted, not atapi-ide devices such as
1701 cdrom players, burners, and that the same construct can be used with scsi drives.
1702 (Normally they get higher numbers than ide drives except when the bios is configured
1703 to boot from scsi devices.) Assuming you have a harddrive on /dev/hda, a cdrom player on /dev/hdb,
1704 a burner on /dev/hdc, a second hard drive on /dev/hdd and no scsi harddrive,
1705 <path>/dev/hdd7</path> gets translated to <path>(hd1,6)</path>.
1706
1707 It might sound tricky, and tricky it is indeed, but as we will see, grub
1708 offers a tab completion mechanism that comes handy for those of you having
1709 a lot of harddrives and partitions and who are a little lost in the
1710 grub numbering scheme. Having gotten the feel for that,
1711 it is time to install GRUB.
1712 </p>
1713 <p>The easiest way to install GRUB is to simply type <c>grub</c> at your chrooted shell prompt: </p>
1714 <pre caption="Installing GRUB">
1715 # <c>emerge grub</c>
1716 # <c>grub</c>
1717 </pre>
1718 <impo>If you are using hardware RAID this part will not work at
1719 this time.
1720 Skip to the section on making your <path>grub.conf</path>. After that we will complete the
1721 grub setup for RAID controllers
1722 </impo>
1723 <p>You will be presented with the <c>grub&gt;</c> grub
1724 command-line prompt. Now, you need to type in the
1725 right commands to install the GRUB boot record onto your hard drive. In my example configuration,
1726 I want to install the GRUB boot record on my hard drive's MBR (master boot record), so that
1727 the first thing I see when I turn on the computer is the GRUB prompt. In my case, the commands
1728 I want to type are:
1729 </p>
1730
1731 <pre caption="GRUB on the MBR">
1732 grub&gt; <c>root (hd0,0)</c> <codenote>Your boot partition</codenote>
1733 grub&gt; <c>setup (hd0)</c> <codenote>Where the boot record is installed, here, it is the MBR</codenote>
1734 </pre>
1735
1736 <pre caption="GRUB not on the MBR">
1737 <comment>Alternatively, if you wanted to install the bootloader somewhere other than the MBR</comment>
1738 grub&gt; <c>root (hd0,0)</c> <codenote>Your boot partition</codenote>
1739 grub&gt; <c>setup (hd0,4)</c> <codenote>Where the boot record is installed, here it is /dev/hda5</codenote>
1740 grub&gt; <c>quit</c>
1741 </pre>
1742
1743 <p>Here is how the two commands work. The first <c>root ( )</c> command tells GRUB
1744 the location of your boot partition (in our example, <path>/dev/hda1</path> or
1745 <path>(hd0,0)</path> in GRUB terminology. Then, the second <c>setup ( )
1746 </c> command tells GRUB where to install the
1747 boot record - it will be configured to look for its special files at the <c>root
1748 ( )</c> location that you specified. In my case, I want the boot record on the
1749 MBR of the hard drive, so I simply specify <path>/dev/hda</path> (also known as <path>(hd0)</path>).
1750 If I were using another boot loader and wanted to set up GRUB as a secondary boot-loader, I
1751 could install GRUB to the boot record of a particular partition. In that case,
1752 I would specify a particular partition rather than the entire disk. Once the GRUB
1753 boot record has been successfully installed, you can type <c>quit</c> to quit GRUB.
1754 </p>
1755
1756 <note> The tab completion mechanism of grub can be used from within grub,
1757 assuming you wrote <c> root (</c> and that you hit the TAB key, you would
1758 be prompted with a list of the available devices (not only harddrives),
1759 hitting the TAB key having written <c> root (hd</c>, grub would print the
1760 available harddrives and hitting the TAB key after writing <c> root (hd0,</c>
1761 would make grub print the list of partitions on the first harddrive.
1762
1763 Checking the syntax of the grub location with completion should really help
1764 to make the right choice.
1765 </note>
1766
1767 <p>
1768 Gentoo Linux is now
1769 installed, but we need to create the <path>/boot/grub/grub.conf</path> file so that
1770 we get a nice GRUB boot menu when the system reboots. Here is how to do it.
1771 </p>
1772 <impo>To ensure backwards compatibility with GRUB, make sure to make a link from
1773 <i>grub.conf</i> to <i>menu.lst</i>. You can do this by doing
1774 <c>ln -s /boot/grub/grub.conf /boot/grub/menu.lst </c>. </impo>
1775 <p>Now, create the grub.conf file (<c>nano -w /boot/grub/grub.conf</c>), and add the following to it:
1776 </p>
1777 <pre caption="Grub.conf for GRUB">
1778 default 0
1779 timeout 30
1780 splashimage=(hd0,0)/boot/grub/splash.xpm.gz
1781
1782 title=My example Gentoo Linux
1783 root (hd0,0)
1784 kernel (hd0,0)/boot/bzImage root=/dev/hda3
1785
1786 <comment># Below is for setup using hardware RAID</comment>
1787 title=My Gentoo Linux on RAID
1788 root (hd0,0)
1789 kernel (hd0,0)/boot/bzImage root=/dev/ataraid/dXpY
1790
1791 <comment># Below needed only for people who dual-boot</comment>
1792 title=Windows XP
1793 root (hd0,5)
1794 chainloader (hd0,5)+1
1795 </pre>
1796 <note>
1797 (hd0,0) should be written without any spaces inside the parentheses.
1798 </note>
1799 <impo>
1800 If you set up scsi emulation for an IDE cd burner earlier, then to get it to
1801 actually work you need to add an &quot;hdx=ide-scsi&quot; fragment to the kernel
1802 line in grub.conf (where &quot;hdx&quot; should be the device for your cd burner).
1803 </impo>
1804 <p>After saving this file, Gentoo Linux installation is complete. Selecting the first option will
1805 tell GRUB to boot Gentoo Linux without a fuss. The second part of the grub.conf file is optional,
1806 and shows you how to use GRUB to boot a bootable Windows partition.
1807 </p>
1808 <note>Above, <path>(hd0,0)</path> should point to your &quot;boot&quot; partition
1809 (<path>/dev/hda1</path> in our example config) and <path>/dev/hda3</path> should point to
1810 your root filesystem. <path>(hd0,5)</path> contains the NT boot
1811 loader.
1812 </note>
1813 <note>
1814 The path to the kernel image is relative to the boot partition. If for example you have separated boot partition <path>(hd0,0)</path> and root partition <path>(hd0,1)</path>, all paths in the grub.conf file above will become <path>/bzImage</path>.
1815 </note>
1816 <p>If you need to pass any additional options to the kernel, simply
1817 add them to the end of the <c>kernel</c> command. We're already passing one option
1818 (<c>root=/dev/hda3</c>), but you can pass others as well. In particular, you can
1819 turn off devfs by default (not recommended unless you know what you're doing) by
1820 adding the <c>gentoo=nodevfs</c> option to the <c>kernel</c> command.
1821 </p>
1822 <note>Unlike in earlier versions of Gentoo Linux, you no longer have to add
1823 <c>devfs=mount</c> to the end of the <c>kernel</c> line to enable devfs. In rc6
1824 devfs is enabled by default.
1825 </note>
1826 </body>
1827 </section>
1828 <section>
1829 <title>Configuring LILO</title>
1830 <body>
1831 <p>While GRUB may be the new alternative for most people, it is not always the best choice.
1832 LILO, the LInuxLOader, is the tried and true workhorse of Linux bootloaders. Here is how to install
1833 LILO if you would like to use it instead of GRUB:
1834 </p>
1835 <p>The first step is to emerge LILO:
1836 </p>
1837 <pre caption="Emerging LILO">
1838 # <c>emerge lilo</c>
1839 </pre>
1840 <p>Now it is time to configure LILO. Here is a sample configuration file <path>/etc/lilo.conf</path>
1841 </p>
1842 <pre caption="Example lilo.conf">
1843 boot=/dev/hda
1844 map=/boot/map
1845 install=/boot/boot.b
1846 prompt
1847 timeout=50
1848 lba32
1849 default=linux
1850
1851 image=/boot/bzImage
1852 label=linux
1853 read-only
1854 root=/dev/hda3
1855
1856 #For dual booting windows/other OS
1857 other=/dev/hda1
1858 label=dos
1859 </pre>
1860 <ul>
1861 <li><i>boot=/dev/hda</i> tells LILO to install itself on the first hard disk on the first IDE controller. </li>
1862 <li><i>map=/boot/map</i> states the map file. In normal use, this should not be modified. </li>
1863 <li><i>install=/boot/boot.b</i> tells LILO to install the specified file as the new boot sector.
1864 In normal use, this should not be altered. If the install line is missing, LILO will
1865 assume a default of /boot/boot.b as the file to be used. </li>
1866 <li>The existence of <i>prompt</i> tells LILO to display the classic <i>lilo:</i> prompt at bootup.
1867 While it is not recommended that you remove the prompt line, if you do remove it, you can still
1868 get a prompt by holding down the [Shift] key while your machine starts to boot. </li>
1869 <li><i>timeout=50</i> sets the amount of time that LILO will wait for user input before proceeding
1870 with booting the default line entry. This is measured in tenths of a second, with 50 as the default. </li>
1871 <li><i>lba32</i> describes the hard disk geometry to LILO. Another common entry here is linear. You should
1872 not change this line unless you are very aware of what you are doing. Otherwise, you could put
1873 your system in an unbootable state. </li>
1874 <li><i>default=linux</i> refers to the default operating system for LILO to boot from the
1875 options listed below this line. The name linux refers to the label line below in each of the boot options. </li>
1876 <li><i>image=/boot/bzImage</i> specifies the linux kernel to boot with this particular boot option. </li>
1877 <li><i>label=linux</i> names the operating system option in the LILO screen. In this case,
1878 it is also the name referred to by the default line. </li>
1879 <li><i>read-only</i> specifies that the root partition (see the root line below) is read-only and cannot be
1880 altered during the boot process. </li>
1881 <li><i>root=/dev/hda5</i> tells LILO what disk partition to use as the root partition. </li>
1882 </ul>
1883 <p>After you have edited your <i>lilo.conf</i> file, it is time to run LILO to load the information
1884 into the MBR:
1885 </p>
1886 <pre caption="Running LILO">
1887 # <c>/sbin/lilo</c>
1888 </pre>
1889 <p>LILO is configured, and now your machine is ready to boot into Gentoo Linux!
1890 </p>
1891 </body>
1892 </section>
1893 </chapter>
1894 <chapter>
1895 <title>Creating Bootdisks</title>
1896 <section>
1897 <title>GRUB Bootdisks</title>
1898 <body>
1899 <p>It is always a good idea to make a boot disk the first
1900 time you install any Linux distribution. This is a security
1901 blanket, and generally not a bad thing to do. If you are using some kinds of hardware RAID, you may <e>need</e> to make a GRUB boot
1902 disk. With these types of hardware RAID,
1903 if you try to install grub from your chrooted shell it will fail. If you are in this camp,
1904 make a GRUB
1905 boot disk, and when you reboot the first time you can install GRUB
1906 to the MBR. Make your
1907 bootdisks like this:
1908 </p>
1909 <pre caption="Creating a GRUB Bootdisk">
1910 # <c>mke2fs /dev/fd0</c>
1911 # <c>mount /dev/fd0 /mnt/floppy</c>
1912 # <c>mkdir -p /mnt/floppy/boot/grub</c>
1913 # <c>cp /usr/share/grub/i386-pc/stage1 /mnt/floppy/boot/grub/</c>
1914 # <c>cp /usr/share/grub/i386-pc/stage2 /mnt/floppy/boot/grub/</c>
1915 # <c>umount /mnt/floppy</c>
1916 # <c>grub</c>
1917
1918 grub&gt; <c>root (fd0)</c>
1919 grub&gt; <c>setup (fd0)</c>
1920 grub&gt; <c>quit</c>
1921 </pre>
1922 <p>Now reboot and load the floppy. At the floppy's <c>grub&gt;</c> prompt, you can now execute the necessary <c>root</c>
1923 and <c>setup</c> commands.</p>
1924 </body>
1925 </section>
1926 <section>
1927 <title>LILO Bootdisks</title>
1928 <body>
1929 <p>If you are using LILO, it is also a good idea to make a bootdisk:
1930 </p>
1931 <pre caption="Making a LILO Bootdisk">
1932 # <c>dd if=/boot/your_kernel of=/dev/fd0 </c>
1933 <comment>This will only work if your kernel is smaller than 1.4MB</comment>
1934 </pre>
1935 </body>
1936 </section>
1937 </chapter>
1938 <chapter>
1939 <title>Installation Complete!</title>
1940 <section>
1941 <body>
1942 <p>Now, Gentoo Linux is installed. The only remaining step is to update necessary configuration files, exit the chrooted shell,
1943
1944 safely unmount your partitions
1945 and reboot the system:
1946 </p>
1947 <pre caption="Rebooting the System">
1948 # <c>etc-update</c>
1949 # <c>exit</c>
1950 <comment>(This exits the chrooted shell; you can also type <c>^D</c>)</comment>
1951 # <c>cd / </c>
1952 # <c>umount /mnt/gentoo/boot</c>
1953 # <c>umount /mnt/gentoo/proc</c>
1954 # <c>umount /mnt/gentoo</c>
1955 # <c>reboot</c>
1956 </pre>
1957 <note>
1958 After rebooting, it is a good idea to run the <c>update-modules</c> command to create
1959 the <path>/etc/modules.conf</path> file. Instead of modifying this file directly, you should
1960 generally make changes to the files in <path>/etc/modules.d</path>.
1961 </note>
1962 <impo>Remember if you are running hardware RAID, you must
1963 use the bootdisk for the first reboot.
1964 then go back and install grub the way everyone else did the first
1965 time. You are done -- congratulations!</impo>
1966 <p>If you have any questions or would like to get involved with Gentoo Linux development,
1967 consider joining our gentoo-user and gentoo-dev mailing lists
1968 (more information on our <uri link="http://www.gentoo.org/main/en/lists.xml">mailing lists</uri> page).
1969 We also have a handy <uri link="http://www.gentoo.org/doc/en/desktop.xml">Desktop configuration guide</uri>
1970 that will
1971 help you to continue configuring your new Gentoo Linux system, and a useful
1972 <uri link="http://www.gentoo.org/doc/en/portage-user.xml">Portage user guide</uri>
1973 to help familiarize you with Portage basics. You can find the rest of the Gentoo Documentation
1974 <uri link="http://www.gentoo.org/main/en/docs.xml">here</uri>. If you have any other questions
1975 involving installation or anything for that matter, please check the Gentoo Linux
1976 <uri link="http://www.gentoo.org/doc/en/faq.xml">FAQ</uri>.
1977 Enjoy and welcome to Gentoo Linux!
1978 </p>
1979 </body>
1980 </section>
1981 </chapter>
1982 <chapter>
1983 <title>Gentoo-Stats</title>
1984 <section>
1985 <body>
1986 <p>The Gentoo Linux usage statistics program was started as an attempt to give the developers
1987 a way to find out about their user base. It collects information about Gentoo Linux usage to help
1988 us in set priorities our development. Installing it is completely optional, and it would be greatly
1989 appreciated if you decide to use it. Compiled statistics can be viewed at <uri>http://stats.gentoo.org/</uri>.
1990 </p>
1991 <p>The gentoo-stats server will assign a unique ID to your system.
1992 This ID is used to make sure that each system is counted only once. The ID will not be used
1993 to individually identify your system, nor will it be matched against an IP address or
1994 other personal information. Every precaution has been taken to assure your privacy in the
1995 development of this system. The following are the things that we are monitoring
1996 right now through our &quot;gentoo-stats&quot; program:
1997 </p>
1998 <ul>
1999 <li>installed packages and their version numbers</li>
2000 <li>CPU information: speed (MHz), vendor name, model name, CPU flags (like &quot;mmx&quot; or &quot;3dnow&quot;)</li>
2001 <li>memory information (total available physical RAM, total available swap space)</li>
2002 <li>PCI cards and network controller chips</li>
2003 <li>the Gentoo Linux profile your machine is using (that is, where the /etc/make.profile link is pointing to).</li>
2004 </ul>
2005 <p>We are aware that disclosure of sensitive information is a threat to most Gentoo Linux users
2006 (just as it is to the developers).
2007 </p>
2008 <ul>
2009 <li>Unless you modify the gentoo-stats program, it will never transmit sensitive
2010 information such as your passwords, configuration data, shoe size...</li>
2011 <li>Transmission of your e-mail addresses is optional and turned off by default.</li>
2012 <li>The IP address your data transmission originates from will never be logged
2013 in such a way that we can identify you. There are no &quot;IP address/system ID&quot; pairs.</li>
2014 </ul>
2015 <p>The installation is easy - just run the following commands:
2016 </p>
2017 <pre caption="Installing gentoo-stats">
2018 # <c>emerge gentoo-stats</c> <codenote>Installs gentoo-stats</codenote>
2019 # <c>gentoo-stats --new</c> <codenote>Obtains a new system ID</codenote>
2020 </pre>
2021 <p>The second command above will request a new system ID and enter it into
2022 <path>/etc/gentoo-stats/gentoo-stats.conf</path> automatically. You can view this file
2023 to see additional configuration options.
2024 </p>
2025 <p>After that, the program should be run on a regular schedule
2026 (gentoo-stats does not have to be run as root). Add this line to your <path>crontab</path>:
2027 </p>
2028 <pre caption="Updating gentoo-stats with cron">
2029 <c>0 0 * * 0,4 /usr/sbin/gentoo-stats --update &gt; /dev/null</c>
2030 </pre>
2031 <p>The <c>gentoo-stats</c> program is a simple perl script which can be
2032 viewed with your favorite pager or editor: <path>/usr/sbin/gentoo-stats</path>. </p>
2033 </body>
2034 </section>
2035 </chapter>
2036 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20