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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.75 - (hide annotations) (download) (as text)
Thu Feb 27 15:35:04 2003 UTC (14 years, 6 months ago) by jhhudso
Branch: MAIN
Changes since 1.74: +149 -238 lines
File MIME type: application/xml
Massive changes. too many to list.

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

  ViewVC Help
Powered by ViewVC 1.1.20