/[gentoo]/xml/htdocs/doc/en/gentoo-x86-install.xml
Gentoo

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.182

  ViewVC Help
Powered by ViewVC 1.1.20