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

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.20 - (hide annotations) (download) (as text)
Tue Dec 31 11:36:56 2002 UTC (15 years, 11 months ago) by stocke2
Branch: MAIN
Changes since 1.19: +0 -1 lines
File MIME type: application/xml
removed stylesheet pi

1 zhen 1.16 <?xml version="1.0" encoding="UTF-8"?>
2 drobbins 1.1 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3 zhen 1.3 <guide link="/doc/en/gentoo-x86-install.xml">
4 zhen 1.16 <title>Gentoo Linux 1.4 Installation Instructions</title>
5     <author title="Chief Architect">
6     <mail link="drobbins@gentoo.org">Daniel Robbins</mail>
7     </author>
8     <author title="Author">Chris Houser</author>
9     <author title="Author">
10     <mail link="jerry@gentoo.org">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     <abstract>These instructions step you through the process of installing Gentoo
28 zhen 1.6 Linux 1.4_rc1. The Gentoo Linux installation process supports various installation
29     approaches, depending upon how much of the system you want to custom-build from
30     scratch.
31     </abstract>
32 zhen 1.18 <version>2.2</version>
33 zhen 1.19 <date>17 December 2002</date>
34 zhen 1.16 <chapter>
35     <title>About the Install</title>
36     <section>
37     <body>
38     <p>This new boot CD will boot from nearly any modern IDE CD-ROM drive, as well
39 zhen 1.6 as many SCSI CD-ROM, assuming that your CD-ROM and BIOS both support booting.
40     Included on the CD-ROM is Linux support for IDE (and PCI IDE)
41     (built-in to the kernel) as well as support for all SCSI devices (available as
42     modules). In addition, we provide modules for literally every kind of network
43     card that Linux supports, as well as tools to allow you to configure your
44     network and establish outbound <c>ssh</c> connections and download files.
45     </p>
46 zhen 1.16 <p>To install from the build CD, you will need to have a 486+ processor and
47 zhen 1.6 ideally at least 64 Megabytes of RAM. (Gentoo linux has been successfully
48     built with 64MB of RAM + 64MB of swap space, but the build process is awfully
49     slow under those conditions.) To begin the install process, first grab the
50     livecd ISO images from
51     <uri>http://www.ibiblio.org/gentoo/releases/1.4_rc1/</uri>. The three stages make our life
52     easy with Gentoo. The stage1 is for building the entire system from scratch. Stage2 is for building
53     some of the system from scratch, and stage3 saves a lot of time because it is already
54     optimized for you specific system. At the moment only the stage1 tarball is
55     stored on the livecd, but you will be able to download a stage2 or
56     stage3 tarball optimized for your system after booting the livecd.
57     </p>
58 zhen 1.16 <info>If for some reason your install gets interrupted at some point, you can reboot
59 zhen 1.13 and restart. For example, if you have partitioned, installed the stageX tarball, and
60     are ready to chroot, you can restart the install if necessary. Just re-boot with the
61     LiveCD, then mount your drives/partitions to <path>/mnt</path> as normal. Basically, you can do
62     this at about any point during the install, just not before partitioning for obvious reasons.
63     </info>
64 zhen 1.18 <warn>If you encounter a problem with any part of the install and wish
65 zhen 1.17 to report it as a bug, report it to <uri>bugs.gentoo.org</uri>. If the bug needs to be
66     moved upstream to the package maintainers (ie KDE) the <e>developers</e> will take care
67     of that.
68     </warn>
69 zhen 1.16 <p>Now, let's quickly review the install process. We'll create partitions,
70 zhen 1.6 create our filesystems, and extract either a stage1, stage2 or stage3 tarball.
71     If we are using a stage1 or stage2 tarball, we will take the appropriate steps
72     to get our systems to stage3. Once our systems are at stage3, we can configure
73     them (tweaking config files, installing a bootloader, etc) and boot them and
74     have a fully-functional Gentoo Linux system. Depending on what stage of the build
75     process you're starting from, here's what's required for installation:
76     </p>
77 zhen 1.16 <table>
78     <tr>
79     <th>stage tarball</th>
80     <th>requirements for installation</th>
81     </tr>
82     <tr>
83     <ti>1</ti>
84     <ti>partition/filesystem setup, emerge sync, bootstrap, emerge system, emerge linux sources, final configuration</ti>
85     </tr>
86     <tr>
87     <ti>2</ti>
88     <ti>partition/filesystem setup, emerge sync, emerge system, emerge linux sources, final configuration</ti>
89     </tr>
90     <tr>
91     <ti>3</ti>
92     <ti>partition/filesystem setup, emerge sync, final configuration</ti>
93     </tr>
94     </table>
95     </body>
96     </section>
97     </chapter>
98     <chapter>
99     <title>Booting</title>
100     <section>
101     <body>
102     <p>Start by booting the livecd. You'll be
103 zhen 1.6 greeted with a lot of text output
104     followed by the normal Gentoo Linux boot sequence.
105 zhen 1.16 Login as &quot;root&quot; (just hit &lt;enter&gt; for the password),
106 zhen 1.6 and then use the <c>passwd</c> command to change the root
107     password. (This root password is only for this installation session.
108     The reason for changing the password is that you will have to connect
109     to the net to complete the installation. Connecting to the internet with
110     the default root password is a <i>really</i> bad idea!)
111 zhen 1.16 You should have a root (&quot;<c>#</c>&quot;) prompt on the current
112 zhen 1.6 console, and can also open new consoles by typing alt-f2, alt-f3, etc and then
113     hitting enter.
114     </p>
115 zhen 1.16 <p>Next, you will be greeted with instructions for setting up your network,
116 zhen 1.6 and optional PCI autodetection. The PCI autodetection process will automatically
117     load the appropriate kernel modules for many popular PCI SCSI and ethernet
118 zhen 1.16 devices. After this, you should have a root (&quot;<c>#</c>&quot;) prompt on the current
119 zhen 1.6 console, and can also open new consoles by typing Alt-F2, Alt-F3, etc and then
120     hitting enter.
121     </p>
122 zhen 1.16 </body>
123     </section>
124     </chapter>
125     <chapter>
126     <title>Load Kernel Modules</title>
127     <section>
128     <body>
129     <p>Hopefully you need only type <c>pci-setup</c> at the root prompt to
130 zhen 1.6 autodetect the hardware on your system and to load the appropriate
131     kernel modules.
132     </p>
133 zhen 1.16 <p>If the PCI autodetection missed some of your hardware, you
134 zhen 1.6 will have to load the appropriate modules manually.
135     To view a list of all available network card modules, type <c>ls
136     /lib/modules/*/kernel/drivers/net/*</c>. To load a particular module,
137     type:
138     </p>
139 zhen 1.16 <pre caption="PCI Modules Configuration">
140 drobbins 1.1 # <c>modprobe pcnet32</c>
141 zhen 1.6 <comment>(replace pcnet32 with your NIC module)</comment>
142     </pre>
143 zhen 1.16 <p>Now, if you want to be able to access any SCSI hardware that wasn't detected
144 zhen 1.6 during the PCI autodetection process, you'll need to load the appropriate
145     modules from /lib/modules, again using <c>modprobe</c>:
146     </p>
147 zhen 1.16 <pre caption="Loading SCSI Modules">
148 drobbins 1.1 # <c>modprobe aic7xxx</c>
149     # <c>modprobe sd_mod</c>
150 zhen 1.6 </pre>
151 zhen 1.16 <p><c>aic7xxx</c> supports your SCSI controller and <c>sd_mod</c> supports SCSI hard disks.
152 zhen 1.6 <note>
153     Support for a SCSI CD-ROMs in build-in in the kernel.
154 zhen 1.16 </note></p>
155     <p>If you are using hardware RAID, you need to load the
156 zhen 1.6 ATA-RAID modules for your RAID controller.
157     </p>
158 zhen 1.16 <pre caption="Loading RAID Modules">
159 drobbins 1.1 # <c>insmod ataraid</c>
160     # <c>insmod pdcraid</c>
161     <comment>(Promise Raid Controller)</comment>
162     # <c>insmod hptraid</c>
163     <comment>(Highpoint Raid Controller)</comment>
164 zhen 1.6 </pre>
165 zhen 1.16 <p>The Gentoo LiveCD should have enabled DMA on your disks, but if it did not,
166 zhen 1.6 <c>hdparm</c> can be used to set DMA on your drives. </p>
167 zhen 1.16 <pre caption="Setting DMA"><comment>Replace hdX with your disk device. </comment>
168     # <c>hdparm -d 1 /dev/hdX </c><comment>Enables DMA </comment>
169     # <c>hdparm -X66 /dev/hdX </c><comment>Enables Ultra-DMA </comment></pre>
170     </body>
171     </section>
172     </chapter>
173     <chapter>
174     <title>Loading PCMCIA Kernel Modules</title>
175     <section>
176     <body>
177     <p>If you have a PCMCIA network card, you will need to do some additional
178 zhen 1.6 trickery.
179     </p>
180 zhen 1.16 <warn>To avoid problems with <c>cardmgr</c>, you <e>must</e> run it <e>before</e> you enter the chroot
181 zhen 1.6 portion of the install. </warn>
182 zhen 1.16 <pre caption="Loading PCMCIA Modules">
183 drobbins 1.1 # <i>insmod pcmcia_core</i>
184     # <i>insmod i82365</i>
185     # <i>insmod ds</i>
186     # <i>cardmgr -f</i>
187 zhen 1.6 </pre>
188 zhen 1.16 <p>As cardmgr detects which hardware is present, your speaker should emit a
189 zhen 1.6 few reassuring beeps, and your PCMCIA network card should hum to life. You can
190     of course insert the PCMCIA card after loading cardmgr too, if that's
191     preferable. (Technically, you need not run
192     <i>cardmgr</i> if you know exactly which module your PCMCIA card requires.
193     But if you don't, loading all PCMCIA modules and see which sticks won't work,
194     as all PCMCIA modules load obligingly and hang around for a PCMCIA card to
195     drop by. <i>cardmgr</i> will also unload the module(s) for any card when you
196     remove it). </p>
197 zhen 1.16 </body>
198     </section>
199     </chapter>
200     <chapter>
201     <title>Configuring Networking</title>
202     <section>
203     <title> PPPoE configuration</title>
204     <body>
205     <p>Assuming you need PPPoE to connect to the internet, the livecd (any version) has
206 zhen 1.6 made things easy for you by including <i>rp-pppoe</i>. Use the provided <i>adsl-setup </i>
207     script to configure your connection. You will be prompted for the ethernet
208     device that is connected to your adsl modem, your username and password,
209     the IPs of your DNS servers, and if you need a basic firewall or not. </p>
210 zhen 1.16 <pre caption="Configuring PPPoE">
211 zhen 1.6 # <c> adsl-setup </c>
212     # <c> adsl-start </c>
213     </pre>
214 zhen 1.16 <p>If something goes wrong, double-check that you correctly typed
215 zhen 1.6 your username and password by looking at <path>/etc/ppp/pap-secrets</path> or
216     <path>/etc/ppp/chap-secrets</path>, and make sure you are using the right ethernet device. </p>
217 zhen 1.16 </body>
218     </section>
219     <section>
220     <title> Automatic Network Configuration </title>
221     <body>
222     <p>The Gentoo Linux install lets you configure a working network, allowing you to use
223 zhen 1.6 <c>ssh</c>, <c>scp</c> or <c>wget</c> as needed before even beginning the installation process.
224     Even if you don't need to do these things now, you should go ahead and set up networking now.
225     Once networking is up, Portage will be able to use your configured network once you are inside
226     the chroot environment (required for installing Gentoo Linux).
227     The simplest way to set up networking is to run our new <c>net-setup</c>
228     script. </p>
229 zhen 1.16 <pre caption="Net-Setup Script">
230 drobbins 1.1 # <c>net-setup eth0</c>
231 zhen 1.6 </pre>
232 zhen 1.16 <p>Of course, if you prefer, you may still set up networking manually. </p>
233     </body>
234     </section>
235     <section>
236     <title>Manual DHCP Configuration</title>
237     <body>
238     <p>Network configuration is simple with DHCP; If your ISP is not using
239     DHCP, skip down to the static configuration section below. </p>
240     <pre caption="Network configuration with DHCP">
241 drobbins 1.1 # <c>dhcpcd eth0</c>
242 zhen 1.6 </pre>
243 zhen 1.16 <note>Some ISPs require you to provide a hostname. To do that,
244 zhen 1.6 add a <c>-h myhostname</c> flag to the dhcpcd command line above.
245     </note>
246 zhen 1.16 <p>If you receive <i>dhcpConfig</i> warnings, don't panic; the errors
247 zhen 1.6 are most likely cosmetic. Skip down to Network testing below.</p>
248 zhen 1.16 </body>
249     </section>
250     <section>
251     <title>Manual Static Configuration</title>
252     <body>
253     <p>We need to setup just enough networking so that we can download
254 zhen 1.6 sources for the system build, as well as the required localhost interface.
255     Type in the following commands, replacing
256     $IFACE with your network interface (typically <c>eth0</c>), $IPNUM
257     with your IP address, $BCAST with your broadcast address, and $NMASK
258     with your network mask. For the <c>route</c> command, replace
259     $GTWAY with your default gateway.
260     </p>
261 zhen 1.16 <pre caption="Static IP Network Configuration">
262 drobbins 1.1 # <c>ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK</c>
263     # <c>/sbin/route add -net default gw $GTWAY netmask metric 1</c>
264 zhen 1.6 </pre>
265 zhen 1.16 <p>Now it's time to create the <path>/etc/resolv.conf</path>
266 zhen 1.6 file so that name resolution (finding Web/FTP sites by name, rather than just by IP address) will work.</p>
267 zhen 1.16 <p>Here's a template to follow for creating your /etc/resolv.conf file: </p>
268     <pre caption="/etc/resolv.conf template">
269 drobbins 1.1 domain mydomain.com
270     nameserver
271     nameserver
272 zhen 1.6 </pre>
273 zhen 1.16 <p>Replace <c></c> and <c></c> with the IP addresses of your
274 zhen 1.6 primary and secondary DNS servers respectively.</p>
275 zhen 1.16 </body>
276     </section>
277     <section>
278     <title>Proxy Configuration</title>
279     <body>
280     <p>If you are behind a proxy, it is necessary to configure your proxy before
281 zhen 1.6 you continue. We will export some variables to set up the proxy accordingly.
282     </p>
283 zhen 1.16 <pre caption="Setting a Proxy">
284     # <c>export http_proxy=&quot;machine.company.com:1234&quot; </c>
285     # <c>export ftp_proxy=&quot;$http_proxy&quot; </c>
286     # <c>export RSYNC_PROXY=&quot;$http_proxy&quot; </c>
287 zhen 1.6 </pre>
288 zhen 1.16 </body>
289     </section>
290     <section>
291     <title>Network Testing</title>
292     <body>
293     <p>Now that your network has been configured, the <c>/sbin/ifconfig -a</c> command should show
294 zhen 1.6 that your network card is working (look for <e>UP</e> and <e>RUNNING</e> in the output). </p>
295 zhen 1.16 <pre caption="/sbin/ifconfig for a working network card">
296 drobbins 1.1 eth0 Link encap:Ethernet HWaddr 00:50:BA:8F:61:7A
297     inet addr: Bcast: Mask:
298     inet6 addr: fe80::50:ba8f:617a/10 Scope:Link
300     RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0
301     TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0
302     collisions:1984 txqueuelen:100
303     RX bytes:485691215 (463.1 Mb) TX bytes:123951388 (118.2 Mb)
304     Interrupt:11
305 zhen 1.6 </pre>
306 zhen 1.16 <p>You may want to also try pinging your ISP's DNS server (found in <path>/etc/resolv.conf</path>),
307 zhen 1.14 and a website of choice, just to make sure that your packets are reaching the net, DNS name
308     resolution is working correctly, etc.
309 zhen 1.6 </p>
310 zhen 1.16 <pre caption="Further Network Testing">
311 zhen 1.15 # <c>ping www.some_website.com </c>
312 zhen 1.6 </pre>
313 zhen 1.16 </body>
314     </section>
315     <section>
316     <title>Networking is go!</title>
317     <body>
318     <p>Networking should now be configured and useable. You should be able to use the included
319 zhen 1.6 <c>ssh</c>, <c>scp</c> and <c>wget</c> commands to connect to other machines on your LAN or the Internet.</p>
320 zhen 1.16 </body>
321     </section>
322     </chapter>
323     <chapter>
324     <title>Partition Configuration</title>
325     <section>
326     <body>
327     <p>Now that the kernel can see the network card and disk controllers, it's time
328 zhen 1.6 to set up disk partitions for Gentoo Linux.
329     </p>
330 zhen 1.16 <p>Here's a quick overview of the standard Gentoo Linux partition layout.
331 zhen 1.6 We're going to create at least three partitions: a swap partition, a root
332     partition (to hold the bulk of Gentoo Linux), and a special boot partition.
333     The boot partition is designed to hold the GRUB or LILO boot loader information as well as
334     your Linux kernel(s). The boot partition gives us a safe place to store
335     everything related to booting Linux. During normal day-to-day Gentoo Linux use,
336     your boot partition should remain <e>unmounted</e>. This prevents your kernel
337     from being made unavailable to GRUB (due to filesystem corruption) in the event
338     of a system crash, preventing the chicken-and-egg problem where GRUB can't read
339     your kernel (since your filesystem isn't consistent) but you can't bring your
340     filesystem back to a consistent state (since you can't boot!)
341     </p>
342 zhen 1.16 <p>Now, on to filesystem types. Right now, you have four filesystem options:
343 zhen 1.6 XFS, ext2, ext3 (journaling) and ReiserFS. ext2 is the tried and true Linux
344     filesystem but doesn't have metadata journaling. ext3 is the new version of
345     ext2 with both metadata journaling and ordered data writes, effectively
346     providing data journaling as well. ReiserFS is a B*-tree based filesystem
347     that has very good small file performance, and greatly outperforms both ext2 and
348     ext3 when dealing with small files (files less than 4k), often by a factor of
349     10x-15x. ReiserFS also scales extremely well and has metadata journaling.
350     As of kernel 2.4.18+, ReiserFS is finally rock-solid and highly recommended.
351     XFS is a filesystem with metadata journaling that
352     is fully supported under Gentoo Linux's <path>xfs-sources</path> kernel, but be warned that it
353     is highly unstable at this time.
354     </p>
355 zhen 1.16 <p>If you're looking for the most standard filesystem, use ext2. If you're looking
356 zhen 1.6 for the most rugged journalled filesystem, use ext3. If you're looking for a
357     high-performance filesystem with journaling support, use ReiserFS; both ext3 and ReiserFS are
358     mature and refined. Please be careful with XFS; this filesystem has a tendency to fry lots of data
359     if the system crashes or you lose power. Originally, it seemed like a promising filesystem but it
360     now appears that this tendency to lose data is a major achilles' heel.
361     Here are our basic recommended filesystem
362     sizes and types:
363     </p>
364 zhen 1.16 <table>
365     <tr>
366     <th>Partition</th>
367     <th>Size</th>
368     <th>Type</th>
369     <th>example device</th>
370     </tr>
371     <tr>
372     <ti>boot partition, containing kernel(s) and boot information</ti>
373     <ti>100 Megabytes</ti>
374     <ti>ext2/3 highly recommended (easiest); if ReiserFS then mount with <c>-o notail</c></ti>
375     <ti>/dev/hda1</ti>
376     </tr>
377     <tr>
378     <ti>swap partition (no longer a 128 Megabyte limit)</ti>
379     <ti>&gt;=2*Amount of RAM in this system is recommended but no longer (as of kernel 2.4.10) required</ti>
380     <ti>Linux swap</ti>
381     <ti>/dev/hda2</ti>
382     </tr>
383     <tr>
384     <ti>root partition, containing main filesystem (/usr, /home, etc)</ti>
385     <ti>&gt;=1.5 Gigabytes</ti>
386     <ti>ReiserFS, ext3 recommended; ext2 ok</ti>
387     <ti>/dev/hda3</ti>
388     </tr>
389     </table>
390     <p>Before creating your partitions, it is a <e>very</e> good idea to initialize the
391 zhen 1.6 beginning of your HD using <c>dd</c>. Doing this will ensure that you have no issues with
392     mounting previously <i>fat32</i> partitions, like <path>/boot</path>
393     for example. To do this you would do:
394     </p>
395 zhen 1.16 <pre caption="Initializing first 1024 Sectors of HD">
396 drobbins 1.1 # <c>dd if=/dev/zero of=/dev/hdaBOOT bs=1024 count=1024 </c>
397     <comment>BOOT is the partition that holds your <path>/boot</path>.</comment>
398 zhen 1.6 </pre>
399 zhen 1.16 <p>At this point, create your partitions using fdisk. Note that your partitions
400 zhen 1.6 should be of type 82 if swap and 83 for regular filesystems (whether ReiserFS <e>or</e> ext2/3). </p>
401 zhen 1.16 <note><i>cfdisk</i> is included on the install CD, and it is *considerably* easier to use than
402 zhware 1.9 <i>fdisk</i>. Just type <c>cfdisk</c> to run it. By default cfdisk work with <b>/dev/hda</b>. If /dev/hda is not hard disk you want to partition, give the right value to cfdisk as a parameter. For example: <c>cfdisk /dev/hde</c></note>
403 zhen 1.16 <note>Changes to the partitions don't reflect on-the-fly, so please reboot after using fdisk or cfdisk.</note>
404     <note>If you are using RAID your partitions will be a little
405 zhen 1.6 different.
406     You will have the partitions like this:
407     <path>/dev/ataraid/discX/partY</path>
408     X is the arrays you have made, so if you only have made 1
409     array, then it will
410     be disc0.Y is the partition number as in <path>/dev/hdaY</path>
411     </note>
412 zhen 1.16 <p>Once you've created your partitions, it's time to initialize
413 zhen 1.6 the filesystems that will be used to house our data. Initialize swap as follows:</p>
414 zhen 1.16 <pre caption="Initializing Swap">
415 drobbins 1.1 # <c>mkswap /dev/hda2</c>
416 zhen 1.6 </pre>
417 zhen 1.16 <p>You can use the <c>mke2fs</c> command to create ext2 filesystems.</p>
418     <pre caption="Creating an ext2 Filesystem">
419 drobbins 1.1 # <i>mke2fs /dev/hda1</i>
420 zhen 1.6 </pre>
421 zhen 1.16 <p>To create an XFS filesystem, use the <c>mkfs.xfs</c> command.</p>
422     <pre caption="Creating a XFS Filesystem">
423 drobbins 1.1 # <c>mkfs.xfs /dev/hda3</c>
424 zhen 1.6 </pre>
425 zhen 1.16 <note>
426 zhen 1.6 You may want to add a couple of additional flags to the <c>mkfs.xfs</c> command: <c>-d agcount=3 -l size=32m</c>.
427     The <c>-d agcount=3</c> command will lower
428     the number of allocation groups. XFS will insist on using at least 1 allocation group per 4 GB of your partition,
429     so, for example, if you hava a 20 GB partition you will need a minimum agcount of 5.
430     The <c>-l size=32m</c> command increases the journal size to 32 Mb, increasing performance.
431     </note>
432 zhen 1.16 <warn>
433 zhen 1.6 If you are installing an XFS partition over a previous ReiserFS partition,
434     later attempts to mount may fail without an explicit <c>mount -t xfs</c>.
435     The solution is to zero out the partition before creating the XFS filesystem:
436     <c>dd if=/dev/zero of=/dev/hd<comment>x</comment> bs=1k</c>.
437     </warn>
438 zhen 1.16 <p>If you'd like to use ext3, you can create ext3 filesystems using <c>mke2fs -j</c>.</p>
439     <pre caption="Creating an ext3 Filesystem">
440 drobbins 1.1 # <c>mke2fs -j /dev/hda3</c>
441 zhen 1.6 </pre>
442 zhen 1.16 <p>To create ReiserFS filesystems, use the <c>mkreiserfs</c> command.</p>
443     <pre caption="Creating a ReiserFS Filesystem">
444 drobbins 1.1 # <c>mkreiserfs /dev/hda3</c>
445 zhen 1.6 </pre>
446 zhen 1.16 <note>You can find out more about using ext3 under Linux 2.4 at
447 zhen 1.6 <uri>http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html</uri>.
448     </note>
449 zhen 1.16 </body>
450     </section>
451     </chapter>
452     <chapter>
453     <title>Mount Partitions</title>
454     <section>
455     <body>
456     <p>Now, we'll activate our new swap, since we may need the additional virtual memory that
457 zhen 1.6 provides later:
458     </p>
459 zhen 1.16 <pre caption="Activating Swap">
460 drobbins 1.1 # <c>swapon /dev/hda2</c>
461 zhen 1.6 </pre>
462 zhen 1.16 <p>Next, we'll create the <path>/mnt/gentoo</path> and <path>/mnt/gentoo/boot</path> mountpoints,
463 zhen 1.6 and we'll mount our filesystems to these mountpoints. </p>
464 zhen 1.16 <pre caption="Creating Mount Points">
465 drobbins 1.1 # <c>mkdir /mnt/gentoo</c>
466     # <c>mount /dev/hda3 /mnt/gentoo</c>
467     # <c>mkdir /mnt/gentoo/boot</c>
468     # <c>mount /dev/hda1 /mnt/gentoo/boot</c>
469 zhen 1.6 </pre>
470 zhen 1.16 <p>
471 zhen 1.6 If you are setting up Gentoo
472     Linux with a separate <path>/usr</path> or <path>/var</path>, these would get mounted to
473     <path>/mnt/gentoo/usr</path> and <path>/mnt/gentoo/var</path>, respectively.
474     </p>
475 zhen 1.16 <impo>If your <e>boot</e> partition (the one holding the kernel) is ReiserFS, be sure to mount it
476 zhen 1.6 with the <c>-o notail</c> option so GRUB gets properly installed. Make sure
477     that <c>notail</c> ends up in your new <path>/etc/fstab</path> boot partition entry, too.
478     We'll get to that in a bit.
479     </impo>
480 zhen 1.16 <impo>If you are having problems mounting your boot partition with ext2, try using
481 zhen 1.6 <c>mount /dev/hXX /mnt/gentoo/boot -t ext2 </c> </impo>
482 zhen 1.16 </body>
483     </section>
484     </chapter>
485     <chapter>
486     <title>Obtaining the Desired 'stage-x' Tarball</title>
487     <section>
488     <body>
489     <p>If you want to start from a stage1 tarball, then you're already set
490 zhen 1.6 to go; you can find the stage1 tarball in <path>/cdroot/nocompress</path>.
491     On the other hand, if you would prefer to start from a stage2 or stage3
492     tarball that has been optimized for your architecture you can download it
493     (into <path>/mnt/gentoo</path> would be the simplest)
494 zhen 1.14 from one of the Gentoo mirror sites. </p>
495 zhen 1.16 <pre caption="Downloading Required Stages">
496 drobbins 1.1 # <c>cd /mnt/gentoo</c>
497 zhen 1.14 <comment>Use lynx to get the URL for your tarball</comment>
498     # <c>lynx http://www.ibiblio.org/pub/Linux/distributions/gentoo/releases/1.4_rc1/x86/</c>
499     # <c>wget <comment>insert required stage tarball here.</comment></c>
500 zhen 1.6 </pre>
501 zhen 1.16 </body>
502     </section>
503     </chapter>
504     <chapter>
505     <title>Unpacking the Stage Tarballs</title>
506     <section>
507     <body>
508     <p>Now it's time to extract the compressed stage tarball of your choice to <path>/mnt/gentoo</path>.
509 zhen 1.6 Then, we'll <c>chroot</c> over to the new Gentoo Linux build installation.
510     </p>
511 zhen 1.16 <impo>Be sure to use the <c>p</c> option with <c>tar</c>. Forgetting to do this will
512 zhen 1.6 cause certain files to contain incorrect permissions.</impo>
513 zhen 1.16 <p>If you are using the &quot;from scratch, build everything&quot; install method,
514 zhen 1.6 you will want to use the <path>stage1-ix86-1.4_beta.tbz2</path> image.
515     If you're using one of our bigger CDs, you'll also have a choice of a stage2 and stage3 image.
516     These images allow you to save time at the expense of configurability (we've already chosen
517 zhen 1.12 compiler optimizations and default USE variables for you.)
518 zhen 1.6 </p>
519 zhen 1.16 <pre caption="Unpacking the Stages">
520 drobbins 1.1 # <c>cd /mnt/gentoo</c>
521     # <c>tar -xvjpf /path/to/stage?-*.tbz2</c>
522     # <c>mount -o bind /proc /mnt/gentoo/proc</c>
523     # <c>cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</c>
524 zhen 1.6 </pre>
525 zhen 1.16 <pre caption="Entering the chroot Environment">
526 drobbins 1.1 # <c>chroot /mnt/gentoo /bin/bash</c>
527     # <c>env-update</c>
528     Regenerating /etc/ld.so.cache...
529     # <c>source /etc/profile</c>
530 zhen 1.6 </pre>
531 zhen 1.16 <p>After you execute these commands, you'll be &quot;inside&quot; your new Gentoo Linux environment.
532 zhen 1.6 </p>
533 zhen 1.16 </body>
534     </section>
535     </chapter>
536     <chapter>
537     <title>Getting the Current Portage Tree using Rsync</title>
538     <section>
539     <body>
540     <p>Now, you'll need to run <c>emerge sync</c>. This will make sure that
541 zhen 1.6 you have the most current copy of the Portage tree. </p>
542 zhen 1.16 <pre caption="Updating Using Rsync">
543 zhen 1.6 # <c>emerge sync</c>
544     </pre>
545 zhen 1.16 <p>The Portage tree will be downloaded and stored in <path>/usr/portage</path>;
546 zhen 1.6 it's about 90Mb in size without tarballs.
547     </p>
548 zhen 1.16 </body>
549     </section>
550     </chapter>
551     <chapter>
552     <title>Setting Gentoo optimizations (make.conf)</title>
553     <section>
554     <body>
555     <p>Now that you have a working copy of the Portage tree, people using stage1 to
556 zhen 1.6 install will need to bootstrap their Gentoo Linux system as follows. First
557     edit the file <path>/etc/make.conf</path>. In this file, you should set your
558     <c>USE</c> flags, which specify optional functionality that you would
559     like to be built into packages; generally, the defaults (an <e>empty</e>
560     or unset <c>USE</c> variable) are fine.
561     More information on <c>USE</c> flags can be found
562     <uri link="http://www.gentoo.org/doc/en/use-howto.xml">here</uri>.
563     </p>
564 zhen 1.16 <p>You also should set appropriate <c>CHOST</c>, <c>CFLAGS</c> and
565 zhen 1.6 <c>CXXFLAGS</c> settings for the kind of system that you are creating
566     (commented examples can be found further down in the file.) Your best friend
567     is <path>man gcc</path> to figure out what additional <c>CFLAGS</c> and
568     <code>CXXFLAGS</code> are available. Search for 'Optimization'.
569     </p>
570 zhen 1.16 <p>If necessary, you can also set proxy information here if you are behind a
571 zhen 1.6 firewall.
572     </p>
573 zhen 1.16 <pre caption="Setting make.conf Options">
574 drobbins 1.1 # <c>nano -w /etc/make.conf</c> <comment>(Adjust these settings)</comment>
575 zhen 1.6 </pre>
576 zhen 1.16 <note>
577 zhen 1.6 People who need to substantially tweak the build process should take a look at
578     the <path>/etc/make.globals</path> file. This file comprises gentoo defaults and
579     should never be touched. If the defaults do not suffice, then new values should
580     be put in <path>/etc/make.conf</path>, as entries in <path>make.conf</path>
581     <comment>override</comment> the entries in <path>make.globals</path>. If you're
582     interested in tweaking USE settings, look in <path>/etc/make.profile/make.defaults</path>.
583 zhen 1.16 If you want to turn off any USE settings found here, add an appropriate <c>USE=&quot;-foo&quot;</c>
584 zhen 1.6 in /etc/make.conf (to turn off the <c>foo</c> USE setting.)
585     </note>
586 zhen 1.16 </body>
587     </section>
588     </chapter>
589     <chapter>
590 zhen 1.18 <title>Starting from Stage1</title>
591 zhen 1.16 <section>
592     <body>
593 zhen 1.18 <p>The stage1 tarball is for ultimate tweakage. If you have picked this tarball,
594     you are most likely looking to have an uber-optimized system. Have fun, because optimization
595     is what Gentoo Linux is all about!
596     </p>
597 zhen 1.16 <p>Now, it's time to start the &quot;bootstrap&quot; process. This process takes about two hours on
598 zhen 1.6 my 1200Mhz AMD Athlon system. During this time, the extracted build image will be prepped
599 zhen 1.18 for compiling the rest of the system. The GNU compiler suite will be built, as well as the GNU C library.
600 zhen 1.6 These are time consuming builds and make up the bulk of the bootstrap process.
601     </p>
602 zhen 1.16 <pre caption="Bootstrapping">
603 drobbins 1.1 # <c>cd /usr/portage</c>
604     # <c>scripts/bootstrap.sh</c>
605 zhen 1.6 </pre>
606 zhen 1.16 <p>The &quot;bootstrap&quot; process will now begin.
607 zhen 1.6 </p>
608 zhen 1.16 <note>
609 zhen 1.6 Portage by default uses <c>/var/tmp</c> during package building, often
610     using several hundred megabytes of temporary storage. If you would like to
611     change where Portage stores these temporary files, set a new PORTAGE_TMPDIR <e>before</e>
612     starting the bootstrap process, as follows:
613     </note>
614 zhen 1.16 <pre caption="Changing Portage's Storage Path">
615     # <c>export PORTAGE_TMPDIR=&quot;/otherdir/tmp&quot;</c>
616 zhen 1.6 </pre>
617 zhen 1.16 <p><c>bootstrap.sh</c> will build <c>binutils</c>, <c>gcc</c>, <c>gettext</c>,
618 zhen 1.6 and <c>glibc</c>, rebuilding <c>binutils</c>, <c>gcc</c>, and <c>gettext</c>
619     after <c>glibc</c>. Needless to say, this process takes a while.
620 zhen 1.18 Have a nice nap. Once this process completes, your system will be equivalent to a &quot;stage2&quot; system.
621 zhen 1.6 </p>
622 zhen 1.16 </body>
623     </section>
624     </chapter>
625     <chapter>
626 zhen 1.18 <title>Starting from Stage2</title>
627 zhen 1.16 <section>
628     <body>
629 zhen 1.18 <p>The stage2 tarball already has the bootstrapping done for you. All that you have
630     to do is install the rest of the system.
631 zhen 1.6 </p>
632 zhen 1.16 <note>
633 zhen 1.6 If you haven't done so, please edit <path>/etc/make.conf</path> to your flavor.
634     </note>
635 zhen 1.16 <pre caption="Installing the Rest of the System">
636     # <c>export CONFIG_PROTECT=&quot;&quot;</c>
637 drobbins 1.1 # <c>emerge -p system</c>
638     <comment>[lists the packages to be installed]</comment>
639     # <c>emerge system</c>
640 zhen 1.6 </pre>
641 zhen 1.16 <note>The <c>export CONFIG_PROTECT=&quot;&quot;</c> line ensures that any new scripts
642 zhen 1.6 installed to <path>/etc</path> will overwrite the old scripts (stored in
643     <path>sys-apps/baselayout</path>), bypassing Portage's new config file
644     management support. Type <c>emerge --help config</c> for more details.</note>
645 zhen 1.16 <p>It's going to take a while
646 zhen 1.6 to finish building the entire base system. Your reward is that it will be
647     thoroughly optimized for your system. The drawback is that you have to find a
648 zhen 1.16 way to keep yourself occupied for some time to come. The author suggests &quot;Star
649 zhen 1.18 Wars - Super Bombad Racing&quot; for the PS2. When this process completes, your system
650     will be the equivalent of a stage3 system.
651     </p>
652     </body>
653     </section>
654     </chapter>
655     <chapter>
656     <title>Starting from Stage3</title>
657     <section>
658     <body>
659     <p>The stage3 tarball is already configured for your system. There is not much to do for this stage,
660     but it is a very good idea to update your system to the newest available packages. </p>
661     <note>If you have not already edited <path>/etc/make.conf</path> to fit your specifications,
662     now would be a good time to do so. </note>
663     <pre caption="Getting up-to-date">
664     # <c>emerge sync</c>
665     # <c>emerge -up world</c>
666     <comment>lists [<i>packages</i>] to be installed</comment>
667     # <c>emerge -u world</c>
668     </pre>
669     </body>
670     </section>
671     </chapter>
672     <chapter>
673     <title>Final Steps: Timezone</title>
674     <section>
675     <body>
676     <p>At this point, you should have system that's ready for final configuration.
677     We'll start the configuration process by setting the timezone. By setting the timezone before building
678     the kernel we ensure that users get reasonable <c>uname -a</c> output.
679     </p>
680     <p>Look for your timezone (or GMT if you using Greenwich Mean Time) in
681     <path>/usr/share/zoneinfo</path>. Then, make a symbolic link by typing:
682     </p>
683     <pre caption="Creating a symbolic link for timezome">
684     # <c>ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime</c>
685     </pre>
686     <p>You might also want to check <path>/etc/rc.conf</path> to make sure your timezone settings
687     are correct.
688 zhen 1.6 </p>
689 zhen 1.16 </body>
690     </section>
691     </chapter>
692     <chapter>
693     <title>Final steps: kernel and system logger</title>
694     <section>
695     <body>
696     <note>
697 zhen 1.6 If you haven't done so, please edit <path>/etc/make.conf</path> to your flavor.
698     </note>
699 zhen 1.16 <p>You now need to merge Linux source ebuilds. Here are the ones we currently
700 zhen 1.6 offer:
701     </p>
702 zhen 1.16 <table>
703     <tr>
704     <th>ebuild</th>
705     <th>description</th>
706     </tr>
707     <tr>
708     <ti>
709     <path>gentoo-sources</path>
710     </ti>
711     <ti>Our own performance and functionality-enhanced kernel based on -ac.</ti>
712     </tr>
713     <tr>
714     <ti>
715     <path>xfs-sources</path>
716     </ti>
717     <ti>A snapshot of the SGI XFS CVS Linux source tree; this is the kernel to run if you want bleeding edge(cvs) xfs support.</ti>
718     </tr>
719     <tr>
720     <ti>
721     <path>openmosix-sources</path>
722     </ti>
723     <ti>A stock Linux kernel source tree patched with support for the GPL <uri link="http://www.openmosix.com">openMosix</uri> load-balancing/clustering technology</ti>
724     </tr>
725     <tr>
726     <ti>
727     <path>usermode-sources</path>
728     </ti>
729     <ti>A stock Linux kernel source tree patched with support for User-Mode Linux. (&quot;Linux inside Linux&quot; technology)</ti>
730     </tr>
731     <tr>
732     <ti>
733     <path>vanilla-sources</path>
734     </ti>
735     <ti>A stock Linux kernel source tree, just like you'd get from kernel.org</ti>
736     </tr>
737     </table>
738     <warn>Please note that <i>gentoo-sources</i> is heavily patched and may not be stable.
739 zhen 1.6 Using <i>vanilla-sources</i> might be a better idea if you encounter numerous problems. If you are using
740     <i>gentoo-sources</i> beware of <i>grsecurity</i>, especially with <i>X</i>.
741     It is best to disable <i>grsecurity</i>unless you are absolutely sure that you need it.
742     </warn>
743 zhen 1.16 <p>Choose one and then merge as follows:</p>
744     <pre caption="Emerging Kernel Sources">
745 drobbins 1.1 # <c>emerge sys-kernel/gentoo-sources</c>
746 zhen 1.6 </pre>
747 zhen 1.16 <p>Once you have a Linux kernel source tree available, it's time to compile your own custom kernel.
748 zhen 1.6 </p>
749 zhen 1.16 <pre caption="Compiling the Linux Kernel">
750 drobbins 1.1 # <c>cd /usr/src/linux</c>
751     # <c>make menuconfig</c>
752     # <c>make dep &amp;&amp; make clean bzImage modules modules_install</c>
753     # <c>mv /boot/bzImage /boot/bzImage.orig</c>
754     <comment>[if bzImage already exists]</comment>
755     # <c>cp /usr/src/linux/arch/i386/boot/bzImage /boot</c>
756 zhen 1.6 </pre>
757 zhen 1.16 <warn>For your kernel to function properly, there are several options that you will
758 zhen 1.6 need to ensure are in the kernel proper -- that is, they should <i>be enabled and not
759 zhen 1.16 compiled as modules</i>. You will need to enable the <i>&quot;Code maturity
760     level options --&gt; Prompt for development and/or incomplete code/drivers&quot;</i>
761 zhen 1.6 option to see several of these selections.
762 zhen 1.16 Under the &quot;File systems&quot; section, be sure to enable the <i>&quot;Device File System&quot;</i> (note that
763     you <e>don't</e> need to enable the &quot;/dev/pts file system support&quot; option). You'll also
764     need to enable the <i>&quot;Virtual Memory Filesystem&quot;</i>. Be sure to enable &quot;ReiserFS&quot; if you have
765     any ReiserFS partitions; the same goes for &quot;Ext3&quot;. If you're using XFS, enable the
766     &quot;SGI XFS filesystem support&quot;
767 zhen 1.6 option. It's always a good idea to leave ext2
768     enabled whether you are using it or not. Also, most people using IDE hard drives will
769 zhen 1.16 want to enable the &quot;USE DMA by default&quot; option; otherwise, your IDE drives may perform
770     very poorly. Of course, remember to enable &quot;IDE disk&quot; support as well -- otherwise your
771 zhen 1.6 kernel won't be able to see your IDE disks.
772     </warn>
773 zhen 1.16 <p>If you are using hardware RAID you will need to enable a couple more options in the kernel:
774 zhen 1.6 For Highpoint RAID controllers select hpt366 chipset support, support for IDE RAID controllers and Highpoint
775     370 software RAID.For Promise RAID controllers select PROMISE PDC202{46|62|65|67|68|69|70} support,
776     support for IDE RAID
777     controllers and Support Promise software RAID (Fasttrak(tm))
778     </p>
779 zhen 1.16 <p>If you use PPPoE to connect to Internet, you will need the following
780 zhen 1.6 options in the kernel (built-in or as preferably as modules) :
781 zhen 1.16 &quot;PPP (point-to-point protocol) support&quot;, &quot;PPP support for async serial ports&quot;,
782     &quot;PPP support for sync tty ports&quot;. The two compression options won't harm but
783     are not definitely needed, neither does the &quot;PPP over Ethernet&quot; option,
784 zhen 1.6 that might only be used by <i>rp-pppoe</i> when configured to do kernel mode PPPoE.
785     </p>
786 zhen 1.16 <p>If you have an IDE cd burner, then you need to enable SCSI emulation in the
787     kernel. Turn on &quot;ATA/IDE/MFM/RLL support&quot; ---&gt; &quot;IDE, ATA and ATAPI Block
788     devices&quot; ---&gt; &quot;SCSI emulation support&quot; (I usually make it a module), then
789     under &quot;SCSI support&quot; enable &quot;SCSI support&quot;, &quot;SCSI CD-ROM support&quot; and
790     &quot;SCSI generic support&quot; (again, I usually compile them as modules). If you
791     also choose to use modules, then <c>echo -e &quot;ide-scsi\nsg\nsr_mod&quot;
792     &gt;&gt; /etc/modules.autoload</c> to have them automatically added at boot time.
793 zhen 1.6 </p>
794 zhen 1.16 <note>
795 zhen 1.6 For those who prefer it,
796     it is now possible to install Gentoo Linux with a 2.2 kernel.
797     Such stability will come at a price:
798     you will lose many of the nifty features that
799     are new to the 2.4 series kernels (such as XFS and tmpfs
800     filesystems, iptables, and more), although the 2.2 kernel sources can be
801     patched with Reiserfs and devfs support.
802     Gentoo linux bootscripts require either tmpfs or ramdisk support in the kernel, so
803     2.2 kernel users need to make sure that ramdisk support is compiled in (ie, not a module).
804     It is <comment>vital</comment> that a <e>gentoo=notmpfs</e> flag be added to the kernel
805     line in <path>/boot/grub/grub.conf</path> for the 2.2 kernel so that a ramdisk is mounted
806     for the bootscripts instead of tmpfs. If you choose not to use devfs, then
807     <e>gentoo=notmpfs,nodevfs</e> should be used instead.
808     </note>
809 zhen 1.16 <p>Your new custom kernel (and modules) are now installed. Now you need to choose a system
810 zhen 1.6 logger that you would like to install. We offer sysklogd, which is the traditional set
811     of system logging daemons. We also have msyslog and syslog-ng as well as metalog. Power users seem
812     to gravitate away from sysklogd (not very good performance) and towards the
813     newer alternatives.
814     If in doubt, you may want to try metalog, since it seems to be quite popular.
815     To merge your logger of choice, type <e>one</e> of the next four lines:
816     </p>
817 zhen 1.16 <pre caption="Emerging System Logger of Choice">
818 drobbins 1.1 # <c>emerge app-admin/sysklogd</c>
819     # <c>rc-update add sysklogd default</c>
820     <comment>or</comment>
821     # <c>emerge app-admin/syslog-ng</c>
822     # <c>rc-update add syslog-ng default</c>
823     <comment>or</comment>
824     # <c>emerge app-admin/metalog</c>
825     # <c>rc-update add metalog default</c>
826     <comment>or</comment>
827     # <c>emerge app-admin/msyslog</c>
828     # <c>rc-update add msyslog default</c>
829 zhen 1.6 </pre>
830 zhen 1.16 <warn>
831 zhen 1.6 In the case of syslog-ng you need to create
832     <path>/etc/syslog-ng/syslog-ng.conf</path>.
833     See <path>/etc/syslog-ng</path>
834     for a sample configuration file.
835     </warn>
836 zhen 1.16 <impo>
837 zhen 1.6 Metalog flushes output to the disk in blocks, so messages aren't immediately recorded into
838     the system logs. If you are trying to debug a daemon, this performance-enhancing behavior
839     is less than helpful. When your Gentoo Linux system is up and running, you can send
840     metalog a USR1 signal to temporarily turn off this message buffering (meaning that
841     <i>tail -f <path>/var/log/everything/current</path></i> will now work
842     in real time, as expected),
843     and a USR2 signal to turn buffering back on
844     again.
845     </impo>
846 zhen 1.16 <p>Now, you may optionally choose a cron package that you'd like to use.
847 zhen 1.6 Right now, we offer dcron, fcron and vcron. If you don't know which one to choose,
848     you might as well grab vcron. They can be installed as follows:
849     </p>
850 zhen 1.16 <pre caption="Choosing a CRON Daemon">
851 drobbins 1.1 # <c>emerge sys-apps/dcron</c>
852     # <c>crontab /etc/crontab</c>
853     <comment>or</comment>
854     # <c>emerge sys-apps/fcron</c>
855     # <c>crontab /etc/crontab</c>
856     <comment>or</comment>
857     # <c>emerge sys-apps/vcron</c>
858 zhen 1.2 <comment>You do not need to run <c>crontab /etc/crontab</c> if using vcron. </comment>
859 drobbins 1.1 <comment>Don't forget to add your *cron to the proper init level. </comment>
860     # <c>rc-update add *cron default </c>
861 zhen 1.6 </pre>
862 zhen 1.16 <p>For more information how how cron works under Gentoo Linux,
863 zhen 1.6 see <uri link="http://lists.gentoo.org/pipermail/gentoo-announce/2002-April/000151.html">this announcement</uri>.</p>
864 zhen 1.16 <p>For more information on starting programs and daemons at startup, see the
865 zhen 1.6 <uri link="/doc/rc-scripts.html">rc-script guide</uri>.
866     </p>
867 zhen 1.16 </body>
868     </section>
869     </chapter>
870     <chapter>
871     <title>Final steps: Install Additional Packages</title>
872     <section>
873     <body>
874     <p>If you need rp-pppoe to connect to the net, be aware that at this point
875 zhen 1.6 it has not been installed. It would be the good time to do it. </p>
876 zhen 1.16 <pre caption="Installing rp-pppoe">
877 drobbins 1.1 # <c>emerge rp-pppoe</c>
878 zhen 1.6 </pre>
879 zhen 1.16 <note> Please note that the rp-pppoe is built but not configured.
880 zhen 1.6 You will have to do it again using <c>adsl-setup</c> when you boot into your Gentoo system
881     for the first time.
882     </note>
883 zhen 1.16 <p>You may need to install some additional packages in the Portage tree
884 zhen 1.6 if you are using any optional features like XFS, ReiserFS or LVM. If you're
885     using XFS, you should emerge the <c>xfsprogs</c> ebuild:
886     </p>
887 zhen 1.16 <pre caption="Emerging Filesystem Tools">
888 drobbins 1.1 # <c>emerge sys-apps/xfsprogs</c>
889     <comment>If you'd like to use ReiserFS, you should emerge the ReiserFS tools: </comment>
890     # <c> emerge sys-apps/reiserfsprogs</c>
891     <comment>If you're using LVM, you should emerge the <c>lvm-user</c> package: </comment>
892     # <c>emerge --usepkg sys-apps/lvm-user</c>
893 zhen 1.6 </pre>
894 zhen 1.16 <p>If you're a laptop user and wish to use your PCMCIA slots on your first
895 zhen 1.6 real reboot, you'll want to make sure you install the <i>pcmcia-cs</i> package.
896     </p>
897 zhen 1.16 <pre caption="Emerging PCMCIA-cs">
898 drobbins 1.1 # <c>emerge sys-apps/pcmcia-cs</c>
899 zhen 1.6 </pre>
900 zhen 1.16 <warn>You will have to re-emerge <i>pcmcia-cs</i> after installation to get PCMCIA
901 zhen 1.10 to work.
902     </warn>
903 zhen 1.16 </body>
904     </section>
905     </chapter>
906     <chapter>
907     <title>Final steps: /etc/fstab</title>
908     <section>
909     <body>
910     <p>Your Gentoo Linux system is almost ready for use. All we need to do now is configure
911 zhen 1.6 a few important system files and install the GRUB boot loader.
912     The first file we need to
913     configure is <path>/etc/fstab</path>. Remember that you should use
914     the <c>notail</c> option for your boot partition if you chose to create a ReiserFS filesystem on it.
915     Remember to specify <c>ext2</c>, <c>ext3</c> or <c>reiserfs</c> filesystem types as appropriate.
916     </p>
917 zhen 1.16 <p>Use something like the <path>/etc/fstab</path> listed below, but of course be sure to replace &quot;BOOT&quot;,
918     &quot;ROOT&quot; and &quot;SWAP&quot; with the actual block devices you are using (such as <c>hda1</c>, etc.)</p>
919     <pre caption="Editing fstab"><comment>
920 drobbins 1.1 # /etc/fstab: static file system information.
921     #
922     # noatime turns of atimes for increased performance (atimes normally aren't
923     # needed; notail increases performance of ReiserFS (at the expense of storage
924     # efficiency). It's safe to drop the noatime options if you want and to
925     # switch between notail and tail freely.
927     # &lt;fs&gt; &lt;mountpoint&gt; &lt;type&gt; &lt;opts&gt; &lt;dump/pass&gt;
929     # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
930     </comment>
931     /dev/BOOT /boot ext2 noauto,noatime 1 2
932     /dev/ROOT / ext3 noatime 0 1
933     /dev/SWAP none swap sw 0 0
934     /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
935     proc /proc proc defaults 0 0
936 zhen 1.6 </pre>
937 zhen 1.16 <warn>Please notice that <i>/boot</i> is NOT mounted at boottime.
938 zhen 1.6 This is to protect the data in <i>/boot</i> from
939     corruption. If you need to access <i>/boot</i>, please mount it!
940     </warn>
941 zhen 1.16 </body>
942     </section>
943     </chapter>
944     <chapter>
945     <title>Final steps: Root Password</title>
946     <section>
947     <body>
948     <p>Before you forget, set the root password by typing: </p>
949     <pre caption="Setting the root Password">
950     # <c>passwd</c>
951 zhen 1.6 </pre>
952 zhen 1.16 </body>
953     </section>
954     </chapter>
955     <chapter>
956     <title>Final steps: /etc/hostname</title>
957     <section>
958     <body>
959     <p>Edit this file so that it contains your fully-qualified domain name on a single line,
960 zhen 1.6 i.e. <c>mymachine.mydomain.com</c>.
961     </p>
962 zhen 1.16 <pre caption="Configuring Hostname">
963     # <c>echo mymachine.mydomain.com &gt; /etc/hostname</c>
964 zhen 1.6 </pre>
965 zhen 1.16 </body>
966     </section>
967     </chapter>
968     <chapter>
969     <title>Final steps: /etc/hosts</title>
970     <section>
971     <body>
972     <p>This file contains a list of ip addresses and their associated hostnames.
973 zhen 1.6 It's used by the system to resolve the IP addresses
974     of any hostnames that may not be in your nameservers. Here's a template for this file:
975     </p>
976 zhen 1.16 <pre caption="Hosts Template">
977 drobbins 1.1 localhost
978     <comment># the next line contains your IP for your local LAN, and your associated machine name</comment>
979 mymachine.mydomain.com mymachine
980 zhen 1.6 </pre>
981 zhen 1.16 <note>If you are on a DHCP network, it might be helpful to set <i>localhost</i> to your machine's
982 zhen 1.6 actual hostname. This will help GNOME and many other programs in name resolution.
983     </note>
984 zhen 1.16 </body>
985     </section>
986     </chapter>
987     <chapter>
988     <title>Final Network Configuration</title>
989     <section>
990     <body>
991     <p>Add the names of any modules that are necessary for the proper functioning of your system to
992 zhen 1.6 <path>/etc/modules.autoload</path> file (you can also add any options you
993     need to the same line.) When Gentoo Linux boots, these modules will be automatically
994     loaded. Of particular importance is your ethernet card module, if you happened to compile
995     it as a module:
996     </p>
997 zhen 1.16 <pre caption="/etc/modules.autoload"><comment>This is assuming that you are using a 3com card. Check <path>/lib/modules/`uname -r`/kernel/drivers/net</path> for your
998 drobbins 1.1 card. </comment>
999     3c59x
1000 zhen 1.6 </pre>
1001 zhen 1.16 <p>Edit the <path>/etc/conf.d/net</path> script to get your network configured for your
1002 zhen 1.6 first boot: </p>
1003 zhen 1.16 <pre caption="Boottime Network Configuration">
1004 drobbins 1.1 # <c>nano -w /etc/conf.d/net</c>
1005     # <c>rc-update add net.eth0 default</c>
1006 zhen 1.6 </pre>
1007 zhen 1.16 <p>If you have multiple network cards you need to create additional <path>net.eth<comment>x</comment></path>
1008 zhen 1.6 scripts for each one (<comment>x</comment> = 1, 2, ...): </p>
1009 zhen 1.16 <pre caption="Multiple Network Interfaces">
1010 drobbins 1.1 # <c>cd /etc/init.d</c>
1011     # <c>cp net.eth0 net.eth<comment>x</comment></c>
1012     # <c>rc-update add net.eth<comment>x</comment> default</c>
1013 zhen 1.6 </pre>
1014 zhen 1.16 <p>If you have a PCMCIA card installed, have a quick look into
1015 zhen 1.6 <path>/etc/init.d/pcmcia</path> to verify that things seem all right for your setup,
1016 zhen 1.10 then add this line to the top of <path>/etc/init.d/ethx</path>:
1017 zhen 1.6 </p>
1018 zhen 1.16 <pre caption="PCMCIA depend in /etc/init.d/net.ethx">
1019 drobbins 1.1 depend() {
1020     need pcmcia
1021     }
1022 zhen 1.6 </pre>
1023 zhen 1.16 <p>This makes sure that the PCMCIA drivers are autoloaded whenever your network is loaded.
1024 zhen 1.10 </p>
1025 zhen 1.16 </body>
1026     </section>
1027     </chapter>
1028     <chapter>
1029     <title>Final steps: Configure Basic Settings (including the international keymap setting)</title>
1030     <section>
1031     <body>
1032     <pre caption="Basic Configuration">
1033 drobbins 1.1 # <c>nano -w /etc/rc.conf</c>
1034 zhen 1.6 </pre>
1035 zhen 1.16 <p>Follow the directions in the file to configure the basic settings.
1036 zhen 1.6 All users will want to make sure that <c>CLOCK</c> is set to his/her
1037     liking. International keyboard users will want to set the <c>KEYMAP</c>
1038     variable (browse <path>/usr/share/keymaps</path> to see the various
1039     possibilities).
1040     </p>
1041 zhen 1.16 </body>
1042     </section>
1043     </chapter>
1044     <chapter>
1045     <title>Final steps: Configure GRUB</title>
1046     <section>
1047     <body>
1048     <p>The most critical part of understanding GRUB is getting comfortable with how GRUB
1049 zhen 1.6 refers to hard drives and partitions. Your Linux partition <path>/dev/hda1</path> is called
1050     <path>(hd0,0)</path> under GRUB. Notice the parenthesis around the hd0,0 - they are required.
1051 zhen 1.16 Hard drives count from zero rather than &quot;a&quot;, and partitions start at zero rather than one.
1052 zhen 1.6 Be aware too that with the hd devices, only harddrives are counted, not atapi-ide devices such as
1053     cdrom players, burners, and that the same construct can be used with scsi drives.
1054     (Normally they get higher numbers than ide drives except when the bios is configured
1055     to boot from scsi devices.) Assuming you have a harddrive on /dev/hda, a cdrom player on /dev/hdb,
1056     a burner on /dev/hdc and a second hardrive on /dev/hdd, for example, and no scsi harddrive
1057     <path>/dev/hdd7</path> gets translated to <path>(hd1,6)</path>.
1059     It might sound tricky, and tricky it is indeed, but as we will see, grub
1060     offers a tab completion mechanism that comes handy for those of you having
1061     a lot of harddrives and partitions and who are a little lost in the
1062     grub numbering scheme. Having gotten the feel for that,
1063     it's time to install GRUB.
1064     </p>
1065 zhen 1.16 <p>The easiest way to install GRUB is to simply type <c>grub</c> at your chrooted shell prompt: </p>
1066     <pre caption="Installing GRUB">
1067 drobbins 1.1 # <c>grub</c>
1068 zhen 1.6 </pre>
1069 zhen 1.16 <impo>If you are using hardware RAID this part will not work at
1070 zhen 1.6 this time.
1071     Skip to the section on making your <path>grub.conf</path>. After that we will complete the
1072     grub setup for RAID controllers
1073     </impo>
1074 zhen 1.16 <p>You'll be presented with the <c>grub&gt;</c> grub
1075 zhen 1.6 command-line prompt. Now, you need to type in the
1076     right commands to install the GRUB boot record onto your hard drive. In my example configuration,
1077     I want to install the GRUB boot record on my hard drive's MBR (master boot record), so that
1078     the first thing I see when I turn on the computer is the GRUB prompt. In my case, the commands
1079     I want to type are:
1080     </p>
1081 zhen 1.16 <pre caption="GRUB Commands">
1082 drobbins 1.1 grub&gt; <c>root (hd0,0)</c>
1083     grub&gt; <c>setup (hd0)</c>
1084     grub&gt; <c>quit</c>
1085 zhen 1.6 </pre>
1086 zhen 1.16 <p>Here's how the two commands work. The first <c>root ( )</c> command tells GRUB
1087 zhen 1.6 the location of your boot partition (in our example, <path>/dev/hda1</path> or
1088     <path>(hd0,0)</path> in GRUB terminology. Then, the second <c>setup ( )
1089     </c> command tells GRUB where to install the
1090     boot record - it will be configured to look for its special files at the <c>root
1091     ( )</c> location that you specified. In my case, I want the boot record on the
1092     MBR of the hard drive, so I simply specify <path>/dev/hda</path> (also known as <path>(hd0)</path>).
1093     If I were using another boot loader and wanted to set up GRUB as a secondary boot-loader, I
1094     could install GRUB to the boot record of a particular partition. In that case,
1095     I'd specify a particular partition rather than the entire disk. Once the GRUB
1096     boot record has been successfully installed, you can type <c>quit</c> to quit GRUB.
1098     <note> The tab completion mechanism of grub can be used from within grub,
1099     assuming you wrote <c> root (</c> and that you hit the TAB key, you would
1100     be prompted with a list of the available devices (not only harddrives),
1101     hitting the TAB key having written <c> root (hd</c>, grub would print the
1102     available harddrives and hitting the TAB key after writing <c> root (hd0,</c>
1103     would make grub print the list of partitions on the first harddrive.
1105     Checking the syntax of the grub location with completion should really help
1106     to make the right choice.
1107     </note>
1109     Gentoo Linux is now
1110     installed, but we need to create the <path>/boot/grub/grub.conf</path> file so that
1111     we get a nice GRUB boot menu when the system reboots. Here's how to do it.
1112     </p>
1113 zhen 1.16 <impo>To ensure backwards compatibility with GRUB, make sure to make a link from
1114 zhen 1.6 <i>grub.conf</i> to <i>menu.lst</i>. You can do this by doing
1115     <c>ln -s /boot/grub/grub.conf /boot/grub/menu.lst </c>. </impo>
1116 zhen 1.16 <p>Now, create the grub.conf file (<c>nano -w /boot/grub/grub.conf</c>), and add the following to it:
1117 zhen 1.6 </p>
1118 zhen 1.16 <pre caption="Grub.conf for GRUB">
1119 drobbins 1.1 default 0
1120     timeout 30
1121     splashimage=(hd0,0)/boot/grub/splash.xpm.gz
1123     title=My example Gentoo Linux
1124     root (hd0,0)
1125     kernel /boot/bzImage root=/dev/hda3
1127     <comment> #Below is for setup using hardware RAID</comment>
1128     title=My Gentoo Linux on RAID
1129     root (hd0,0)
1130     kernel /boot/bzImage root=/dev/ataraid/discX/partY
1132     <comment># Below needed only for people who dual-boot</comment>
1133     title=Windows NT Workstation
1134     root (hd0,5)
1135     chainloader +1
1136 zhen 1.6 </pre>
1137 zhen 1.16 <note>
1138 zhen 1.6 (hd0,0) should be written without any spaces inside the parentheses.
1139     </note>
1140 zhen 1.16 <impo>
1141 zhen 1.6 If you set up scsi emulation for an IDE cd burner earlier, then to get it to
1142 zhen 1.16 actually work you need to add an &quot;hdx=ide-scsi&quot; fragment to the kernel
1143     line in grub.conf (where &quot;hdx&quot; should be the device for your cd burner).
1144 zhen 1.6 </impo>
1145 zhen 1.16 <p>After saving this file, Gentoo Linux installation is complete. Selecting the first option will
1146 zhen 1.6 tell GRUB to boot Gentoo Linux without a fuss. The second part of the grub.conf file is optional,
1147     and shows you how to use GRUB to boot a bootable Windows partition.
1148     </p>
1149 zhen 1.16 <note>Above, <path>(hd0,0)</path> should point to your &quot;boot&quot; partition
1150 zhen 1.6 (<path>/dev/hda1</path> in our example config) and <path>/dev/hda3</path> should point to
1151     your root filesystem. <path>(hd0,5)</path> contains the NT boot
1152     loader.
1153 zhware 1.9 </note>
1154 zhen 1.16 <note>
1155 zhware 1.9 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>.
1156 zhen 1.6 </note>
1157 zhen 1.16 <p>If you need to pass any additional options to the kernel, simply
1158 zhen 1.6 add them to the end of the <c>kernel</c> command. We're already passing one option
1159     (<c>root=/dev/hda3</c>), but you can pass others as well. In particular, you can
1160     turn off devfs by default (not recommended unless you know what you're doing) by
1161     adding the <c>gentoo=nodevfs</c> option to the <c>kernel</c> command.
1162     </p>
1163 zhen 1.16 <note>Unlike in earlier versions of Gentoo Linux, you no longer have to add
1164 zhen 1.6 <c>devfs=mount</c> to the end of the <c>kernel</c> line to enable devfs. In rc6
1165     devfs is enabled by default.
1166     </note>
1167 zhen 1.16 </body>
1168     </section>
1169     </chapter>
1170     <chapter>
1171     <title>Final steps: Configure LILO</title>
1172     <section>
1173     <body>
1174     <p>While GRUB may be the new alternative for most people, it is not always the most stable.
1175     LILO, the LInuxLOader, is the tried and true workhorse of Linux bootloaders. If you want stability
1176     and semi-ease of configure, give LILO a try.
1177     </p>
1178     <p>The first step is to emerge LILO:
1179     </p>
1180     <pre caption="Emerging LILO">
1181     # <c>emerge lilo</c>
1182     </pre>
1183     <p>Now it is time to configure LILO. I will give you a small <i>lilo.conf</i> to use, and I will explain
1184     the different parts of the file.
1185     </p>
1186     <pre caption="Example lilo.conf">
1187     boot=/dev/hda
1188     map=/boot/map
1189     install=/boot/boot.b
1190     prompt
1191     timeout=50
1192     message=/boot/message
1193     lba32
1194     default=linux
1196     image=/boot/vmlinuz-2.4.20
1197     label=linux
1198     initrd=/boot/initrd-2.4.20.img
1199     read-only
1200     root=/dev/hda5
1202     #For dual booting windows/other OS
1203     other=/dev/hda1
1204     label=dos
1206     </pre>
1207     <li><i>boot=/dev/hda</i> tells LILO to install itself on the first hard disk on the first IDE controller. </li>
1208     <li><i>map=/boot/map</i> states the map file. In normal use, this should not be modified. </li>
1209     <li><i>install=/boot/boot.b</i> tells LILO to install the specified file as the new boot sector.
1210     In normal use, this should not be altered. If the install line is missing, LILO will
1211     assume a default of /boot/boot.b as the file to be used. </li>
1212     <li>The existence of <i>prompt</i> tells LILO to show you whatever is referenced in the message line.
1213     While it is not recommended that you remove the prompt line, if you do remove it, you can still
1214     get a prompt by holding down the [Shift] key while your machine starts to boot. </li>
1215     <li><i>timeout=50</i> sets the amount of time that LILO will wait for user input before proceeding
1216     with booting the default line entry. This is measured in tenths of a second, with 50 as the default. </li>
1217     <li><i>message=/boot/message</i> refers to the screen that LILO displays to let you select the
1218     operating system or kernel to boot. </li>
1219     <li><i>lba32</i> describes the hard disk geometry to LILO. Another common entry here is linear. You should
1220     not change this line unless you are very aware of what you are doing. Otherwise, you could put
1221     your system in an unbootable state. </li>
1222     <li><i>default=linux</i> refers to the default operating system for LILO to boot from the
1223     options listed below this line. The name linux refers to the label line below in each of the boot options. </li>
1224     <li><i>image=/boot/vmlinuz-2.4.20</i> specifies the linux kernel to boot with this particular boot option. </li>
1225     <li><i>label=linux</i> names the operating system option in the LILO screen. In this case,
1226     it is also the name referred to by the default line. </li>
1227     <li><i>initrd=/boot/initrd-2.4.20.img</i> refers to the initial ram disk image that is used at boot time
1228     to actually initialize and start the devices that makes booting the kernel possible. The initial
1229     ram disk is a collection of machine-specific drivers necessary to operate a SCSI card, hard drive, or any
1230     other device needed to load the kernel. You should never try to share initial ram disks between machines. </li>
1231     <li><i>read-only</i> specifies that the root partition (see the root line below) is read-only and cannot be
1232     altered during the boot process. </li>
1233     <li><i>root=/dev/hda5</i> tells LILO what disk partition to use as the root partition. </li>
1234     <note>Thanks to <uri link="http://www.redhat.com">Redhat.com</uri> for this information.
1235     </note>
1236     <p>After you have edited your <i>lilo.conf</i> file, it is time to run LILO to load the information
1237     into the MBR:
1238     </p>
1239     <pre caption="Running LILO">
1240     # <c>/sbin/lilo</c>
1241     </pre>
1242     <p>LILO is configured, and now your machine is ready to boot into Gentoo Linux!
1243     </p>
1244     </body>
1245     </section>
1246     </chapter>
1247     <chapter>
1248     <title>Final steps: Bootdisks</title>
1249     <section>
1250     <title>GRUB Bootdisks</title>
1251     <body>
1252     <p>It is always a good idea to make a bootdisk the first
1253     time you install any Linux distribution. This is a security
1254     blanket, and generally not a bad thing to do. If you are using hardware RAID, you <e>must</e> make a GRUB boot
1255 zhen 1.6 disk. With hardware RAID
1256     if you try to install grub from your chrooted shell it will fail. So we
1257     will make a GRUB
1258     boot disk, and when you reboot the first time we will install GRUB
1259     to the MBR. Make your
1260     bootdisk like this:
1261     </p>
1262 zhen 1.16 <pre caption="Creating a GRUB Bootdisk">
1263 drobbins 1.1 # <c>mke2fs /dev/fd0</c>
1264     # <c>mount /dev/fd0 /mnt/floppy</c>
1265     # <c>mkdir -p /mnt/floppy/boot/grub</c>
1266     # <c>cp /usr/share/grub/i386-pc/stage1 /mnt/floppy/boot/grub/</c>
1267     # <c>cp /usr/share/grub/i386-pc/stage2 /mnt/floppy/boot/grub/</c>
1269     # <c>grub</c>
1271     grub&gt; <c>root (fd0)</c>
1272     grub&gt; <c>setup (fd0)</c>
1273     grub&gt; <c>quit</c>
1274 zhen 1.6 </pre>
1275 zhen 1.16 </body>
1276     </section>
1277     <section>
1278     <title>LILO Bootdisks</title>
1279     <body>
1280     <p>If you are using LILO, it is also a good idea to make a bootdisk:
1281     </p>
1282 zhen 1.18 <pre caption="Making a LILO Bootdisk">
1283     # <c>dd if=/boot/your_kernel of=/dev/fd0 </c>
1284     <comment>This will only work if your kernel is smaller than 1.4MB</comment>
1285     </pre>
1286 zhen 1.16 </body>
1287     </section>
1288     </chapter>
1289     <chapter>
1290     <title>Installation Complete!</title>
1291     <section>
1292     <body>
1293     <p>Now, Gentoo Linux is installed. The only remaining step is to exit the chrooted shell,
1294 zhen 1.6 udpate necessary configuration files,
1295     safely unmount your partitions
1296     and reboot the system:
1297     </p>
1298 zhen 1.16 <pre caption="Rebooting the System">
1299 drobbins 1.1 # <c>etc-update</c>
1300     # <c>exit</c>
1301     <codenote>This exits the chrooted shell; you can also type <c>^D</c></codenote>
1302     # <c>cd / </c>
1303     # <c>umount /mnt/gentoo/boot</c>
1304     # <c>umount /mnt/gentoo/proc</c>
1305     # <c>umount /mnt/gentoo</c>
1306     # <c>reboot</c>
1307 zhen 1.6 </pre>
1308 zhen 1.16 <note>
1309 zhen 1.6 After rebooting, it is a good idea to run the <c>update-modules</c> command to create
1310     the <path>/etc/modules.conf</path> file. Instead of modifying this file directly, you should
1311     generally make changes to the files in <path>/etc/modules.d</path>.
1312     </note>
1313 zhen 1.16 <impo>Remember if you are running hardware RAID, you must
1314 zhen 1.6 use the bootdisk for the first reboot.
1315     then go back and install grub the way everyone else did the first
1316     time. You are done, congratulations</impo>
1317 zhen 1.16 <p>If you have any questions or would like to get involved with Gentoo Linux development,
1318 zhen 1.6 consider joining our gentoo-user and gentoo-dev mailing lists
1319 zhen 1.16 (there's a &quot;click to subscribe&quot; link on our <uri link="http://www.gentoo.org">main page</uri>).
1320 zhen 1.6 We also have a handy <uri link="http://www.gentoo.org/doc/en/desktop.xml">Desktop configuration guide</uri>
1321     that will
1322     help you to continue configuring your new Gentoo Linux system, and a useful
1323     <uri link="http://www.gentoo.org/doc/en/portage-user.xml">Portage user guide</uri>
1324     to help familiarize you with Portage basics. You can find the rest of the Gentoo Documentation
1325 zhen 1.16 <uri link="http://www.gentoo.org/main/en/docs.xml">here</uri>. If you have any other questions
1326 zhen 1.10 involving installation or anything for that matter, please check the Gentoo Linux
1327 zhen 1.16 <uri link="http://www.gentoo.org/doc/en/faq.xml">FAQ</uri>.
1328 zhen 1.6 Enjoy and welcome to Gentoo Linux!
1329     </p>
1330 zhen 1.16 </body>
1331     </section>
1332     </chapter>
1333     <chapter>
1334     <title>Gentoo-Stats</title>
1335     <section>
1336     <body>
1337     <p>The Gentoo Linux usage statistics program was started as an attempt to give the developers
1338 zhen 1.6 a way to find out about their user base. It collects information about Gentoo Linux usage to help
1339     us in set priorities our development. Installing it is completely optional, and it would be greatly
1340     appreciated if you decide to use it. Compiled statistics can be viewed at <uri>http://stats.gentoo.org/</uri>.
1341     </p>
1342 zhen 1.16 <p>The gentoo-stats server will assign a unique ID to your system.
1343 zhen 1.6 This ID is used to make sure that each system is counted only once. The ID will not be used
1344     to individually identify your system, nor will it be mached against an IP address or
1345     other personal information. Every precaution has been taken to assure your privacy in the
1346     development of this system. The following are the things that we are monitoring
1347 zhen 1.16 right now through our &quot;gentoo-stats&quot; program:
1348 zhen 1.6 </p>
1349 zhen 1.16 <ul>
1350     <li>installed packages and their version numbers</li>
1351     <li>CPU information: speed (MHz), vendor name, model name, CPU flags (like &quot;mmx&quot; or &quot;3dnow&quot;)</li>
1352     <li>memory information (total available physical RAM, total available swap space)</li>
1353     <li>PCI cards and network controller chips</li>
1354     <li>the Gentoo Linux profile your machine is using (that is, where the /etc/make.profile link is pointing to).</li>
1355     </ul>
1356     <p>We are aware that disclosure of sensitive information is a threat to most Gentoo Linux users
1357 zhen 1.6 (just as it is to the developers).
1358     </p>
1359 zhen 1.16 <ul>
1360     <li>Unless you modify the gentoo-stats program, it will never transmit sensitive
1361 zhen 1.6 information such as your passwords, configuration data, shoe size...</li>
1362 zhen 1.16 <li>Transmission of your e-mail addresses is optional and turned off by default.</li>
1363     <li>The IP address your data transmission originates from will never be logged
1364     in such a way that we can identify you. There are no &quot;IP address/system ID&quot; pairs.</li>
1365     </ul>
1366     <p>The installation is easy - just run the following commands:
1367 zhen 1.6 </p>
1368 zhen 1.16 <pre caption="Installing gentoo-stats">
1369 drobbins 1.1 # <c>emerge gentoo-stats</c> <codenote>Installs gentoo-stats</codenote>
1370     # <c>gentoo-stats --new</c> <codenote>Obtains a new system ID</codenote>
1371 zhen 1.6 </pre>
1372 zhen 1.16 <p>The second command above will request a new system ID and enter it into
1373 zhen 1.6 <path>/etc/gentoo-stats/gentoo-stats.conf</path> automatically. You can view this file
1374     to see additional configuration options.
1375     </p>
1376 zhen 1.16 <p>After that, the program should be run on a regular schedule
1377 zhen 1.6 (gentoo-stats does not have to be run as root). Add this line to your <path>crontab</path>:
1378     </p>
1379 zhen 1.16 <pre caption="Updating gentoo-stats with cron">
1380     <c>0 0 * * 0,4 /usr/sbin/gentoo-stats --update &gt; /dev/null</c>
1381     </pre>
1382     <p>The <c>gentoo-stats</c> program is a simple perl script which can be
1383 zhen 1.6 viewed with your favortive pager or editor: <path>/usr/sbin/gentoo-stats</path>. </p>
1384 zhen 1.16 </body>
1385     </section>
1386     </chapter>
1387 drobbins 1.1 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20