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

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

  ViewVC Help
Powered by ViewVC 1.1.20