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

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20