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

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.134 - (show annotations) (download) (as text)
Tue Jul 1 10:34:52 2003 UTC (15 years, 1 month ago) by swift
Branch: MAIN
Changes since 1.133: +21 -6 lines
File MIME type: application/xml

Add warning on top of "Booting" to warn that ignoring the bootoptions
could potentially result in wrong keyboard settings, unstarted pcmcia
services and more.

Inform the users about the dangers of root, add section to inform the user
more precisely that he should be adding a user for day-to-day tasks.

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

  ViewVC Help
Powered by ViewVC 1.1.20