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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.72 - (hide annotations) (download) (as text)
Tue Apr 10 19:37:05 2007 UTC (7 years, 3 months ago) by nightmorph
Branch: MAIN
Changes since 1.71: +5 -6 lines
File MIME type: application/xml
really fixed x86 quickinstall this time. bug 173929

1 swift 1.1 <?xml version='1.0' encoding="UTF-8"?>
2 nightmorph 1.72 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v 1.71 2007/04/09 19:44:52 nightmorph Exp $ -->
3 swift 1.8
4     <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
5    
6 neysx 1.52 <guide link="/doc/en/gentoo-x86-quickinstall.xml" lang="en">
7 neysx 1.31 <title>Gentoo Linux x86 Quick Install Guide</title>
8 swift 1.38
9     <author title="Author">
10 neysx 1.52 <mail link="neysx@gentoo.org">Xavier Neys</mail>
11     </author>
12     <author title="Author">
13 nightmorph 1.67 <mail link="swift@gentoo.org">Sven Vermeulen</mail>
14 swift 1.1 </author>
15 swift 1.38 <author title="Author">Steven Wagner</author>
16 swift 1.1
17     <abstract>
18 neysx 1.52 The Quick install guide covers the Gentoo install process in a non-verbose
19     manner. Its purpose is to allow users to perform a stage3 install in no time.
20     Users should already have prior experience with installing Gentoo Linux if they
21     want to follow this guide.
22 swift 1.2 </abstract>
23    
24 swift 1.44 <!-- The content of this document is licensed under the CC-BY-SA license -->
25     <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
26 swift 1.1 <license/>
27 swift 1.2
28 nightmorph 1.72 <version>15</version>
29     <date>2007-04-10</date>
30 neysx 1.52
31     <chapter>
32     <title>Introduction</title>
33     <section>
34     <body>
35    
36     <p>
37     This guide contains all commands you should use to complete a stage3
38     installation of Gentoo. You need a connection to the Internet to download the
39     stage3 and Portage snapshots.
40     </p>
41    
42     <p>
43     Timing output follows all commands that take more than a couple of seconds to
44 nightmorph 1.63 finish. Commands were timed on an AMD 2000 1.66 Ghz PC with 512 MB of RAM and
45 neysx 1.52 two SATA disks connected to a hardware controller.
46     </p>
47    
48     <pre caption="Test box specs">
49     <comment>(The following specs and the timing information should help you determine
50     a rough estimate of the time you need to complete your install)</comment>
51    
52     # <i>grep bogo /proc/cpuinfo</i>
53 rane 1.55 bogomips : 3337.81
54 neysx 1.52
55     # <i>hdparm -tT /dev/sda</i>
56     /dev/sda:
57     Timing cached reads: 1100 MB in 2.00 seconds = 549.97 MB/sec
58     Timing buffered disk reads: 224 MB in 3.01 seconds = 74.36 MB/sec
59    
60     # <i>grep MemTotal /proc/meminfo</i>
61     MemTotal: 509248 kB
62     </pre>
63    
64     </body>
65     </section>
66     </chapter>
67 swift 1.1
68     <chapter>
69 neysx 1.31 <title>Quick Install Guide</title>
70 aaby 1.7 <section>
71 swift 1.38 <title>Installation Media</title>
72     <body>
73    
74     <p>
75     Download a CD from one of our <uri link="/main/en/mirrors.xml">mirrors</uri>.
76 neysx 1.52 You can find the minimal CD ISO in
77     <path>releases/x86/&lt;release&gt;/installcd</path> or the LiveCD ISO in
78     <path>releases/x86/&lt;release&gt;/livecd</path>. The <e>minimal</e>
79     installation CD is only useful for Internet-based installations. You can use
80     the <e>LiveCD</e> to perform a networkless installation as documented in the
81 nightmorph 1.59 <uri link="/doc/en/handbook/2006.1/handbook-x86.xml">2006.1 x86 installation
82 neysx 1.52 handbook</uri>. The minimal CD is recommended.
83 swift 1.38 </p>
84    
85     <p>
86 neysx 1.52 <uri link="/doc/en/faq.xml#isoburning">Burn</uri> the CD and boot it.
87 swift 1.38 </p>
88    
89 neysx 1.52 </body>
90     </section>
91     <section>
92     <title>Booting the CD</title>
93     <body>
94    
95 swift 1.38 <p>
96 neysx 1.52 Press
97     <c>F2</c> at the boot screen to find out what boot options exist. You can
98     either start <c>gentoo</c> or <c>gentoo-nofb</c>, the latter disables the
99     framebuffer. If you booted the LiveCD, don't forget to add the <c>nox</c>
100     option to prevent the X graphical environment from starting. Several options
101     allow to enable or disable some features. If all goes well, your hardware will
102     be detected and all modules will be loaded. If the kernel fails to boot
103     properly or if your computer hangs during the boot procedure, you may have to
104 neysx 1.62 experiment with different configurations. The safest way is probably to use the
105 rane 1.55 <c>nodetect</c> option and then load required modules explicitly.
106 neysx 1.52 </p>
107    
108     <pre caption="Boot the minimal CD">
109     Gentoo Linux Installation LiveCD http://www.gentoo.org
110     Enter to Boot; F1 for kernels F2 for options.
111     boot: <i>gentoo-nofb</i>
112     <comment>(or in case of problems)</comment>
113     boot: <i>gentoo-nofb nodetect</i>
114     </pre>
115    
116     </body>
117     </section>
118     <section>
119     <title>Optional: loading modules</title>
120     <body>
121    
122     <p>
123     If you used the <c>nodetect</c> option, once booted, load the required modules.
124     You need to enable networking and have access to your disks. The <c>lspci</c>
125     command can help you identify your hardware.
126 swift 1.38 </p>
127    
128 neysx 1.52 <pre caption="Load required modules">
129     livecd root # <i>lspci</i>
130     <comment>(Use lspci's output to identify required modules)</comment>
131    
132     <comment>(The following is an example, adapt it to your hardware)</comment>
133     livecd root # <i>modprobe 3w-9xxx</i>
134     livecd root # <i>modprobe r8169</i>
135     </pre>
136    
137 swift 1.38 </body>
138     </section>
139     <section>
140     <title>Network Configuration</title>
141 swift 1.1 <body>
142    
143     <p>
144 swift 1.38 If your network does not work already, you can use <c>net-setup</c> to configure
145     your network. You might need to load support for your network card using
146     <c>modprobe</c> prior to the configuration. If you have ADSL, use
147 nightmorph 1.59 <c>pppoe-setup</c> and <c>pppoe-start</c>. For PPTP support, first edit
148 swift 1.38 <path>/etc/ppp/chap-secrets</path> and <path>/etc/ppp/options.pptp</path> and
149     then use <c>pptp &lt;server&nbsp;ip&gt;</c>.
150     </p>
151    
152     <p>
153     For wireless access, use <c>iwconfig</c> to set the wireless parameters and then
154 swift 1.44 use either <c>net-setup</c> again or run <c>ifconfig</c>, <c>dhcpcd</c> and/or
155 swift 1.38 <c>route</c> manually.
156 swift 1.1 </p>
157    
158     <p>
159 swift 1.44 If you are behind a proxy, do not forget to initialize your system using
160 swift 1.38 <c>export http_proxy</c>, <c>ftp_proxy</c> and <c>RSYNC_PROXY</c>.
161     </p>
162    
163 neysx 1.52 <pre caption="Configure networking the guided way">
164     livecd root # <i>net-setup eth0</i>
165     </pre>
166    
167     <p>
168     Alternatively, you can start networking manually. The following example assigns
169 rane 1.55 the IP address 192.168.1.10 to your PC and defines 192.168.1.1 as your router
170 neysx 1.52 and name server.
171     </p>
172    
173     <pre caption="Configure networking the manual way">
174     livecd root # <i>ifconfig eth0 192.168.1.10/24</i>
175     livecd root # <i>route add default gw 192.168.1.1</i>
176 nightmorph 1.59 livecd root # <i>echo nameserver 192.168.1.1 &gt; /etc/resolv.conf</i>
177 neysx 1.52 </pre>
178    
179     <p>
180     The installation CD allows you to start an <c>sshd</c> server, add additional
181     users, run <c>irssi</c> (a command-line chat client) and surf the web using
182     <c>lynx</c> or <c>links</c>.
183     </p>
184    
185     </body>
186     </section>
187     <section>
188     <title>Optional: connect to your new box over ssh</title>
189     <body>
190    
191     <p>
192     The most interesting feature is of course <c>sshd</c>. You can start it and
193     then connect from another machine and cut and paste commands from this guide.
194     </p>
195    
196     <pre caption="Start sshd">
197     livecd root # <i>time /etc/init.d/sshd start</i>
198     * Generating hostkey ...
199     <comment>(sshd generates the key and displays more output)</comment>
200     * starting sshd ... [ok]
201    
202     real 0m13.688s
203     user 0m9.420s
204     sys 0m0.090s
205     </pre>
206    
207     <p>
208     Now, set the root password on the liveCD so that you can connect to it from
209     another PC. Please note that allowing root to connect over ssh is not
210     recommended under normal circumstances. If you can't trust your local network,
211     use a long and complex password, you should use it only once as it will
212 rane 1.53 disappear after your first reboot.
213 neysx 1.52 </p>
214    
215     <pre caption="Set the root password">
216     livecd root # <i>passwd</i>
217     New UNIX password: <comment>type_a_password</comment>
218     Retype new UNIX password: <comment>type_a_password</comment>
219     passwd: password updated successfully
220     </pre>
221    
222     <p>
223     Now, you can start a terminal on another PC and connect to your new box, follow
224     the rest of this guide in another window, and cut and paste commands.
225     </p>
226    
227     <pre caption="Connect to your new box from another PC">
228 rane 1.55 <comment>(Use the IP address of your new box)</comment>
229 neysx 1.52 $ <i>ssh root@192.168.1.10</i>
230     The authenticity of host '192.168.1.10 (192.168.1.10)' can't be established.
231     RSA key fingerprint is 96:e7:2d:12:ac:9c:b0:94:90:9f:40:89:b0:45:26:8f.
232     Are you sure you want to continue connecting (yes/no)? <i>yes</i>
233     Warning: Permanently added '192.168.1.10' (RSA) to the list of known hosts.
234     Password: <comment>type_the_password</comment>
235     </pre>
236    
237 swift 1.38 </body>
238     </section>
239     <section>
240     <title>Preparing the Disks</title>
241     <body>
242    
243     <p>
244     Use <c>fdisk</c> or <c>cfdisk</c> to create your partition layout. You need at
245 neysx 1.52 least a swap partition (type 82) and one Linux partition (type 83). The
246     following scenario creates a <path>/boot</path>, a swap and a main partition
247     as used in our handbook. The device name is likely to be either
248     <path>/dev/sda</path> for a SATA or SCSI disk, or <path>/dev/hda</path> for an
249     IDE disk.
250     </p>
251    
252     <pre caption="Create the partitions">
253     livecd ~ # <i>fdisk /dev/sda</i>
254    
255     <comment>(The rest of this guide uses the following partitioning scheme)</comment>
256     livecd ~ # <i>fdisk -l /dev/sda</i>
257    
258     Disk /dev/sda: 599.9 GB, 599978409984 bytes
259     255 heads, 63 sectors/track, 72943 cylinders
260     Units = cylinders of 16065 * 512 = 8225280 bytes
261    
262     Device Boot Start End Blocks Id System
263     /dev/sda1 1 12 96358+ 83 Linux
264     /dev/sda2 13 110 787185 82 Linux swap / Solaris
265     /dev/sda3 111 72943 585031072+ 83 Linux
266     </pre>
267 swift 1.38
268     <p>
269     Use <c>mke2fs</c>, <c>mke2fs -j</c>, <c>mkreiserfs</c>, <c>mkfs.xfs</c> and
270 swift 1.44 <c>mkfs.jfs</c> to create file systems on your Linux partitions. Initialize your
271 swift 1.38 swap partition using <c>mkswap</c> and <c>swapon</c>.
272     </p>
273    
274 neysx 1.52 <pre caption="Create the file systems and activate swap">
275     <comment>(ext2 is all you need on the /boot partition)</comment>
276     livecd ~ # <i>mke2fs /dev/sda1</i>
277    
278     <comment>(Let's use ext3 on the main partition)</comment>
279 neysx 1.68 livecd ~ # <i>mke2fs -j -O dir_index /dev/sda3</i>
280 neysx 1.52
281     <comment>(Create and activate swap)</comment>
282     livecd ~ # <i>mkswap /dev/sda2 &amp;&amp; swapon /dev/sda2</i>
283     </pre>
284    
285 swift 1.38 <p>
286     Mount the freshly created file systems on <path>/mnt/gentoo</path>. Create
287     directories for the other mount points (like <path>/mnt/gentoo/boot</path>) if
288 neysx 1.52 you need them and mount them too.
289 swift 1.38 </p>
290    
291 neysx 1.52 <pre caption="Mount the file systems">
292     livecd ~ # <i>mount /dev/sda3 /mnt/gentoo</i>
293     livecd ~ # <i>mkdir /mnt/gentoo/boot</i>
294     livecd ~ # <i>mount /dev/sda1 /mnt/gentoo/boot</i>
295     </pre>
296    
297 swift 1.38 </body>
298     </section>
299     <section>
300     <title>Setting Up The Stage</title>
301     <body>
302    
303     <p>
304 neysx 1.52 First make sure your date and time is set correctly using <c>date
305     MMDDhhmmYYYY</c>. Use UTC time.
306 swift 1.38 </p>
307    
308 neysx 1.52 <pre caption="Set the date and UTC time">
309     <comment>(Check the clock)</comment>
310     livecd ~ # <i>date</i>
311     Mon Mar 6 00:14:13 UTC 2006
312    
313     <comment>(Set the current date and time if required)</comment>
314     livecd ~ # <i>date 030600162006</i> <comment>(Format is MMDDhhmmYYYY)</comment>
315     Mon Mar 6 00:16:00 UTC 2006
316     </pre>
317    
318 swift 1.38 <p>
319 neysx 1.52 Next, download a stage from one of our <uri
320     link="/main/en/mirrors.xml">mirrors</uri>. Go to <path>/mnt/gentoo</path> and
321     unpack the stage using <c>tar xjpf &lt;stage3 tarball&gt;</c>.
322 swift 1.38 </p>
323    
324 neysx 1.52 <pre caption="Download a stage3 archive">
325     livecd ~ # <i>cd /mnt/gentoo</i>
326     livecd gentoo # <i>links http://www.gentoo.org/main/en/mirrors.xml</i>
327     <comment>(Pick a mirror, move to the releases/x86/current/stages directory
328 nightmorph 1.59 highlight the stage3 of your choice, probably stage3-i686-2006.1.tar.bz2
329 neysx 1.52 and press D to download it)</comment>
330    
331     <comment>(<b>Or</b> download it directly with wget without choosing a nearby mirror)</comment>
332     livecd ~ # <i>cd /mnt/gentoo</i>
333 nightmorph 1.59 livecd gentoo # <i>wget http://gentoo.osuosl.org/releases/x86/current/stages/stage3-i686-2006.1.tar.bz2</i>
334 neysx 1.52 </pre>
335    
336     <pre caption="Unpack the stage3 archive">
337     livecd gentoo # <i>time tar xjpf stage3*</i>
338    
339     real 1m13.157s
340     user 1m2.920s
341     sys 0m7.230s
342     </pre>
343    
344 swift 1.38 <p>
345 neysx 1.52 Install the latest Portage snapshot. Proceed as for the stage3 archive: choose
346     a nearby mirror from our <uri link="/main/en/mirrors.xml">list</uri>, download
347     the latest snapshot and unpack it.
348 swift 1.47 </p>
349    
350 neysx 1.52 <pre caption="Download the latest Portage snapshot">
351     livecd gentoo # <i>cd /mnt/gentoo/usr</i>
352     livecd usr # <i>links http://www.gentoo.org/main/en/mirrors.xml</i>
353     <comment>(Pick a mirror, move to the snapshots/ directory,
354     highlight <b>portage-latest.tar.bz2</b> and press D to download it)</comment>
355    
356     <comment>(<b>Or</b> download it directly with wget without choosing a nearby mirror)</comment>
357     livecd gentoo # <i>cd /mnt/gentoo/usr</i>
358     livecd usr # <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i>
359     </pre>
360    
361     <pre caption="Unpack the Portage snapshot">
362     livecd usr # <i>time tar xjf portage*</i>
363    
364     real 0m51.523s
365     user 0m28.680s
366     sys 0m12.840s
367     </pre>
368    
369     </body>
370     </section>
371     <section>
372     <title>Chrooting</title>
373     <body>
374    
375 swift 1.47 <p>
376 neysx 1.52 Mount the <path>/proc</path> file system, copy over the
377     <path>/etc/resolv.conf</path> file, then chroot into your Gentoo environment.
378 swift 1.38 </p>
379    
380 neysx 1.52 <pre caption="Chroot">
381     livecd usr # <i>cd /</i>
382     livecd / # <i>mount -t proc proc /mnt/gentoo/proc</i>
383     livecd / # <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/</i>
384     livecd / # <i>chroot /mnt/gentoo /bin/bash</i>
385     livecd / # <i>env-update &amp;&amp; source /etc/profile</i>
386     >>> Regenerating /etc/ld.so.cache...
387     </pre>
388    
389 swift 1.38 </body>
390     </section>
391     <section>
392 neysx 1.52 <title>Set your timezone</title>
393 swift 1.38 <body>
394    
395     <p>
396 nightmorph 1.70 Set your time zone information by setting the timezone listing from
397     <path>/usr/share/zoneinfo</path> in <path>/etc/conf.d/clock</path>.
398 swift 1.38 </p>
399    
400 nightmorph 1.71 <pre caption="Setting your timezone">
401 nightmorph 1.72 <comment>(Using CET as an example)</comment>
402 nightmorph 1.70 livecd / # <i>nano -w /etc/conf.d/clock</i>
403     TIMEZONE="CET"
404    
405 neysx 1.52 livecd / # <i>date</i>
406     Wed Mar 8 00:46:05 CET 2006
407 swift 1.1 </pre>
408    
409 neysx 1.52 </body>
410     </section>
411     <section>
412     <title>Set your host and domain name</title>
413     <body>
414 swift 1.1
415     <p>
416 neysx 1.52 Set your host name in <path>/etc/conf.d/hostname</path> and
417     <path>/etc/hosts</path>. In the following example, we use <c>mybox</c> as host
418     name and <c>at.myplace</c> as domain name. You can either edit the config
419     files with <c>nano</c> or use the following commands:
420 swift 1.1 </p>
421    
422 neysx 1.52 <pre caption="Set host and domain name">
423     livecd / # <i>cd /etc</i>
424     livecd etc # <i>echo "127.0.0.1 mybox.at.myplace mybox localhost" > hosts</i>
425     livecd etc # <i>sed -i -e 's/HOSTNAME.*/HOSTNAME="mybox"/' conf.d/hostname</i>
426     <comment>(Use defined host name and check)</comment>
427     livecd etc # <i>hostname mybox</i>
428     livecd etc # <i>hostname -f</i>
429     mybox.at.myplace
430     </pre>
431 swift 1.38
432     </body>
433     </section>
434     <section>
435     <title>Kernel Configuration</title>
436     <body>
437    
438 swift 1.1 <p>
439 nightmorph 1.69 Install a kernel source (usually <c>gentoo-sources</c>), configure it, compile
440     it and copy the <path>arch/i386/boot/bzImage</path> file to <path>/boot</path>.
441 neysx 1.52 </p>
442    
443     <pre caption="Install a kernel source, compile it and install the kernel">
444 neysx 1.61 livecd etc # <i>time emerge gentoo-sources</i>
445 neysx 1.52
446     real 2m51.435s
447     user 0m58.220s
448     sys 0m29.890s
449 neysx 1.61 livecd etc # <i>cd /usr/src/linux</i>
450 neysx 1.52 livecd linux # <i>make menuconfig</i>
451     <comment>(Configure your kernel)</comment>
452     livecd linux # <i>time make -j2</i>
453    
454     <comment>(Elapsed time depends highly on the options you selected)</comment>
455     real 3m51.962s
456     user 3m27.060s
457     sys 0m24.310s
458 swift 1.38
459 neysx 1.52 livecd linux # <i>make modules_install</i>
460     livecd linux # <i>cp arch/i386/boot/bzImage /boot/kernel</i>
461     </pre>
462 swift 1.1
463 swift 1.38 </body>
464     </section>
465     <section>
466 neysx 1.52 <title>Configure the system</title>
467 swift 1.38 <body>
468 swift 1.1
469     <p>
470 neysx 1.52 Edit your <path>/etc/fstab</path> and replace <c>BOOT</c>, <c>ROOT</c> and
471     <c>SWAP</c> with the actual partition names. Don't forget to check that the
472     file systems match your installation.
473 swift 1.1 </p>
474    
475 swift 1.38 <pre caption="Example fstab">
476 neysx 1.52 livecd linux # <i>cd /etc</i>
477     livecd etc # <i>nano -w fstab</i>
478     /dev/<i>sda1</i> /boot ext2 noauto,noatime 1 2
479     /dev/<i>sda3</i> / ext3 noatime 0 1
480     /dev/<i>sda2</i> none swap sw 0 0
481 swift 1.1 </pre>
482    
483     <p>
484 neysx 1.52 Configure your network in <path>/etc/conf.d/net</path>. Add the <c>net.eth0</c>
485     init script to the default run level. If you have multiple NICs, symlink them
486     to the <c>net.eth0</c> init script and add them to the default run level as
487     well. Either edit <path>/etc/conf.d/net</path> with <c>nano</c> or use the
488     following commands:
489     </p>
490    
491     <pre caption="Configure networking">
492     livecd etc # <i>cd conf.d</i>
493     livecd conf.d # <i>echo 'config_eth0=( "192.168.1.10/24" )' >> net</i>
494 nightmorph 1.70 livecd conf.d # <i>echo 'routes_eth0=( "default gw 192.168.1.1" )' >> net</i>
495 neysx 1.52 livecd conf.d # <i>rc-update add net.eth0 default</i>
496     <comment>(If you compiled your network card driver as a module,
497     add it to /etc/modules.autoload.d/kernel-2.6)</comment>
498     livecd conf.d # <i>echo r8169 >> /etc/modules.autoload.d/kernel-2.6</i>
499     <comment>(If you want to reconnect via ssh after you have rebooted your new box:)</comment>
500     livecd conf.d # <i>rc-update add sshd default</i>
501 swift 1.1 </pre>
502    
503 neysx 1.52 <note>
504 nightmorph 1.70 Emerge <c>pcmciautils</c> if you need support for PCMCIA cards.
505 neysx 1.52 </note>
506 swift 1.1
507 swift 1.38 <p>
508     Set the root password using <c>passwd</c>.
509     </p>
510 swift 1.1
511 neysx 1.52 <pre caption="Set the root password">
512     livecd conf.d # <i>passwd</i>
513     New UNIX password: <comment>type_the_password</comment>
514     Retype new UNIX password: <comment>type_the_password_again</comment>
515     passwd: password updated successfully
516     </pre>
517    
518 swift 1.1 <p>
519 neysx 1.52 Check the system configuration in <path>/etc/rc.conf</path>,
520 swift 1.38 <path>/etc/conf.d/rc</path>, <path>/etc/conf.d/keymaps</path>,
521 neysx 1.52 <path>/etc/conf.d/clock</path> and edit any of those files if required.
522 swift 1.1 </p>
523    
524 neysx 1.52 <pre caption="Optional: edit some config files">
525     livecd conf.d # <i>nano -w /etc/rc.conf</i>
526     livecd conf.d # <i>nano -w /etc/conf.d/rc</i>
527     livecd conf.d # <i>nano -w /etc/conf.d/keymaps</i>
528     livecd conf.d # <i>nano -w /etc/conf.d/clock</i>
529     </pre>
530    
531 swift 1.38 </body>
532     </section>
533     <section>
534     <title>Installing System Tools</title>
535     <body>
536    
537     <p>
538 neysx 1.52 Install a system logger like <c>syslog-ng</c> and a cron daemon like
539     <c>vixie-cron</c>, and add them to the default run level.
540 swift 1.38 </p>
541 swift 1.1
542 neysx 1.52 <note>
543     Cron daemons depend on an MTA. <c>mail-mta/ssmtp</c> will be pulled in as a
544     dependency. If you want to use a more advanced MTA, you might want to install
545     it now. If you are in a hurry, let ssmtp be installed and remove it later when
546     you install the MTA of your choice.
547     </note>
548    
549     <pre caption="Install a syslogger and a cron daemon">
550     livecd conf.d # <i>time emerge syslog-ng vixie-cron</i>
551    
552     real 1m52.699s
553     user 1m1.630s
554     sys 0m35.220s
555     livecd conf.d # <i>rc-update add syslog-ng default</i>
556     livecd conf.d # <i>rc-update add vixie-cron default</i>
557     </pre>
558 swift 1.1
559 swift 1.38 <p>
560     Install the necessary file system tools (<c>xfsprogs</c>, <c>reiserfsprogs</c>
561 nightmorph 1.70 or <c>jfsutils</c>) and networking tools (<c>dhcpcd</c> or <c>ppp</c>) if you
562     need any.
563 swift 1.38 </p>
564 swift 1.1
565 neysx 1.52 <pre caption="Install extra tools if required">
566     livecd conf.d # <i>emerge xfsprogs</i> <comment>(If you use the XFS file system)</comment>
567     livecd conf.d # <i>emerge jfsutils</i> <comment>(If you use the JFS file system)</comment>
568     livecd conf.d # <i>emerge reiserfsprogs</i> <comment>(If you use the Reiser file system)</comment>
569     livecd conf.d # <i>emerge dhcpcd</i> <comment>(If you need a DHCP client)</comment>
570 nightmorph 1.70 livecd conf.d # <i>USE="-X" emerge ppp</i> <comment>(If you need PPPoE ADSL connectivity)</comment>
571 neysx 1.52 </pre>
572    
573 swift 1.38 </body>
574     </section>
575     <section>
576     <title>Configuring the Bootloader</title>
577     <body>
578 swift 1.1
579     <p>
580 neysx 1.52 Emerge <c>grub</c> or <c>lilo</c>. Configure either
581     <path>/boot/grub/grub.conf</path> or <path>/etc/lilo.conf</path> and install
582     the bootloader you have emerged.
583     </p>
584    
585     <p>
586     <b>1. Using grub</b>
587 swift 1.1 </p>
588    
589 neysx 1.52 <pre caption="Emerge grub and edit its configuration file">
590     livecd conf.d # <i>time emerge grub</i>
591    
592     real 1m8.634s
593     user 0m39.460s
594     sys 0m15.280s
595     livecd conf.d # <i>nano -w /boot/grub/grub.conf</i>
596     </pre>
597    
598 swift 1.38 <pre caption="Example grub.conf">
599 swift 1.9 default 0
600 neysx 1.52 timeout 10
601 swift 1.9
602 neysx 1.52 title=Gentoo
603 swift 1.38 root (hd0,0)
604 neysx 1.52 kernel /boot/kernel root=/dev/sda3
605     </pre>
606    
607     <pre caption="Install grub">
608     livecd conf.d # <i>grub</i>
609     Probing devices to guess BIOS drives. This may take a long time.
610    
611     grub> <i>root (hd0,0)</i>
612     Filesystem type is ext2fs, partition type 0x83
613    
614     grub> <i>setup (hd0)</i>
615     Checking if "/boot/grub/stage1" exists... yes
616     Checking if "/boot/grub/stage2" exists... yes
617     Checking if "/boot/grub/e2fs_stage1_5" exists... yes
618     Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded.
619     succeeded
620     Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/
621     grub/menu.lst"... succeeded
622     Done.
623    
624     grub> <i>quit</i>
625     </pre>
626    
627     <p>
628     Now, proceed with the <uri link="#reboot">rebooting section</uri>.
629     </p>
630    
631     <p>
632     <b>2. Using lilo</b>
633     </p>
634 swift 1.38
635 neysx 1.52 <pre caption="Emerge lilo and edit its configuration file">
636     livecd conf.d # <i>time emerge lilo</i>
637 swift 1.38
638 neysx 1.52 real 0m47.016s
639     user 0m22.770s
640     sys 0m5.980s
641     livecd conf.d # <i>nano -w /etc/lilo.conf</i>
642 swift 1.9 </pre>
643    
644 swift 1.38 <pre caption="Example lilo.conf">
645 neysx 1.52 boot=/dev/sda
646 swift 1.9 prompt
647 swift 1.11 timeout=50
648 swift 1.9 default=gentoo
649    
650 neysx 1.52 image=/boot/kernel
651     label=Gentoo
652 swift 1.38 read-only
653 neysx 1.52 root=/dev/sda3
654     </pre>
655 swift 1.38
656 neysx 1.52 <pre caption="Install lilo">
657     livecd conf.d # <i>lilo</i>
658     Added Gentoo *
659     </pre>
660    
661     </body>
662     </section>
663     <section id="reboot">
664     <title>Reboot</title>
665     <body>
666    
667     <p>
668     Exit the chrooted environment, unmount all file systems and reboot:
669     </p>
670    
671     <pre caption="Reboot">
672     livecd conf.d # <i>exit</i>
673     livecd / # <i>umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo</i>
674     livecd / # <i>reboot</i>
675     <comment>(Don't forget to remove the CD)</comment>
676     </pre>
677    
678     </body>
679     </section>
680     <section id="after-reboot">
681     <title>Finalizing the Installation</title>
682     <body>
683    
684     <note>
685 rane 1.54 The <b>total</b> elapsed time between the display of the boot prompt on the
686     minimal CD and the display of the login prompt after the reboot was
687 neysx 1.52 <b>00:42:31</b> on our test box. Yes, less than one hour! Note that this time
688     also includes the stage3, Portage snapshot and several packages download time
689     and the time spent configuring the kernel.
690     </note>
691    
692     <p>
693     Log in as <c>root</c>, then add one or more users for daily use with
694     <c>useradd</c>.
695     </p>
696    
697     <pre caption="Connect to your new box from another PC">
698     <comment>(Clean up your known_hosts file because your new box
699     has generated a new definitive hostkey)</comment>
700     $ <i>nano -w ~/.ssh/known_hosts</i>
701     <comment>(Look for the IP of your new PC and delete the line,
702     then save the file and exit nano)</comment>
703    
704 rane 1.55 <comment>(Use the IP address of your new box)</comment>
705 neysx 1.52 $ <i>ssh root@192.168.1.10</i>
706     The authenticity of host '192.168.1.10 (192.168.1.10)' can't be established.
707     RSA key fingerprint is 96:e7:2d:12:ac:9c:b0:94:90:9f:40:89:b0:45:26:8f.
708     Are you sure you want to continue connecting (yes/no)? <i>yes</i>
709     Warning: Permanently added '192.168.1.10' (RSA) to the list of known hosts.
710     Password: <comment>type_the_password</comment>
711     </pre>
712    
713     <pre caption="Add a new user">
714     mybox ~ # <i>adduser -g users -G lp,wheel,audio,cdrom,portage,cron -m john</i>
715     mybox ~ # <i>passwd john</i>
716     New UNIX password: <comment>Set John's password</comment>
717     Retype new UNIX password: <comment>Type John's password again</comment>
718     passwd: password updated successfully
719     </pre>
720    
721     </body>
722     </section>
723     <section>
724     <title>Last configuration touches</title>
725     <body>
726    
727     <p>
728     Start by selecting nearby mirrors either by defining the <c>RSYNC</c> and
729     <c>GENTOO_MIRRORS</c> variables in <path>/etc/make.conf</path> or by using
730     <c>mirrorselect</c>. You can also define the number of concurrent compilation
731     processes at this point.
732     </p>
733    
734     <pre caption="Use mirrorselect and set MAKEOPTS">
735     mybox ~ # <i>emerge mirrorselect</i>
736     mybox ~ # <i>mirrorselect -i -o >> /etc/make.conf</i>
737     mybox ~ # <i>mirrorselect -i -r -o >> /etc/make.conf</i>
738     <comment>(Usually, (the number of processors + 1) is a good value)</comment>
739     mybox ~ # <i>echo 'MAKEOPTS="-j2"' >> /etc/make.conf</i>
740     </pre>
741    
742     <p>
743 rane 1.56 Now is a good time to enable or disable some USE flags. Run <c>emerge -vpe
744     world</c> to list all currently installed packages and their enabled and
745     disabled USE flags. Either edit <path>/etc/make.conf</path> or use the
746     following command to define the USE variable:
747 neysx 1.52 </p>
748    
749     <pre caption="View USE flags in use and enable or disable some">
750     mybox ~ # <i>emerge -vpe world</i>
751     <comment>(Portage displays the packages and their USE flags, as an example, let's
752 nightmorph 1.70 disable ipv6 and fortran, and enable unicode)</comment>
753     mybox ~ # <i>echo 'USE="nptl nptlonly -ipv6 -fortran unicode"' >> /etc/make.conf</i>
754 neysx 1.52 </pre>
755    
756     <p>
757 nightmorph 1.70 Recent versions of glibc use <path>/etc/locale.gen</path> to define locale
758 nightmorph 1.72 settings.
759 neysx 1.52 </p>
760    
761     <pre caption="Define locales">
762 nightmorph 1.70 mybox # <i>cd /etc</i>
763     mybox # <i>nano -w locale.gen</i>
764 swift 1.1 </pre>
765    
766     <p>
767 neysx 1.52 Last but not least, you may want to alter the <c>CFLAGS</c> variable in your
768     <path>/etc/make.conf</path> to optimise the code to your specific needs. Please
769     note that using a long list of flags is rarely needed and can even lead to a
770     broken system. It is recommended to specify the processor type in the
771     <c>march</c> option and stick to <c>-O2 -pipe</c>.
772 swift 1.1 </p>
773    
774 swift 1.38 <p>
775 neysx 1.52 You may also want to switch to <b>~x86</b>. You should only do this if you can
776     deal with the odd broken ebuild or package. If you'd rather keep your system
777     stable, don't add the <c>ACCEPT_KEYWORDS</c> variable. Adding
778     <c>FEATURES="parallel-fetch ccache"</c> is also a good idea.
779     </p>
780    
781     <pre caption="Last edit of make.conf">
782     mybox etc # <i>nano -w make.conf</i>
783     <comment>(Set -march to your CPU type in CFLAGS)</comment>
784     CFLAGS="-O2 -march=<i>athlon-xp</i> -pipe"
785     <comment>(Add the following line)</comment>
786     FEATURES="parallel-fetch ccache"
787     <comment>(Only add the following if you know what you're doing)</comment>
788     ACCEPT_KEYWORDS="~x86"
789     </pre>
790    
791     <p>
792     You might want to recompile your whole system twice to make full use of your
793     latest configuration changes. It would take quite a long time to complete and
794 nightmorph 1.59 yield minimal speed benefits. You can let your system optimise itself gradually
795     over time when new versions of packages are released. However, recompiling is
796     a still good idea from the standpoint of maintaining system consistency. Please
797     see the <uri link="/doc/en/gcc-upgrading.xml">Gentoo GCC Upgrading Guide</uri>
798     for a discussion on the benefits of ensuring a consistently built system and
799     world.
800 swift 1.38 </p>
801    
802 neysx 1.52 <p>
803     Recompiling only the packages that have already been updated since the release
804     or that are affected by your new USE flags will take enough time. You might
805     also have to remove packages that block your upgrade. Look for "[blocks
806     <brite>B</brite> ]" in the output of <c>emerge -vpuD --newuse world</c> and
807     use <c>emerge -C</c> to remove them.
808     </p>
809    
810     <pre caption="Update your packages">
811     <comment>(Install ccache)</comment>
812     mybox etc # <i>emerge ccache</i>
813    
814 rane 1.58 <comment>(Please note that the switch to ~x86 causes many packages to be upgraded)</comment>
815 neysx 1.52 mybox etc # <i>emerge -vpuD --newuse world</i>
816     <comment>(Take a good look at the package list and their USE flags,
817     remove blocking packages if any, and start the lengthy process)</comment>
818     mybox etc # <i>time emerge -vuD --newuse world</i>
819     <comment>(79 packages have been (re)compiled)</comment>
820    
821     real 180m13.276s
822     user 121m22.905s
823     sys 36m31.472s
824    
825     <comment>(Remerge libtool to avoid further potential problems)</comment>
826     mybox etc # <i>emerge libtool</i>
827    
828     <comment>(Update config files, make sure you <b>do not</b> let etc-update
829     update config files you have edited)</comment>
830     mybox etc # <i>etc-update</i>
831    
832     <comment>(If perl has been updated, you should run the perl-cleaner script)</comment>
833     mybox etc # <i>time perl-cleaner all</i>
834     real 1m6.495s
835     user 0m42.699s
836     sys 0m10.641s
837    
838     <comment>(In case of a major upgrade of python, you should run the python-updater script)</comment>
839     mybox etc # <i>python-updater</i>
840     </pre>
841    
842 swift 1.38 </body>
843     </section>
844     <section>
845 neysx 1.52 <title>What to do next</title>
846 swift 1.38 <body>
847    
848     <p>
849 neysx 1.52 Depending on what your new Gentoo machine is supposed to do, you will probably
850     want to install server applications or a desktop system. Just as an example,
851     <c>emerge gnome</c> and <c>emerge kde</c> have been timed on the ~x86 system
852     installed as describe above. Both have been installed from the same starting
853     point.
854 swift 1.38 </p>
855    
856     <p>
857 neysx 1.52 You should check our <uri link="/doc/en/">documentation index</uri> to find out
858     how to install and configure the applications of your choice.
859 swift 1.38 </p>
860 swift 1.1
861 neysx 1.52 <impo>
862     The following is only an example. It is in no way meant as a recommended setup.
863     </impo>
864    
865     <pre caption="Emerge GNOME">
866     mybox etc # <i>emerge -vp gnome</i>
867     <comment>(Look at the list of packages and their USE flags,
868     then edit make.conf if required.</comment>
869     mybox etc # <i>nano -w /etc/make.conf</i>
870 rane 1.58 <comment>(The following USE flags have been defined)</comment>
871 neysx 1.52 USE="nptl nptlonly -ipv6 -fortran unicode svg hal dbus \
872 nightmorph 1.65 -kde -qt3 -qt4 -arts -eds -esd gnome gstreamer gtk firefox"
873 neysx 1.52
874     mybox etc # <i>time emerge gnome</i>
875     <comment>(326 packages have been emerged)</comment>
876    
877     real 520m44.532s
878     user 339m21.144s
879     sys 146m22.337s
880     </pre>
881    
882     <pre caption="Emerge KDE">
883     mybox etc # <i>emerge -vp kde-meta</i>
884     <comment>(Look at the list of packages and their USE flags,
885     then edit make.conf if required.</comment>
886     mybox etc # <i>nano -w /etc/make.conf</i>
887     <comment>The following USE flags have been defined)</comment>
888     USE="nptl nptlonly -ipv6 -fortran unicode svg hal dbus \
889 nightmorph 1.65 kde qt3 qt4 -arts -eds -esd -gnome -gstreamer -gtk -firefox"
890 neysx 1.52
891     mybox etc # <i>time emerge kde-meta</i>
892     <comment>(391 packages have been emerged)</comment>
893    
894     real 1171m25.318s
895     user 851m26.393s
896     sys 281m45.629s
897     </pre>
898 neysx 1.31
899 aaby 1.7 </body>
900     </section>
901 neysx 1.49 </chapter>
902 swift 1.1 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20