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

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

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

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

Legend:
Removed from v.1.79  
changed lines
  Added in v.1.80

  ViewVC Help
Powered by ViewVC 1.1.20