1 |
neysx 06/05/27 13:16:23 |
2 |
|
3 |
Modified: gentoo-x86-quickinstall.xml |
4 |
Added: gentoo-x86+raid+lvm2-quickinstall.xml |
5 |
Log: |
6 |
#123290 New x86 quickinstall guide & a bonus one w/ softraid+lvm2 |
7 |
|
8 |
Revision Changes Path |
9 |
1.52 xml/htdocs/doc/en/gentoo-x86-quickinstall.xml |
10 |
|
11 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml?rev=1.52&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
12 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml?rev=1.52&content-type=text/plain&cvsroot=gentoo |
13 |
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml.diff?r1=1.51&r2=1.52&cvsroot=gentoo |
14 |
|
15 |
Index: gentoo-x86-quickinstall.xml |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v |
18 |
retrieving revision 1.51 |
19 |
retrieving revision 1.52 |
20 |
diff -u -r1.51 -r1.52 |
21 |
--- gentoo-x86-quickinstall.xml 18 Feb 2006 19:26:05 -0000 1.51 |
22 |
+++ gentoo-x86-quickinstall.xml 27 May 2006 13:16:23 -0000 1.52 |
23 |
@@ -1,28 +1,69 @@ |
24 |
<?xml version='1.0' encoding="UTF-8"?> |
25 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v 1.51 2006/02/18 19:26:05 nightmorph Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v 1.52 2006/05/27 13:16:23 neysx Exp $ --> |
27 |
|
28 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
29 |
|
30 |
-<guide link="/doc/en/gentoo-x86-quickinstall.xml"> |
31 |
+<guide link="/doc/en/gentoo-x86-quickinstall.xml" lang="en"> |
32 |
<title>Gentoo Linux x86 Quick Install Guide</title> |
33 |
|
34 |
<author title="Author"> |
35 |
+ <mail link="neysx@g.o">Xavier Neys</mail> |
36 |
+</author> |
37 |
+<author title="Author"> |
38 |
<mail link="swift@g.o">Sven Vermeulen</mail> |
39 |
</author> |
40 |
<author title="Author">Steven Wagner</author> |
41 |
|
42 |
<abstract> |
43 |
-The Quick install guide covers the Gentoo install process in a |
44 |
-non-verbose manner. Users should already have prior experience with |
45 |
-installing Gentoo Linux if they want to follow this guide. |
46 |
+The Quick install guide covers the Gentoo install process in a non-verbose |
47 |
+manner. Its purpose is to allow users to perform a stage3 install in no time. |
48 |
+Users should already have prior experience with installing Gentoo Linux if they |
49 |
+want to follow this guide. |
50 |
</abstract> |
51 |
|
52 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
53 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
54 |
<license/> |
55 |
|
56 |
-<version>2.10</version> |
57 |
-<date>2006-02-18</date> |
58 |
+<version>3</version> |
59 |
+<date>2006-05-15</date> |
60 |
+ |
61 |
+<chapter> |
62 |
+<title>Introduction</title> |
63 |
+<section> |
64 |
+<body> |
65 |
+ |
66 |
+<p> |
67 |
+This guide contains all commands you should use to complete a stage3 |
68 |
+installation of Gentoo. You need a connection to the Internet to download the |
69 |
+stage3 and Portage snapshots. |
70 |
+</p> |
71 |
+ |
72 |
+<p> |
73 |
+Timing output follows all commands that take more than a couple of seconds to |
74 |
+finish. Commands were timed on an AMD 2000 1.66 Ghz PC with 512 Mb of RAM and |
75 |
+two SATA disks connected to a hardware controller. |
76 |
+</p> |
77 |
+ |
78 |
+<pre caption="Test box specs"> |
79 |
+<comment>(The following specs and the timing information should help you determine |
80 |
+a rough estimate of the time you need to complete your install)</comment> |
81 |
+ |
82 |
+# <i>grep bogo /proc/cpuinfo</i> |
83 |
+bogomip : 3337.81 |
84 |
+ |
85 |
+# <i>hdparm -tT /dev/sda</i> |
86 |
+/dev/sda: |
87 |
+ Timing cached reads: 1100 MB in 2.00 seconds = 549.97 MB/sec |
88 |
+ Timing buffered disk reads: 224 MB in 3.01 seconds = 74.36 MB/sec |
89 |
+ |
90 |
+# <i>grep MemTotal /proc/meminfo</i> |
91 |
+MemTotal: 509248 kB |
92 |
+</pre> |
93 |
+ |
94 |
+</body> |
95 |
+</section> |
96 |
+</chapter> |
97 |
|
98 |
<chapter> |
99 |
<title>Quick Install Guide</title> |
100 |
@@ -32,25 +73,67 @@ |
101 |
|
102 |
<p> |
103 |
Download a CD from one of our <uri link="/main/en/mirrors.xml">mirrors</uri>. |
104 |
-You can find the ISOs in |
105 |
-<path>releases/<architecture>/<release>/installcd</path>. The |
106 |
-<e>minimal</e> installation CD is only useful for Internet-based installations; |
107 |
-with the <e>universal</e> installation CD you can perform a networkless |
108 |
-installation as well. |
109 |
+You can find the minimal CD ISO in |
110 |
+<path>releases/x86/<release>/installcd</path> or the LiveCD ISO in |
111 |
+<path>releases/x86/<release>/livecd</path>. The <e>minimal</e> |
112 |
+installation CD is only useful for Internet-based installations. You can use |
113 |
+the <e>LiveCD</e> to perform a networkless installation as documented in the |
114 |
+<uri link="/doc/en/handbook/2006.0/handbook-x86.xml">2006.0 x86 installation |
115 |
+handbook</uri>. The minimal CD is recommended. |
116 |
</p> |
117 |
|
118 |
<p> |
119 |
-<uri link="/doc/en/faq.xml#isoburning">Burn</uri> the CD and boot it. Press |
120 |
-<c>F2</c> at the boot screen to find out what boot options exist. Once booted, |
121 |
-you need to start the <c>pcmcia</c> init script if you need PCMCIA support. |
122 |
+<uri link="/doc/en/faq.xml#isoburning">Burn</uri> the CD and boot it. |
123 |
</p> |
124 |
|
125 |
+</body> |
126 |
+</section> |
127 |
+<section> |
128 |
+<title>Booting the CD</title> |
129 |
+<body> |
130 |
+ |
131 |
<p> |
132 |
-The installation CDs allow you to start an <c>sshd</c> server, add additional |
133 |
-users, run <c>irssi</c> (a command-line chat client) and surf the web using |
134 |
-<c>lynx</c> or <c>links</c>. |
135 |
+Press |
136 |
+<c>F2</c> at the boot screen to find out what boot options exist. You can |
137 |
+either start <c>gentoo</c> or <c>gentoo-nofb</c>, the latter disables the |
138 |
+framebuffer. If you booted the LiveCD, don't forget to add the <c>nox</c> |
139 |
+option to prevent the X graphical environment from starting. Several options |
140 |
+allow to enable or disable some features. If all goes well, your hardware will |
141 |
+be detected and all modules will be loaded. If the kernel fails to boot |
142 |
+properly or if your computer hangs during the boot procedure, you may have to |
143 |
+experience with different configurations. The safest way is probably to use the |
144 |
+<c>nodetect</c> option and then load required modules explicitely. |
145 |
+</p> |
146 |
+ |
147 |
+<pre caption="Boot the minimal CD"> |
148 |
+Gentoo Linux Installation LiveCD http://www.gentoo.org |
149 |
+Enter to Boot; F1 for kernels F2 for options. |
150 |
+boot: <i>gentoo-nofb</i> |
151 |
+ <comment>(or in case of problems)</comment> |
152 |
+boot: <i>gentoo-nofb nodetect</i> |
153 |
+</pre> |
154 |
+ |
155 |
+</body> |
156 |
+</section> |
157 |
+<section> |
158 |
+<title>Optional: loading modules</title> |
159 |
+<body> |
160 |
+ |
161 |
+<p> |
162 |
+If you used the <c>nodetect</c> option, once booted, load the required modules. |
163 |
+You need to enable networking and have access to your disks. The <c>lspci</c> |
164 |
+command can help you identify your hardware. |
165 |
</p> |
166 |
|
167 |
+<pre caption="Load required modules"> |
168 |
+livecd root # <i>lspci</i> |
169 |
+<comment>(Use lspci's output to identify required modules)</comment> |
170 |
+ |
171 |
+<comment>(The following is an example, adapt it to your hardware)</comment> |
172 |
+livecd root # <i>modprobe 3w-9xxx</i> |
173 |
+livecd root # <i>modprobe r8169</i> |
174 |
+</pre> |
175 |
+ |
176 |
</body> |
177 |
</section> |
178 |
<section> |
179 |
@@ -77,6 +160,80 @@ |
180 |
<c>export http_proxy</c>, <c>ftp_proxy</c> and <c>RSYNC_PROXY</c>. |
181 |
</p> |
182 |
|
183 |
+<pre caption="Configure networking the guided way"> |
184 |
+livecd root # <i>net-setup eth0</i> |
185 |
+</pre> |
186 |
+ |
187 |
+<p> |
188 |
+Alternatively, you can start networking manually. The following example assigns |
189 |
+the IP addess 192.168.1.10 to your PC and defines 192.168.1.1 as your router |
190 |
+and name server. |
191 |
+</p> |
192 |
+ |
193 |
+<pre caption="Configure networking the manual way"> |
194 |
+livecd root # <i>ifconfig eth0 192.168.1.10/24</i> |
195 |
+livecd root # <i>route add default gw 192.168.1.1</i> |
196 |
+livecd root # <i>echo nameserver 192.168.1.1 > /etc/resolv.conf</i> |
197 |
+</pre> |
198 |
+ |
199 |
+<p> |
200 |
+The installation CD allows you to start an <c>sshd</c> server, add additional |
201 |
+users, run <c>irssi</c> (a command-line chat client) and surf the web using |
202 |
+<c>lynx</c> or <c>links</c>. |
203 |
+</p> |
204 |
+ |
205 |
+</body> |
206 |
+</section> |
207 |
+<section> |
208 |
+<title>Optional: connect to your new box over ssh</title> |
209 |
+<body> |
210 |
+ |
211 |
+<p> |
212 |
+The most interesting feature is of course <c>sshd</c>. You can start it and |
213 |
+then connect from another machine and cut and paste commands from this guide. |
214 |
+</p> |
215 |
+ |
216 |
+<pre caption="Start sshd"> |
217 |
+livecd root # <i>time /etc/init.d/sshd start</i> |
218 |
+ * Generating hostkey ... |
219 |
+<comment>(sshd generates the key and displays more output)</comment> |
220 |
+ * starting sshd ... [ok] |
221 |
+ |
222 |
+real 0m13.688s |
223 |
+user 0m9.420s |
224 |
+sys 0m0.090s |
225 |
+</pre> |
226 |
+ |
227 |
+<p> |
228 |
+Now, set the root password on the liveCD so that you can connect to it from |
229 |
+another PC. Please note that allowing root to connect over ssh is not |
230 |
+recommended under normal circumstances. If you can't trust your local network, |
231 |
+use a long and complex password, you should use it only once as it will |
232 |
+disappear after your first rebot. |
233 |
+</p> |
234 |
+ |
235 |
+<pre caption="Set the root password"> |
236 |
+livecd root # <i>passwd</i> |
237 |
+New UNIX password: <comment>type_a_password</comment> |
238 |
+Retype new UNIX password: <comment>type_a_password</comment> |
239 |
+passwd: password updated successfully |
240 |
+</pre> |
241 |
+ |
242 |
+<p> |
243 |
+Now, you can start a terminal on another PC and connect to your new box, follow |
244 |
+the rest of this guide in another window, and cut and paste commands. |
245 |
+</p> |
246 |
+ |
247 |
+<pre caption="Connect to your new box from another PC"> |
248 |
+<comment>(Use the IP addess of your new box)</comment> |
249 |
+$ <i>ssh root@192.168.1.10</i> |
250 |
+The authenticity of host '192.168.1.10 (192.168.1.10)' can't be established. |
251 |
+RSA key fingerprint is 96:e7:2d:12:ac:9c:b0:94:90:9f:40:89:b0:45:26:8f. |
252 |
+Are you sure you want to continue connecting (yes/no)? <i>yes</i> |
253 |
+Warning: Permanently added '192.168.1.10' (RSA) to the list of known hosts. |
254 |
+Password: <comment>type_the_password</comment> |
255 |
+</pre> |
256 |
+ |
257 |
</body> |
258 |
</section> |
259 |
<section> |
260 |
@@ -85,8 +242,28 @@ |
261 |
|
262 |
<p> |
263 |
Use <c>fdisk</c> or <c>cfdisk</c> to create your partition layout. You need at |
264 |
-least a swap partition (type 82) and one Linux partition (type 83). |
265 |
-</p> |
266 |
+least a swap partition (type 82) and one Linux partition (type 83). The |
267 |
+following scenario creates a <path>/boot</path>, a swap and a main partition |
268 |
+as used in our handbook. The device name is likely to be either |
269 |
+<path>/dev/sda</path> for a SATA or SCSI disk, or <path>/dev/hda</path> for an |
270 |
+IDE disk. |
271 |
+</p> |
272 |
+ |
273 |
+<pre caption="Create the partitions"> |
274 |
+livecd ~ # <i>fdisk /dev/sda</i> |
275 |
+ |
276 |
+<comment>(The rest of this guide uses the following partitioning scheme)</comment> |
277 |
+livecd ~ # <i>fdisk -l /dev/sda</i> |
278 |
+ |
279 |
+Disk /dev/sda: 599.9 GB, 599978409984 bytes |
280 |
+255 heads, 63 sectors/track, 72943 cylinders |
281 |
+Units = cylinders of 16065 * 512 = 8225280 bytes |
282 |
+ |
283 |
+ Device Boot Start End Blocks Id System |
284 |
+/dev/sda1 1 12 96358+ 83 Linux |
285 |
+/dev/sda2 13 110 787185 82 Linux swap / Solaris |
286 |
+/dev/sda3 111 72943 585031072+ 83 Linux |
287 |
+</pre> |
288 |
|
289 |
<p> |
290 |
Use <c>mke2fs</c>, <c>mke2fs -j</c>, <c>mkreiserfs</c>, <c>mkfs.xfs</c> and |
291 |
@@ -94,12 +271,29 @@ |
292 |
swap partition using <c>mkswap</c> and <c>swapon</c>. |
293 |
</p> |
294 |
|
295 |
+<pre caption="Create the file systems and activate swap"> |
296 |
+<comment>(ext2 is all you need on the /boot partition)</comment> |
297 |
+livecd ~ # <i>mke2fs /dev/sda1</i> |
298 |
+ |
299 |
+<comment>(Let's use ext3 on the main partition)</comment> |
300 |
+livecd ~ # <i>mke2fs -j -O dir_index /dev/sda3</i> |
301 |
+ |
302 |
+<comment>(Create and activate swap)</comment> |
303 |
+livecd ~ # <i>mkswap /dev/sda2 && swapon /dev/sda2</i> |
304 |
+</pre> |
305 |
+ |
306 |
<p> |
307 |
Mount the freshly created file systems on <path>/mnt/gentoo</path>. Create |
308 |
directories for the other mount points (like <path>/mnt/gentoo/boot</path>) if |
309 |
-you need them. |
310 |
+you need them and mount them too. |
311 |
</p> |
312 |
|
313 |
+<pre caption="Mount the file systems"> |
314 |
+livecd ~ # <i>mount /dev/sda3 /mnt/gentoo</i> |
315 |
+livecd ~ # <i>mkdir /mnt/gentoo/boot</i> |
316 |
+livecd ~ # <i>mount /dev/sda1 /mnt/gentoo/boot</i> |
317 |
+</pre> |
318 |
+ |
319 |
</body> |
320 |
</section> |
321 |
<section> |
322 |
@@ -107,157 +301,232 @@ |
323 |
<body> |
324 |
|
325 |
<p> |
326 |
-First make sure your date is set correctly using <c>date MMDDhhmmYYYY</c>. Next, |
327 |
-download a stage from one of our <uri link="/main/en/mirrors.xml">mirrors</uri> |
328 |
-or use the one available on the installation CD |
329 |
-(<path>/mnt/cdrom/stages</path>). Go to <path>/mnt/gentoo</path> and unpack the |
330 |
-stage using <c>tar -xvjpf <stage tarball></c>. |
331 |
+First make sure your date and time is set correctly using <c>date |
332 |
+MMDDhhmmYYYY</c>. Use UTC time. |
333 |
</p> |
334 |
|
335 |
-<p> |
336 |
-Install a Portage snapshot if you are performing a networkless installation: go |
337 |
-to <path>/mnt/gentoo/usr</path> and run |
338 |
-<c>tar -xvjf /mnt/cdrom/snapshots/<snapshot></c>. Other users |
339 |
-can download a portage snapshot and install it likewise. |
340 |
-</p> |
341 |
+<pre caption="Set the date and UTC time"> |
342 |
+<comment>(Check the clock)</comment> |
343 |
+livecd ~ # <i>date</i> |
344 |
+Mon Mar 6 00:14:13 UTC 2006 |
345 |
+ |
346 |
+<comment>(Set the current date and time if required)</comment> |
347 |
+livecd ~ # <i>date 030600162006</i> <comment>(Format is MMDDhhmmYYYY)</comment> |
348 |
+Mon Mar 6 00:16:00 UTC 2006 |
349 |
+</pre> |
350 |
|
351 |
<p> |
352 |
-For a networkless installation, copy over the source code files from |
353 |
-<path>/mnt/cdrom/distfiles/</path> to |
354 |
-<path>/mnt/gentoo/usr/portage/distfiles/</path>. |
355 |
+Next, download a stage from one of our <uri |
356 |
+link="/main/en/mirrors.xml">mirrors</uri>. Go to <path>/mnt/gentoo</path> and |
357 |
+unpack the stage using <c>tar xjpf <stage3 tarball></c>. |
358 |
</p> |
359 |
|
360 |
+<pre caption="Download a stage3 archive"> |
361 |
+livecd ~ # <i>cd /mnt/gentoo</i> |
362 |
+livecd gentoo # <i>links http://www.gentoo.org/main/en/mirrors.xml</i> |
363 |
+<comment>(Pick a mirror, move to the releases/x86/current/stages directory |
364 |
+highlight the stage3 of your choice, probably stage3-i686-2006.0.tar.bz2 |
365 |
+and press D to download it)</comment> |
366 |
+ |
367 |
+<comment>(<b>Or</b> download it directly with wget without choosing a nearby mirror)</comment> |
368 |
+livecd ~ # <i>cd /mnt/gentoo</i> |
369 |
+livecd gentoo # <i>wget http://gentoo.osuosl.org/releases/x86/current/stages/stage3-i686-2006.0.tar.bz2</i> |
370 |
+</pre> |
371 |
+ |
372 |
+<pre caption="Unpack the stage3 archive"> |
373 |
+livecd gentoo # <i>time tar xjpf stage3*</i> |
374 |
+ |
375 |
+real 1m13.157s |
376 |
+user 1m2.920s |
377 |
+sys 0m7.230s |
378 |
+</pre> |
379 |
+ |
380 |
<p> |
381 |
-Edit <path>/mnt/gentoo/etc/make.conf</path> to suit your needs (USE flags, |
382 |
-CFLAGS and CXXFLAGS). You can use the <c>nano</c> editor for this. |
383 |
+Install the latest Portage snapshot. Proceed as for the stage3 archive: choose |
384 |
+a nearby mirror from our <uri link="/main/en/mirrors.xml">list</uri>, download |
385 |
+the latest snapshot and unpack it. |
386 |
</p> |
387 |
|
388 |
+<pre caption="Download the latest Portage snapshot"> |
389 |
+livecd gentoo # <i>cd /mnt/gentoo/usr</i> |
390 |
+livecd usr # <i>links http://www.gentoo.org/main/en/mirrors.xml</i> |
391 |
+<comment>(Pick a mirror, move to the snapshots/ directory, |
392 |
+highlight <b>portage-latest.tar.bz2</b> and press D to download it)</comment> |
393 |
+ |
394 |
+<comment>(<b>Or</b> download it directly with wget without choosing a nearby mirror)</comment> |
395 |
+livecd gentoo # <i>cd /mnt/gentoo/usr</i> |
396 |
+livecd usr # <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i> |
397 |
+</pre> |
398 |
+ |
399 |
+<pre caption="Unpack the Portage snapshot"> |
400 |
+livecd usr # <i>time tar xjf portage*</i> |
401 |
+ |
402 |
+real 0m51.523s |
403 |
+user 0m28.680s |
404 |
+sys 0m12.840s |
405 |
+</pre> |
406 |
+ |
407 |
</body> |
408 |
</section> |
409 |
<section> |
410 |
-<title>Installing the Gentoo Base System</title> |
411 |
+<title>Chrooting</title> |
412 |
<body> |
413 |
|
414 |
<p> |
415 |
-Mount the <path>/proc</path> file system first, copy over the |
416 |
-<path>/etc/resolv.conf</path> file and then chroot into your Gentoo |
417 |
-environment. |
418 |
+Mount the <path>/proc</path> file system, copy over the |
419 |
+<path>/etc/resolv.conf</path> file, then chroot into your Gentoo environment. |
420 |
</p> |
421 |
|
422 |
-<pre caption="Preparing and chrooting"> |
423 |
-# <i>mount -t proc none /mnt/gentoo/proc</i> |
424 |
-# <i>cp /etc/resolv.conf /mnt/gentoo/etc/</i> |
425 |
-# <i>chroot /mnt/gentoo /bin/bash</i> |
426 |
-# <i>env-update</i> && <i>source /etc/profile</i> |
427 |
+<pre caption="Chroot"> |
428 |
+livecd usr # <i>cd /</i> |
429 |
+livecd / # <i>mount -t proc proc /mnt/gentoo/proc</i> |
430 |
+livecd / # <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/</i> |
431 |
+livecd / # <i>chroot /mnt/gentoo /bin/bash</i> |
432 |
+livecd / # <i>env-update && source /etc/profile</i> |
433 |
+>>> Regenerating /etc/ld.so.cache... |
434 |
</pre> |
435 |
|
436 |
-<p> |
437 |
-If you are not running a networkless installation, issue <c>emerge --sync</c> to |
438 |
-update your Portage tree. |
439 |
-</p> |
440 |
+</body> |
441 |
+</section> |
442 |
+<section> |
443 |
+<title>Set your timezone</title> |
444 |
+<body> |
445 |
|
446 |
<p> |
447 |
-Next, make sure <path>/etc/make.profile</path> points to the right profile. The |
448 |
-default one should suffice for most users; sub profiles are available for |
449 |
-different kernels (like <path>2.4/</path> for 2.4-kernel based profiles). Change |
450 |
-the profile using <c>ln -sfn</c>. |
451 |
+Set your time zone information by copying the correct file from |
452 |
+<path>/usr/share/zoneinfo</path> over the <path>/etc/localtime</path> file. |
453 |
</p> |
454 |
|
455 |
-<ul> |
456 |
- <li> |
457 |
- Bootstrapping (not available for networkless installations) happens using |
458 |
- <c>scripts/bootstrap.sh</c> in the <path>/usr/portage</path> directory. |
459 |
- </li> |
460 |
- <li> |
461 |
- System installation (not available for networkless installations) happens |
462 |
- using <c>emerge -e system</c> (or <c>-N</c> if you haven't |
463 |
- altered the default CFLAGS/CXXFLAGS). |
464 |
- </li> |
465 |
-</ul> |
466 |
+<pre caption="Copy your timezone file"> |
467 |
+<comment>(Using Brussels as an example)</comment> |
468 |
+livecd / # <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i> |
469 |
+livecd / # <i>date</i> |
470 |
+Wed Mar 8 00:46:05 CET 2006 |
471 |
+</pre> |
472 |
|
473 |
</body> |
474 |
</section> |
475 |
<section> |
476 |
-<title>Kernel Configuration</title> |
477 |
+<title>Set your host and domain name</title> |
478 |
<body> |
479 |
|
480 |
<p> |
481 |
-Set your time zone information by copying correct file from |
482 |
-<path>/usr/share/zoneinfo</path> over the <path>/etc/localtime</path> file. |
483 |
-</p> |
484 |
- |
485 |
-<p> |
486 |
-Install a kernel source (<c>gentoo-sources</c> and <c>vanilla-sources</c> are |
487 |
-available for networkless installations) and configure it using <c>make |
488 |
-menuconfig</c> followed by |
489 |
-<c>make && make modules_install</c> inside |
490 |
-<path>/usr/src/linux</path>. Copy the <path>arch/i386/boot/bzImage</path> file |
491 |
-over to <path>/boot</path>. You can also <c>emerge genkernel</c> and use |
492 |
-<c>genkernel all</c>. |
493 |
+Set your host name in <path>/etc/conf.d/hostname</path> and |
494 |
+<path>/etc/hosts</path>. In the following example, we use <c>mybox</c> as host |
495 |
+name and <c>at.myplace</c> as domain name. You can either edit the config |
496 |
+files with <c>nano</c> or use the following commands: |
497 |
</p> |
498 |
|
499 |
-<p> |
500 |
-Genkernel users will need to <c>emerge coldplug</c> and |
501 |
-<c>rc-update add coldplug default</c>. |
502 |
-</p> |
503 |
+<pre caption="Set host and domain name"> |
504 |
+livecd / # <i>cd /etc</i> |
505 |
+livecd etc # <i>echo "127.0.0.1 mybox.at.myplace mybox localhost" > hosts</i> |
506 |
+livecd etc # <i>sed -i -e 's/HOSTNAME.*/HOSTNAME="mybox"/' conf.d/hostname</i> |
507 |
+<comment>(Use defined host name and check)</comment> |
508 |
+livecd etc # <i>hostname mybox</i> |
509 |
+livecd etc # <i>hostname -f</i> |
510 |
+mybox.at.myplace |
511 |
+</pre> |
512 |
|
513 |
</body> |
514 |
</section> |
515 |
<section> |
516 |
-<title>Configuring the System</title> |
517 |
+<title>Kernel Configuration</title> |
518 |
<body> |
519 |
|
520 |
<p> |
521 |
-Edit your <path>/etc/fstab</path>; an example follows: |
522 |
-</p> |
523 |
+Install a kernel source (usually <c>gentoo-sources</c> or |
524 |
+<c>vanilla-sources</c>), configure it, compile it and copy the |
525 |
+<path>arch/i386/boot/bzImage</path> file to <path>/boot</path>. |
526 |
+</p> |
527 |
+ |
528 |
+<pre caption="Install a kernel source, compile it and install the kernel"> |
529 |
+livecd / # <i>time emerge gentoo-sources</i> |
530 |
+ |
531 |
+real 2m51.435s |
532 |
+user 0m58.220s |
533 |
+sys 0m29.890s |
534 |
+livecd / # <i>cd /usr/src/linux</i> |
535 |
+livecd linux # <i>make menuconfig</i> |
536 |
+<comment>(Configure your kernel)</comment> |
537 |
+livecd linux # <i>time make -j2</i> |
538 |
+ |
539 |
+<comment>(Elapsed time depends highly on the options you selected)</comment> |
540 |
+real 3m51.962s |
541 |
+user 3m27.060s |
542 |
+sys 0m24.310s |
543 |
|
544 |
-<pre caption="Example fstab"> |
545 |
-/dev/hda1 /boot ext2 defaults,noatime 1 2 |
546 |
-/dev/hda2 none swap sw 0 0 |
547 |
-/dev/hda3 / ext3 noatime 0 1 |
548 |
-none /proc proc defaults 0 0 |
549 |
-none /dev/shm tmpfs nodev,nosuid,noexec 0 0 |
550 |
-/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0 |
551 |
+livecd linux # <i>make modules_install</i> |
552 |
+livecd linux # <i>cp arch/i386/boot/bzImage /boot/kernel</i> |
553 |
</pre> |
554 |
|
555 |
-<p> |
556 |
-Edit <path>/etc/conf.d/hostname</path> and <path>/etc/conf.d/domainname</path>, |
557 |
-run <c>rc-update add domainname default</c> and edit |
558 |
-<path>/etc/conf.d/net</path> to |
559 |
-configure your network. Add the <c>net.eth0</c> init script to the default |
560 |
-run level. If you have multiple NICs, symlink them to the <c>net.eth0</c> |
561 |
-init script and add them to the default run level as well. |
562 |
-</p> |
563 |
+</body> |
564 |
+</section> |
565 |
+<section> |
566 |
+<title>Configure the system</title> |
567 |
+<body> |
568 |
|
569 |
<p> |
570 |
-Edit <path>/etc/hosts</path>; examples are given below: |
571 |
+Edit your <path>/etc/fstab</path> and replace <c>BOOT</c>, <c>ROOT</c> and |
572 |
+<c>SWAP</c> with the actual partition names. Don't forget to check that the |
573 |
+file systems match your installation. |
574 |
</p> |
575 |
|
576 |
-<pre caption="Example /etc/hosts"> |
577 |
-<comment>(For static IPs)</comment> |
578 |
-127.0.0.1 localhost |
579 |
-192.168.0.5 jenny.homenetwork jenny |
580 |
-192.168.0.6 benny.homenetwork benny |
581 |
-192.168.0.7 tux.homenetwork tux |
582 |
- |
583 |
-<comment>(For a dynamic IP)</comment> |
584 |
-127.0.0.1 localhost.homenetwork tux localhost |
585 |
+<pre caption="Example fstab"> |
586 |
+livecd linux # <i>cd /etc</i> |
587 |
+livecd etc # <i>nano -w fstab</i> |
588 |
+/dev/<i>sda1</i> /boot ext2 noauto,noatime 1 2 |
589 |
+/dev/<i>sda3</i> / ext3 noatime 0 1 |
590 |
+/dev/<i>sda2</i> none swap sw 0 0 |
591 |
</pre> |
592 |
|
593 |
<p> |
594 |
+Configure your network in <path>/etc/conf.d/net</path>. Add the <c>net.eth0</c> |
595 |
+init script to the default run level. If you have multiple NICs, symlink them |
596 |
+to the <c>net.eth0</c> init script and add them to the default run level as |
597 |
+well. Either edit <path>/etc/conf.d/net</path> with <c>nano</c> or use the |
598 |
+following commands: |
599 |
+</p> |
600 |
+ |
601 |
+<pre caption="Configure networking"> |
602 |
+livecd etc # <i>cd conf.d</i> |
603 |
+livecd conf.d # <i>echo 'config_eth0=( "192.168.1.10/24" )' >> net</i> |
604 |
+livecd conf.d # <i>echo 'routes_eth0=( "default via 192.168.1.1" )' >> net</i> |
605 |
+livecd conf.d # <i>rc-update add net.eth0 default</i> |
606 |
+<comment>(If you compiled your network card driver as a module, |
607 |
+add it to /etc/modules.autoload.d/kernel-2.6)</comment> |
608 |
+livecd conf.d # <i>echo r8169 >> /etc/modules.autoload.d/kernel-2.6</i> |
609 |
+<comment>(If you want to reconnect via ssh after you have rebooted your new box:)</comment> |
610 |
+livecd conf.d # <i>rc-update add sshd default</i> |
611 |
+</pre> |
612 |
+ |
613 |
+<note> |
614 |
Emerge <c>pcmcia-cs</c> and add it to the default run level if you need it. |
615 |
-</p> |
616 |
+</note> |
617 |
|
618 |
<p> |
619 |
Set the root password using <c>passwd</c>. |
620 |
</p> |
621 |
|
622 |
+<pre caption="Set the root password"> |
623 |
+livecd conf.d # <i>passwd</i> |
624 |
+New UNIX password: <comment>type_the_password</comment> |
625 |
+Retype new UNIX password: <comment>type_the_password_again</comment> |
626 |
+passwd: password updated successfully |
627 |
+</pre> |
628 |
+ |
629 |
<p> |
630 |
-Set the necessary system configuration in <path>/etc/rc.conf</path>, |
631 |
+Check the system configuration in <path>/etc/rc.conf</path>, |
632 |
<path>/etc/conf.d/rc</path>, <path>/etc/conf.d/keymaps</path>, |
633 |
-<path>/etc/conf.d/clock</path>. |
634 |
+<path>/etc/conf.d/clock</path> and edit any of those files if required. |
635 |
</p> |
636 |
|
637 |
+<pre caption="Optional: edit some config files"> |
638 |
+livecd conf.d # <i>nano -w /etc/rc.conf</i> |
639 |
+livecd conf.d # <i>nano -w /etc/conf.d/rc</i> |
640 |
+livecd conf.d # <i>nano -w /etc/conf.d/keymaps</i> |
641 |
+livecd conf.d # <i>nano -w /etc/conf.d/clock</i> |
642 |
+</pre> |
643 |
+ |
644 |
</body> |
645 |
</section> |
646 |
<section> |
647 |
@@ -265,20 +534,41 @@ |
648 |
<body> |
649 |
|
650 |
<p> |
651 |
-Users of a 2.4 kernel need to run <c>emerge --unmerge udev</c> and |
652 |
-<c>emerge devfsd</c>. |
653 |
+Install a system logger like <c>syslog-ng</c> and a cron daemon like |
654 |
+<c>vixie-cron</c>, and add them to the default run level. |
655 |
</p> |
656 |
|
657 |
-<p> |
658 |
-Install a system logger like <c>syslog-ng</c> and add it to the default |
659 |
-run level. Do the same for a cron daemon like <c>vixie-cron</c> (optional). |
660 |
-</p> |
661 |
+<note> |
662 |
+Cron daemons depend on an MTA. <c>mail-mta/ssmtp</c> will be pulled in as a |
663 |
+dependency. If you want to use a more advanced MTA, you might want to install |
664 |
+it now. If you are in a hurry, let ssmtp be installed and remove it later when |
665 |
+you install the MTA of your choice. |
666 |
+</note> |
667 |
+ |
668 |
+<pre caption="Install a syslogger and a cron daemon"> |
669 |
+livecd conf.d # <i>time emerge syslog-ng vixie-cron</i> |
670 |
+ |
671 |
+real 1m52.699s |
672 |
+user 1m1.630s |
673 |
+sys 0m35.220s |
674 |
+livecd conf.d # <i>rc-update add syslog-ng default</i> |
675 |
+livecd conf.d # <i>rc-update add vixie-cron default</i> |
676 |
+</pre> |
677 |
|
678 |
<p> |
679 |
Install the necessary file system tools (<c>xfsprogs</c>, <c>reiserfsprogs</c> |
680 |
-or <c>jfsutils</c>) and networking tools (<c>dhcpcd</c> or <c>rp-pppoe</c>). |
681 |
+or <c>jfsutils</c>) and networking tools (<c>dhcpcd</c> or <c>rp-pppoe</c>) if |
682 |
+you need any. |
683 |
</p> |
684 |
|
685 |
+<pre caption="Install extra tools if required"> |
686 |
+livecd conf.d # <i>emerge xfsprogs</i> <comment>(If you use the XFS file system)</comment> |
687 |
+livecd conf.d # <i>emerge jfsutils</i> <comment>(If you use the JFS file system)</comment> |
688 |
+livecd conf.d # <i>emerge reiserfsprogs</i> <comment>(If you use the Reiser file system)</comment> |
689 |
+livecd conf.d # <i>emerge dhcpcd</i> <comment>(If you need a DHCP client)</comment> |
690 |
+livecd conf.d # <i>USE="-X" emerge rp-pppoe</i> <comment>(If you need PPPoE ADSL connectivity)</comment> |
691 |
+</pre> |
692 |
+ |
693 |
</body> |
694 |
</section> |
695 |
<section> |
696 |
@@ -286,90 +576,344 @@ |
697 |
<body> |
698 |
|
699 |
<p> |
700 |
-Emerge <c>grub</c> or <c>lilo</c>. Edit <path>/boot/grub/grub.conf</path> or |
701 |
-<path>/etc/lilo.conf</path> to your likings. Below you will find an example for |
702 |
-each. |
703 |
+Emerge <c>grub</c> or <c>lilo</c>. Configure either |
704 |
+<path>/boot/grub/grub.conf</path> or <path>/etc/lilo.conf</path> and install |
705 |
+the bootloader you have emerged. |
706 |
+</p> |
707 |
+ |
708 |
+<p> |
709 |
+<b>1. Using grub</b> |
710 |
</p> |
711 |
|
712 |
+<pre caption="Emerge grub and edit its configuration file"> |
713 |
+livecd conf.d # <i>time emerge grub</i> |
714 |
+ |
715 |
+real 1m8.634s |
716 |
+user 0m39.460s |
717 |
+sys 0m15.280s |
718 |
+livecd conf.d # <i>nano -w /boot/grub/grub.conf</i> |
719 |
+</pre> |
720 |
+ |
721 |
<pre caption="Example grub.conf"> |
722 |
default 0 |
723 |
-timeout 30 |
724 |
-splashimage=(hd0,0)/grub/splash.xpm.gz |
725 |
+timeout 10 |
726 |
|
727 |
-<comment># genkernel users</comment> |
728 |
-title=Gentoo Linux 2.6.11-r3 |
729 |
+title=Gentoo |
730 |
root (hd0,0) |
731 |
-kernel /kernel-genkernel-x86-2.6.11-gentoo-r3 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev |
732 |
-initrd /initramfs-genkernel-x86-2.6.11-gentoo-r3 |
733 |
+kernel /boot/kernel root=/dev/sda3 |
734 |
+</pre> |
735 |
|
736 |
-<comment># non-genkernel users (no initrd)</comment> |
737 |
-title=Gentoo Linux 2.6.11 r3 |
738 |
-root (hd0,0) |
739 |
-kernel /kernel-2.6.11-gentoo-r3 root=/dev/hda3 |
740 |
+<pre caption="Install grub"> |
741 |
+livecd conf.d # <i>grub</i> |
742 |
+Probing devices to guess BIOS drives. This may take a long time. |
743 |
+ |
744 |
+grub> <i>root (hd0,0)</i> |
745 |
+ Filesystem type is ext2fs, partition type 0x83 |
746 |
+ |
747 |
+grub> <i>setup (hd0)</i> |
748 |
+ Checking if "/boot/grub/stage1" exists... yes |
749 |
+ Checking if "/boot/grub/stage2" exists... yes |
750 |
+ Checking if "/boot/grub/e2fs_stage1_5" exists... yes |
751 |
+ Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. |
752 |
+succeeded |
753 |
+ Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/ |
754 |
+grub/menu.lst"... succeeded |
755 |
+Done. |
756 |
+ |
757 |
+grub> <i>quit</i> |
758 |
+</pre> |
759 |
+ |
760 |
+<p> |
761 |
+Now, proceed with the <uri link="#reboot">rebooting section</uri>. |
762 |
+</p> |
763 |
+ |
764 |
+<p> |
765 |
+<b>2. Using lilo</b> |
766 |
+</p> |
767 |
|
768 |
-<comment># Only in case you want to dual-boot</comment> |
769 |
-title=Windows XP |
770 |
-root (hd0,5) |
771 |
-makeactive |
772 |
-chainloader +1 |
773 |
+<pre caption="Emerge lilo and edit its configuration file"> |
774 |
+livecd conf.d # <i>time emerge lilo</i> |
775 |
+ |
776 |
+real 0m47.016s |
777 |
+user 0m22.770s |
778 |
+sys 0m5.980s |
779 |
+livecd conf.d # <i>nano -w /etc/lilo.conf</i> |
780 |
</pre> |
781 |
|
782 |
<pre caption="Example lilo.conf"> |
783 |
-boot=/dev/hda |
784 |
+boot=/dev/sda |
785 |
prompt |
786 |
timeout=50 |
787 |
default=gentoo |
788 |
|
789 |
-<comment># For non-genkernel users</comment> |
790 |
-image=/boot/kernel-2.6.11-gentoo-r3 |
791 |
- label=gentoo |
792 |
+image=/boot/kernel |
793 |
+ label=Gentoo |
794 |
read-only |
795 |
- root=/dev/hda3 |
796 |
+ root=/dev/sda3 |
797 |
+</pre> |
798 |
|
799 |
-<comment># For genkernel users</comment> |
800 |
-image=/boot/kernel-genkernel-x86-2.6.11-gentoo-r3 |
801 |
- label=gentoo |
802 |
- read-only |
803 |
- root=/dev/ram0 |
804 |
- append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev" |
805 |
- initrd=/boot/initramfs-genkernel-x86-2.6.11-gentoo-r3 |
806 |
+<pre caption="Install lilo"> |
807 |
+livecd conf.d # <i>lilo</i> |
808 |
+Added Gentoo * |
809 |
+</pre> |
810 |
+ |
811 |
+</body> |
812 |
+</section> |
813 |
+<section id="reboot"> |
814 |
+<title>Reboot</title> |
815 |
+<body> |
816 |
|
817 |
-<comment># For dual-booting</comment> |
818 |
-other=/dev/hda6 |
819 |
- label=windows |
820 |
+<p> |
821 |
+Exit the chrooted environment, unmount all file systems and reboot: |
822 |
+</p> |
823 |
+ |
824 |
+<pre caption="Reboot"> |
825 |
+livecd conf.d # <i>exit</i> |
826 |
+livecd / # <i>umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo</i> |
827 |
+livecd / # <i>reboot</i> |
828 |
+<comment>(Don't forget to remove the CD)</comment> |
829 |
+</pre> |
830 |
+ |
831 |
+</body> |
832 |
+</section> |
833 |
+<section id="after-reboot"> |
834 |
+<title>Finalizing the Installation</title> |
835 |
+<body> |
836 |
+ |
837 |
+<note> |
838 |
+The <b>total</b> elapsed time between the display of the boot promt on the |
839 |
+minimal CD and the display of the login promt after the reboot was |
840 |
+<b>00:42:31</b> on our test box. Yes, less than one hour! Note that this time |
841 |
+also includes the stage3, Portage snapshot and several packages download time |
842 |
+and the time spent configuring the kernel. |
843 |
+</note> |
844 |
+ |
845 |
+<p> |
846 |
+Log in as <c>root</c>, then add one or more users for daily use with |
847 |
+<c>useradd</c>. |
848 |
+</p> |
849 |
+ |
850 |
+<pre caption="Connect to your new box from another PC"> |
851 |
+<comment>(Clean up your known_hosts file because your new box |
852 |
+has generated a new definitive hostkey)</comment> |
853 |
+$ <i>nano -w ~/.ssh/known_hosts</i> |
854 |
+<comment>(Look for the IP of your new PC and delete the line, |
855 |
+then save the file and exit nano)</comment> |
856 |
+ |
857 |
+<comment>(Use the IP addess of your new box)</comment> |
858 |
+$ <i>ssh root@192.168.1.10</i> |
859 |
+The authenticity of host '192.168.1.10 (192.168.1.10)' can't be established. |
860 |
+RSA key fingerprint is 96:e7:2d:12:ac:9c:b0:94:90:9f:40:89:b0:45:26:8f. |
861 |
+Are you sure you want to continue connecting (yes/no)? <i>yes</i> |
862 |
+Warning: Permanently added '192.168.1.10' (RSA) to the list of known hosts. |
863 |
+Password: <comment>type_the_password</comment> |
864 |
+</pre> |
865 |
+ |
866 |
+<pre caption="Add a new user"> |
867 |
+mybox ~ # <i>adduser -g users -G lp,wheel,audio,cdrom,portage,cron -m john</i> |
868 |
+mybox ~ # <i>passwd john</i> |
869 |
+New UNIX password: <comment>Set John's password</comment> |
870 |
+Retype new UNIX password: <comment>Type John's password again</comment> |
871 |
+passwd: password updated successfully |
872 |
+</pre> |
873 |
+ |
874 |
+</body> |
875 |
+</section> |
876 |
+<section> |
877 |
+<title>Last configuration touches</title> |
878 |
+<body> |
879 |
+ |
880 |
+<p> |
881 |
+Start by selecting nearby mirrors either by defining the <c>RSYNC</c> and |
882 |
+<c>GENTOO_MIRRORS</c> variables in <path>/etc/make.conf</path> or by using |
883 |
+<c>mirrorselect</c>. You can also define the number of concurrent compilation |
884 |
+processes at this point. |
885 |
+</p> |
886 |
+ |
887 |
+<pre caption="Use mirrorselect and set MAKEOPTS"> |
888 |
+mybox ~ # <i>emerge mirrorselect</i> |
889 |
+mybox ~ # <i>mirrorselect -i -o >> /etc/make.conf</i> |
890 |
+mybox ~ # <i>mirrorselect -i -r -o >> /etc/make.conf</i> |
891 |
+<comment>(Usually, (the number of processors + 1) is a good value)</comment> |
892 |
+mybox ~ # <i>echo 'MAKEOPTS="-j2"' >> /etc/make.conf</i> |
893 |
+</pre> |
894 |
+ |
895 |
+<p> |
896 |
+Now is a good time to enable or disable some USE flags. Run <c>emerge -vpe</c> |
897 |
+to list all currently installed packages and their enabled and disabled USE |
898 |
+flags. Either edit <path>/etc/make.conf</path> or use the following command to |
899 |
+define the USE variable: |
900 |
+</p> |
901 |
+ |
902 |
+<pre caption="View USE flags in use and enable or disable some"> |
903 |
+mybox ~ # <i>emerge -vpe world</i> |
904 |
+<comment>(Portage displays the packages and their USE flags, as an example, let's |
905 |
+disable ipv6 and fortran, and enable userlocales and unicode)</comment> |
906 |
+mybox ~ # <i>echo 'USE="nptl nptlonly -ipv6 -fortran userlocales unicode"' >> /etc/make.conf</i> |
907 |
</pre> |
908 |
|
909 |
<p> |
910 |
-GRUB users need to install GRUB in the MBR using |
911 |
-<c>grub-install /dev/hda</c> after copying <path>/proc/mounts</path> to |
912 |
-<path>/etc/mtab</path>. LILO users need to run <c>/sbin/lilo</c>. |
913 |
+If you enabled the <c>userlocales</c> USE flag for versions of glibc that still |
914 |
+support it, you should edit <path>/etc/locales.build</path> and define the |
915 |
+locales you want to build. |
916 |
</p> |
917 |
|
918 |
<p> |
919 |
-Exit the chrooted environment, unmount all file systems and reboot. |
920 |
+Later versions of glibc ignore the userlocales USE flag and use |
921 |
+<path>/etc/locale.gen</path> instead. If you are upgrading glibc to such a |
922 |
+version, you should create <path>/etc/locale.gen</path> <e>and remove</e> |
923 |
+<path>/etc/locales.build</path>. Check the output of <c>emerge -vpe world</c> |
924 |
+to know whether glibc supports the userlocales USE flag. |
925 |
</p> |
926 |
|
927 |
+<pre caption="Define locales"> |
928 |
+mybox ~ # <i>cd /etc</i> |
929 |
+<comment>(For versions of glibc with the userlocales USE flag)</comment> |
930 |
+mybox etc # <i>nano -w locales.build</i> |
931 |
+ |
932 |
+<comment>(For recent versions of glibc, convert locales.build)</comment> |
933 |
+mybox etc # <i>grep '^[^#].*' locales.build | sed 's:/: :' >locale.gen</i> |
934 |
+mybox etc # <i>rm locales.build</i> |
935 |
+mybox etc # <i>nano -w locale.gen</i> |
936 |
+</pre> |
937 |
+ |
938 |
+<p> |
939 |
+Last but not least, you may want to alter the <c>CFLAGS</c> variable in your |
940 |
+<path>/etc/make.conf</path> to optimise the code to your specific needs. Please |
941 |
+note that using a long list of flags is rarely needed and can even lead to a |
942 |
+broken system. It is recommended to specify the processor type in the |
943 |
+<c>march</c> option and stick to <c>-O2 -pipe</c>. |
944 |
+</p> |
945 |
+ |
946 |
+<p> |
947 |
+You may also want to switch to <b>~x86</b>. You should only do this if you can |
948 |
+deal with the odd broken ebuild or package. If you'd rather keep your system |
949 |
+stable, don't add the <c>ACCEPT_KEYWORDS</c> variable. Adding |
950 |
+<c>FEATURES="parallel-fetch ccache"</c> is also a good idea. |
951 |
+</p> |
952 |
+ |
953 |
+<note> |
954 |
+At the time of writing, the ~x86 version of <c>portage</c> is significantly |
955 |
+faster when updating its cache. Even if you stick to the x86 keyword, you might |
956 |
+want to use the ~x86 version of Portage. Check the <uri |
957 |
+link="/doc/en/handbook/handbook-x86.xml?part=3&chap=3#doc_chap2">Mixing |
958 |
+Stable with Testing</uri> chapter if you forgot how to do this. |
959 |
+</note> |
960 |
+ |
961 |
+<pre caption="Last edit of make.conf"> |
962 |
+mybox etc # <i>nano -w make.conf</i> |
963 |
+<comment>(Set -march to your CPU type in CFLAGS)</comment> |
964 |
+CFLAGS="-O2 -march=<i>athlon-xp</i> -pipe" |
965 |
+<comment>(Add the following line)</comment> |
966 |
+FEATURES="parallel-fetch ccache" |
967 |
+<comment>(Only add the following if you know what you're doing)</comment> |
968 |
+ACCEPT_KEYWORDS="~x86" |
969 |
+</pre> |
970 |
+ |
971 |
+<p> |
972 |
+You might want to recompile your whole system twice to make full use of your |
973 |
+latest configuration changes. It would take quite a long time to complete and |
974 |
+yield minimal speed benefits. It is recommended that you let your system |
975 |
+optimise itself gradually over time when new versions of packages are |
976 |
+released. |
977 |
+</p> |
978 |
+ |
979 |
+<p> |
980 |
+Recompiling only the packages that have already been updated since the release |
981 |
+or that are affected by your new USE flags will take enough time. You might |
982 |
+also have to remove packages that block your upgrade. Look for "[blocks |
983 |
+<brite>B</brite> ]" in the output of <c>emerge -vpuD --newuse world</c> and |
984 |
+use <c>emerge -C</c> to remove them. |
985 |
+</p> |
986 |
+ |
987 |
+<pre caption="Update your packages"> |
988 |
+<comment>(Install ccache)</comment> |
989 |
+mybox etc # <i>emerge ccache</i> |
990 |
+ |
991 |
+<comment>(Please not that the switch to ~x86 causes many packages to be upgraded)</comment> |
992 |
+mybox etc # <i>emerge -vpuD --newuse world</i> |
993 |
+<comment>(Take a good look at the package list and their USE flags, |
994 |
+remove blocking packages if any, and start the lengthy process)</comment> |
995 |
+mybox etc # <i>time emerge -vuD --newuse world</i> |
996 |
+<comment>(79 packages have been (re)compiled)</comment> |
997 |
+ |
998 |
+real 180m13.276s |
999 |
+user 121m22.905s |
1000 |
+sys 36m31.472s |
1001 |
+ |
1002 |
+<comment>(Remerge libtool to avoid further potential problems)</comment> |
1003 |
+mybox etc # <i>emerge libtool</i> |
1004 |
+ |
1005 |
+<comment>(Update config files, make sure you <b>do not</b> let etc-update |
1006 |
+update config files you have edited)</comment> |
1007 |
+mybox etc # <i>etc-update</i> |
1008 |
+ |
1009 |
+<comment>(If perl has been updated, you should run the perl-cleaner script)</comment> |
1010 |
+mybox etc # <i>time perl-cleaner all</i> |
1011 |
+real 1m6.495s |
1012 |
+user 0m42.699s |
1013 |
+sys 0m10.641s |
1014 |
+ |
1015 |
+<comment>(In case of a major upgrade of python, you should run the python-updater script)</comment> |
1016 |
+mybox etc # <i>python-updater</i> |
1017 |
+</pre> |
1018 |
+ |
1019 |
</body> |
1020 |
</section> |
1021 |
<section> |
1022 |
-<title>Finalizing the Installation</title> |
1023 |
+<title>What to do next</title> |
1024 |
<body> |
1025 |
|
1026 |
<p> |
1027 |
-Log in as <c>root</c>, then add one or more users for day-to-day use using |
1028 |
-<c>useradd -m -G <groups> <username></c>. |
1029 |
+Depending on what your new Gentoo machine is supposed to do, you will probably |
1030 |
+want to install server applications or a desktop system. Just as an example, |
1031 |
+<c>emerge gnome</c> and <c>emerge kde</c> have been timed on the ~x86 system |
1032 |
+installed as describe above. Both have been installed from the same starting |
1033 |
+point. |
1034 |
</p> |
1035 |
|
1036 |
<p> |
1037 |
-If you performed a networkless installation, mount the packages CD at |
1038 |
-<path>/mnt/cdrom</path> and <c>export PKGDIR="/mnt/cdrom"</c> after which |
1039 |
-you can <c>emerge -k <package></c> to install additional |
1040 |
-software like <c>kde</c>. |
1041 |
+You should check our <uri link="/doc/en/">documentation index</uri> to find out |
1042 |
+how to install and configure the applications of your choice. |
1043 |
</p> |
1044 |
|
1045 |
-<p> |
1046 |
-Thanks for installing Gentoo! |
1047 |
-</p> |
1048 |
+<impo> |
1049 |
+The following is only an example. It is in no way meant as a recommended setup. |
1050 |
+</impo> |
1051 |
+ |
1052 |
+<pre caption="Emerge GNOME"> |
1053 |
+mybox etc # <i>emerge -vp gnome</i> |
1054 |
+<comment>(Look at the list of packages and their USE flags, |
1055 |
+then edit make.conf if required.</comment> |
1056 |
+mybox etc # <i>nano -w /etc/make.conf</i> |
1057 |
+<comment>The following USE flags have been defined)</comment> |
1058 |
+USE="nptl nptlonly -ipv6 -fortran unicode svg hal dbus \ |
1059 |
+ -kde -qt -arts -eds -esd gnome gstreamer gtk -xmms firefox" |
1060 |
+ |
1061 |
+mybox etc # <i>time emerge gnome</i> |
1062 |
+<comment>(326 packages have been emerged)</comment> |
1063 |
+ |
1064 |
+real 520m44.532s |
1065 |
+user 339m21.144s |
1066 |
+sys 146m22.337s |
1067 |
+</pre> |
1068 |
+ |
1069 |
+<pre caption="Emerge KDE"> |
1070 |
+mybox etc # <i>emerge -vp kde-meta</i> |
1071 |
+<comment>(Look at the list of packages and their USE flags, |
1072 |
+then edit make.conf if required.</comment> |
1073 |
+mybox etc # <i>nano -w /etc/make.conf</i> |
1074 |
+<comment>The following USE flags have been defined)</comment> |
1075 |
+USE="nptl nptlonly -ipv6 -fortran unicode svg hal dbus \ |
1076 |
+ kde qt -arts -eds -esd -gnome -gstreamer -gtk -xmms -firefox" |
1077 |
+ |
1078 |
+mybox etc # <i>time emerge kde-meta</i> |
1079 |
+<comment>(391 packages have been emerged)</comment> |
1080 |
+ |
1081 |
+real 1171m25.318s |
1082 |
+user 851m26.393s |
1083 |
+sys 281m45.629s |
1084 |
+</pre> |
1085 |
|
1086 |
</body> |
1087 |
</section> |
1088 |
|
1089 |
|
1090 |
|
1091 |
1.1 xml/htdocs/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml |
1092 |
|
1093 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
1094 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo |
1095 |
|
1096 |
Index: gentoo-x86+raid+lvm2-quickinstall.xml |
1097 |
=================================================================== |
1098 |
<?xml version='1.0' encoding="UTF-8"?> |
1099 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml,v 1.1 2006/05/27 13:16:23 neysx Exp $ --> |
1100 |
|
1101 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
1102 |
|
1103 |
<guide link="/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml" lang="en"> |
1104 |
<title>Gentoo Linux x86 with Software Raid and LVM2 Quick Install Guide</title> |
1105 |
|
1106 |
<author title="Author"> |
1107 |
<mail link="neysx@g.o">Xavier Neys</mail> |
1108 |
</author> |
1109 |
<author title="Author"> |
1110 |
<mail link="swift@g.o">Sven Vermeulen</mail> |
1111 |
</author> |
1112 |
<author title="Author">Steven Wagner</author> |
1113 |
|
1114 |
<abstract> |
1115 |
The Quick install guide covers the Gentoo install process in a non-verbose |
1116 |
manner. Its purpose is to allow users to perform a stage3 install with software |
1117 |
RAID and LVM2 in no time. Users should already have prior experience with |
1118 |
installing Gentoo Linux if they want to follow this guide. |
1119 |
</abstract> |
1120 |
|
1121 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
1122 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
1123 |
<license/> |
1124 |
|
1125 |
<version>1</version> |
1126 |
<date>2006-05-03</date> |
1127 |
|
1128 |
<chapter> |
1129 |
<title>Introduction</title> |
1130 |
<section> |
1131 |
<body> |
1132 |
|
1133 |
<p> |
1134 |
This guide contains all commands you should use to complete a stage3 |
1135 |
installation including LVM2 on top of software RAID. This guide is targetted at |
1136 |
experienced users. You need a connection to the Internet to download the stage3 |
1137 |
and Portage snapshots. |
1138 |
</p> |
1139 |
|
1140 |
<p> |
1141 |
Timing output follows all commands that take more than a couple of seconds to |
1142 |
finish. Commands were timed on an AMD 2000 1.66 Ghz PC with 512 Mb of RAM and |
1143 |
two SATA disks connected to a hardware controller configured as JBOD (i.e. two |
1144 |
separate hard disks are seen by Gentoo). If you have a "hardware" RAID |
1145 |
controller on your motherboard, it is most likely <b>not</b> a hardware |
1146 |
controller. |
1147 |
</p> |
1148 |
|
1149 |
<pre caption="Test box specs"> |
1150 |
<comment>(The following specs and the timing information should help you determine |
1151 |
a rough estimate of the time you need to complete your install)</comment> |
1152 |
|
1153 |
# <i>grep bogo /proc/cpuinfo</i> |
1154 |
bogomip : 3337.81 |
1155 |
|
1156 |
# <i>hdparm -tT /dev/sda /dev/sdb</i> |
1157 |
/dev/sda: |
1158 |
reads: 1048 MB in 2.00 seconds = 524.00 MB/sec |
1159 |
Timing buffered disk reads: 152 MB in 3.01 seconds = 50.50 MB/sec |
1160 |
|
1161 |
/dev/sdb: |
1162 |
Timing cached reads: 1048 MB in 2.00 seconds = 524.00 MB/sec |
1163 |
Timing buffered disk reads: 152 MB in 3.01 seconds = 50.50 MB/sec |
1164 |
|
1165 |
# <i>grep MemTotal /proc/meminfo</i> |
1166 |
MemTotal: 509248 kB |
1167 |
</pre> |
1168 |
|
1169 |
</body> |
1170 |
</section> |
1171 |
</chapter> |
1172 |
|
1173 |
<chapter> |
1174 |
<title>Quick Install Guide</title> |
1175 |
<section> |
1176 |
<title>Installation Media</title> |
1177 |
<body> |
1178 |
|
1179 |
<p> |
1180 |
Download a CD from one of our <uri link="/main/en/mirrors.xml">mirrors</uri>. |
1181 |
You can find the minimal CD ISO in |
1182 |
<path>releases/x86/<release>/installcd</path> or the LiveCD ISO in |
1183 |
<path>releases/x86/<release>/livecd</path>. The <e>minimal</e> |
1184 |
installation CD is only useful for Internet-based installations. You can use |
1185 |
the <e>LiveCD</e> to perform a networkless installation as documented in the |
1186 |
<uri link="/doc/en/handbook/2006.0/handbook-x86.xml">2006.0 x86 installation |
1187 |
handbook</uri>. The minimal CD is recommended. |
1188 |
</p> |
1189 |
|
1190 |
<p> |
1191 |
<uri link="/doc/en/faq.xml#isoburning">Burn</uri> the CD and boot it. |
1192 |
</p> |
1193 |
|
1194 |
</body> |
1195 |
</section> |
1196 |
<section> |
1197 |
<title>Booting the CD</title> |
1198 |
<body> |
1199 |
|
1200 |
<p> |
1201 |
Press |
1202 |
<c>F2</c> at the boot screen to find out what boot options exist. You can |
1203 |
either start <c>gentoo</c> or <c>gentoo-nofb</c>, the latter disables the |
1204 |
framebuffer. If you booted the LiveCD, don't forget to add the <c>nox</c> |
1205 |
option to prevent the X graphical environment from starting. Several options |
1206 |
allow to enable or disable some features. If all goes well, your hardware will |
1207 |
be detected and all modules will be loaded. If the kernel fails to boot |
1208 |
properly or if your computer hangs during the boot procedure, you may have to |
1209 |
experience with different configurations. The safest way is probably to use the |
1210 |
<c>nodetect</c> option and then load required modules explicitely. |
1211 |
</p> |
1212 |
|
1213 |
<pre caption="Boot the minimal CD"> |
1214 |
Gentoo Linux Installation LiveCD http://www.gentoo.org |
1215 |
Enter to Boot; F1 for kernels F2 for options. |
1216 |
boot: <i>gentoo-nofb</i> |
1217 |
<comment>(or in case of problems)</comment> |
1218 |
boot: <i>gentoo-nofb nodetect</i> |
1219 |
</pre> |
1220 |
|
1221 |
</body> |
1222 |
</section> |
1223 |
<section> |
1224 |
<title>Optional: loading modules</title> |
1225 |
<body> |
1226 |
|
1227 |
<p> |
1228 |
If you used the <c>nodetect</c> option, once booted, load the required modules. |
1229 |
You need to enable networking and have access to your disks. The <c>lspci</c> |
1230 |
command can help you identify your hardware. |
1231 |
</p> |
1232 |
|
1233 |
<pre caption="Load required modules"> |
1234 |
livecd root # <i>lspci</i> |
1235 |
<comment>(Use lspci's output to identify required modules)</comment> |
1236 |
|
1237 |
<comment>(The following is an example, adapt it to your hardware)</comment> |
1238 |
livecd root # <i>modprobe 3w-9xxx</i> |
1239 |
livecd root # <i>modprobe r8169</i> |
1240 |
</pre> |
1241 |
|
1242 |
</body> |
1243 |
</section> |
1244 |
<section> |
1245 |
<title>Network Configuration</title> |
1246 |
<body> |
1247 |
|
1248 |
<p> |
1249 |
If your network does not work already, you can use <c>net-setup</c> to |
1250 |
configure your network. You might need to load support for your network card |
1251 |
using <c>modprobe</c> prior to the configuration. If you have ADSL, use |
1252 |
<c>adsl-setup</c> and <c>adsl-start</c>. If you are using an ADSL router, it |
1253 |
establishes the connection for you and you don't need to run those scripts. For |
1254 |
PPTP support, first edit <path>/etc/ppp/chap-secrets</path> and |
1255 |
<path>/etc/ppp/options.pptp</path> and then use <c>pptp |
1256 |
<server ip></c>. |
1257 |
</p> |
1258 |
|
1259 |
<p> |
1260 |
For wireless access, use <c>iwconfig</c> to set the wireless parameters and then |
1261 |
use either <c>net-setup</c> again or run <c>ifconfig</c>, <c>dhcpcd</c> and/or |
1262 |
<c>route</c> manually. |
1263 |
</p> |
1264 |
|
1265 |
<p> |
1266 |
If you are behind a proxy, do not forget to initialize your system using |
1267 |
<c>export http_proxy</c>, <c>ftp_proxy</c> and <c>RSYNC_PROXY</c>. |
1268 |
</p> |
1269 |
|
1270 |
<pre caption="Configure networking the guided way"> |
1271 |
livecd root # <i>net-setup eth0</i> |
1272 |
</pre> |
1273 |
|
1274 |
<p> |
1275 |
Alternatively, you can start networking manually. The following example assigns |
1276 |
the IP addess 192.168.1.10 to your PC and defines 192.168.1.1 as your router |
1277 |
and name server. |
1278 |
</p> |
1279 |
|
1280 |
<pre caption="Configure networking the manual way"> |
1281 |
livecd root # <i>ifconfig eth0 192.168.1.10/24</i> |
1282 |
livecd root # <i>route add default gw 192.168.1.1</i> |
1283 |
livecd root # <i>echo nameserver 192.168.1.1 > /etc/resolv.conf</i> |
1284 |
</pre> |
1285 |
|
1286 |
<p> |
1287 |
The installation CD allows you to start an <c>sshd</c> server, add additional |
1288 |
users, run <c>irssi</c> (a command-line chat client) and surf the web using |
1289 |
<c>lynx</c> or <c>links</c>. |
1290 |
</p> |
1291 |
|
1292 |
</body> |
1293 |
</section> |
1294 |
<section> |
1295 |
<title>Optional: connect to your new box over ssh</title> |
1296 |
<body> |
1297 |
|
1298 |
<p> |
1299 |
The most interesting feature is of course <c>sshd</c>. You can start it and |
1300 |
then connect from another machine and cut and paste commands from this guide. |
1301 |
</p> |
1302 |
|
1303 |
<pre caption="Start sshd"> |
1304 |
livecd root # <i>time /etc/init.d/sshd start</i> |
1305 |
* Generating hostkey ... |
1306 |
<comment>(sshd generates the key and displays more output)</comment> |
1307 |
* starting sshd ... [ok] |
1308 |
|
1309 |
real 0m13.688s |
1310 |
user 0m9.420s |
1311 |
sys 0m0.090s |
1312 |
</pre> |
1313 |
|
1314 |
<p> |
1315 |
Now, set the root password on the liveCD so that you can connect to it from |
1316 |
another PC. Please note that allowing root to connect over ssh is not |
1317 |
recommended under normal circumstances. If you can't trust your local network, |
1318 |
use a long and complex password, you should use it only once as it will |
1319 |
disappear after your first rebot. |
1320 |
</p> |
1321 |
|
1322 |
<pre caption="Set the root password"> |
1323 |
livecd root # <i>passwd</i> |
1324 |
New UNIX password: <comment>type_a_password</comment> |
1325 |
Retype new UNIX password: <comment>type_a_password</comment> |
1326 |
passwd: password updated successfully |
1327 |
</pre> |
1328 |
|
1329 |
<p> |
1330 |
Now, you can start a terminal on another PC and connect to your new box, follow |
1331 |
the rest of this guide in another window, and cut and paste commands. |
1332 |
</p> |
1333 |
|
1334 |
<pre caption="Connect to your new box from another PC"> |
1335 |
<comment>(Use the IP addess of your new box)</comment> |
1336 |
$ <i>ssh root@192.168.1.10</i> |
1337 |
The authenticity of host '192.168.1.10 (192.168.1.10)' can't be established. |
1338 |
RSA key fingerprint is 96:e7:2d:12:ac:9c:b0:94:90:9f:40:89:b0:45:26:8f. |
1339 |
Are you sure you want to continue connecting (yes/no)? <i>yes</i> |
1340 |
Warning: Permanently added '192.168.1.10' (RSA) to the list of known hosts. |
1341 |
Password: <comment>type_the_password</comment> |
1342 |
</pre> |
1343 |
|
1344 |
</body> |
1345 |
</section> |
1346 |
<section> |
1347 |
<title>Preparing the Disks</title> |
1348 |
<body> |
1349 |
|
1350 |
<p> |
1351 |
Load the software RAID and LVM2 modules. |
1352 |
</p> |
1353 |
|
1354 |
<pre caption="Load RAID and LVM2 modules"> |
1355 |
livecd ~ # <i>modprobe raid0</i> |
1356 |
livecd ~ # <i>modprobe raid1</i> |
1357 |
<comment>(raid5, raid6 and raid10 are also available)</comment> |
1358 |
|
1359 |
livecd ~ # <i>modprobe dm-mod</i> |
1360 |
</pre> |
1361 |
|
1362 |
<p> |
1363 |
Use <c>fdisk</c> or <c>cfdisk</c> to create your partition layout. The device |
1364 |
names are likely to be either <path>/dev/sda</path> and <path>/dev/sdb</path> |
1365 |
for a SATA or SCSI disks, or <path>/dev/hda</path> and <path>/dev/hdb</path> |
1366 |
for IDE disks. The following layout will be used in this guide: |
1367 |
</p> |
1368 |
|
1369 |
<table> |
1370 |
<tr> |
1371 |
<ti/> |
1372 |
<th><path>/dev/sda</path></th> |
1373 |
<th><path>/dev/sdb</path></th> |
1374 |
<th>Type</th> |
1375 |
</tr> |
1376 |
<tr> |
1377 |
<th><path>/dev/md1</path></th> |
1378 |
<th><path>/boot</path></th> |
1379 |
<th><path>/boot</path></th> |
1380 |
<ti>Raid-1 (mirroring)</ti> |
1381 |
</tr> |
1382 |
<tr> |
1383 |
<th/> |
1384 |
<th>swap</th> |
1385 |
<th>swap</th> |
1386 |
<ti>Normal partitions</ti> |
1387 |
</tr> |
1388 |
<tr> |
1389 |
<th><path>/dev/md3</path></th> |
1390 |
<th><path>/</path></th> |
1391 |
<th><path>/</path></th> |
1392 |
<ti>Raid-1 (mirroring)</ti> |
1393 |
</tr> |
1394 |
<tr> |
1395 |
<th><path>/dev/md4</path></th> |
1396 |
<th colspan="2">LVM2 volumes</th> |
1397 |
<ti>Raid-0 (striped)</ti> |
1398 |
</tr> |
1399 |
</table> |
1400 |
|
1401 |
<note> |
1402 |
The partition you boot from must not be striped. It may not be raid-5 or |
1403 |
raid-0. |
1404 |
</note> |
1405 |
|
1406 |
<note> |
1407 |
On the one hand, if you want extra stability, consider using raid-1 (or even |
1408 |
raid-5) for your swap partition(s) so that a drive failure would not corrupt |
1409 |
your swap space and crash applications that are using it. On the other hand, if |
1410 |
you want extra performance, just let the kernel use distinct swap partitions as |
1411 |
it does striping by default. |
1412 |
</note> |
1413 |
|
1414 |
<pre caption="Create the partitions"> |
1415 |
livecd ~ # <i>fdisk /dev/sda</i> |
1416 |
<comment>(Make sure you use type fd)</comment> |
1417 |
|
1418 |
<comment>(The rest of this guide uses the following partitioning scheme)</comment> |
1419 |
livecd ~ # <i>fdisk -l /dev/sda</i> |
1420 |
|
1421 |
Disk /dev/sda: 299.9 GB, 299989204992 bytes |
1422 |
255 heads, 63 sectors/track, 36471 cylinders |
1423 |
Units = cylinders of 16065 * 512 = 8225280 bytes |
1424 |
|
1425 |
Device Boot Start End Blocks Id System |
1426 |
/dev/sda1 1 11 88326 fd Linux raid autodetect |
1427 |
/dev/sda2 12 61 401625 82 Linux swap / Solaris |
1428 |
/dev/sda3 62 311 2008125 fd Linux raid autodetect |
1429 |
/dev/sda4 312 36471 290455200 fd Linux raid autodetect |
1430 |
|
1431 |
<comment>(Partition the second disk exactly as the first)</comment> |
1432 |
livecd ~ # <i>fdisk /dev/sdb</i> |
1433 |
</pre> |
1434 |
|
1435 |
<p> |
1436 |
Then create the RAID device nodes and devices: |
1437 |
</p> |
1438 |
|
1439 |
<pre caption="Create device nodes and devices"> |
1440 |
livecd ~ # <i>mknod /dev/md1 b 9 1</i> |
1441 |
livecd ~ # <i>mknod /dev/md3 b 9 3</i> |
1442 |
livecd ~ # <i>mknod /dev/md4 b 9 4</i> |
1443 |
|
1444 |
livecd ~ # <i>mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sda1 /dev/sdb1</i> |
1445 |
mdadm: array /dev/md1 started. |
1446 |
livecd ~ # <i>mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/sda3 /dev/sdb3</i> |
1447 |
mdadm: array /dev/md3 started. |
1448 |
livecd ~ # <i>mdadm --create /dev/md4 --level=0 --raid-devices=2 /dev/sda4 /dev/sdb4</i> |
1449 |
mdadm: array /dev/md4 started. |
1450 |
|
1451 |
<comment>(Wait until all units are ready)</comment> |
1452 |
livecd ~ # <i>cat /proc/mdstat</i> |
1453 |
Personalities : [raid0] [raid1] |
1454 |
md4 : active raid0 sdb4[1] sda4[0] |
1455 |
581006592 blocks 64k chunks |
1456 |
|
1457 |
md3 : active raid1 sdb3[1] sda3[0] |
1458 |
1959808 blocks [2/2] [UU] |
1459 |
|
1460 |
md1 : active raid1 sdb1[1] sda1[0] |
1461 |
88256 blocks [2/2] [UU] |
1462 |
</pre> |
1463 |
|
1464 |
<p> |
1465 |
Then create the LVM2 volumes in <path>/dev/md4</path>. The following scheme is |
1466 |
used as an <b>example</b>: |
1467 |
</p> |
1468 |
|
1469 |
<table> |
1470 |
<tr> |
1471 |
<th>Directory</th> |
1472 |
<th>Size</th> |
1473 |
<th>File system</th> |
1474 |
</tr> |
1475 |
<tr> |
1476 |
<ti>/usr</ti> |
1477 |
<ti>8 GB</ti> |
1478 |
<ti>ext3</ti> |
1479 |
</tr> |
1480 |
<tr> |
1481 |
<ti>/usr/portage</ti> |
1482 |
<ti>2 GB</ti> |
1483 |
<ti>ext2, small block size, many inodes</ti> |
1484 |
</tr> |
1485 |
<tr> |
1486 |
<ti>/usr/portage/distfiles</ti> |
1487 |
<ti>4 GB</ti> |
1488 |
<ti>ext2, large bock size, less inodes</ti> |
1489 |
</tr> |
1490 |
<tr> |
1491 |
<ti>/home</ti> |
1492 |
<ti>10 GB</ti> |
1493 |
<ti>ext3</ti> |
1494 |
</tr> |
1495 |
<tr> |
1496 |
<ti>/opt</ti> |
1497 |
<ti>4 GB</ti> |
1498 |
<ti>ext3</ti> |
1499 |
</tr> |
1500 |
<tr> |
1501 |
<ti>/var</ti> |
1502 |
<ti>4 GB</ti> |
1503 |
<ti>ext3</ti> |
1504 |
</tr> |
1505 |
<tr> |
1506 |
<ti>/var/tmp</ti> |
1507 |
<ti>6 GB</ti> |
1508 |
<ti>ext2</ti> |
1509 |
</tr> |
1510 |
<tr> |
1511 |
<ti>/tmp</ti> |
1512 |
<ti>2 GB</ti> |
1513 |
<ti>ext2</ti> |
1514 |
</tr> |
1515 |
</table> |
1516 |
|
1517 |
<pre caption="Create LVM2 volumes"> |
1518 |
livecd ~ # <i>vgscan</i> |
1519 |
Reading all physical volumes. This may take a while... |
1520 |
No volume groups found |
1521 |
livecd ~ # <i>vgchange -a y</i> |
1522 |
No volume groups found |
1523 |
|
1524 |
<comment>(Create physical volumes, we have only one in our example)</comment> |
1525 |
livecd ~ # <i>pvcreate /dev/md4</i> |
1526 |
Physical volume "/dev/md4" successfully created |
1527 |
|
1528 |
<comment>(Create volume groups, again, we have only one in our example)</comment> |
1529 |
livecd ~ # <i>vgcreate vg /dev/md4</i> |
1530 |
Volume group "vg" successfully created |
1531 |
|
1532 |
<comment>(Create logical volumes)</comment> |
1533 |
livecd ~ # <i>lvcreate -L8G -nusr vg</i> |
1534 |
/dev/cdrom: open failed: Read-only file system |
1535 |
Logical volume "usr" created <comment>(Further similar messages not displayed)</comment> |
1536 |
livecd ~ # <i>lvcreate -L2G -nportage vg</i> |
1537 |
livecd ~ # <i>lvcreate -L4G -ndistfiles vg</i> |
1538 |
livecd ~ # <i>lvcreate -L10G -nhome vg</i> |
1539 |
livecd ~ # <i>lvcreate -L4G -nopt vg</i> |
1540 |
livecd ~ # <i>lvcreate -L4G -nvar vg</i> |
1541 |
livecd ~ # <i>lvcreate -L6G -nvartmp vg</i> |
1542 |
livecd ~ # <i>lvcreate -L2G -ntmp vg</i> |
1543 |
|
1544 |
<comment>(Display volume groups and logical volumes)</comment> |
1545 |
livecd ~ # <i>vgs</i> |
1546 |
VG #PV #LV #SN Attr VSize VFree |
1547 |
vg 1 8 0 wz--n 554.09G 514.09G |
1548 |
livecd ~ # <i>lvs</i> |
1549 |
LV VG Attr LSize Origin Snap% Move Copy% |
1550 |
distfiles vg -wi-a- 4.00G |
1551 |
home vg -wi-a- 10.00G |
1552 |
opt vg -wi-a- 4.00G |
1553 |
portage vg -wi-a- 2.00G |
1554 |
tmp vg -wi-a- 2.00G |
1555 |
usr vg -wi-a- 8.00G |
1556 |
var vg -wi-a- 4.00G |
1557 |
vartmp vg -wi-a- 6.00G |
1558 |
</pre> |
1559 |
|
1560 |
<p> |
1561 |
Use <c>mke2fs</c>, <c>mke2fs -j</c>, <c>mkreiserfs</c>, <c>mkfs.xfs</c> and |
1562 |
<c>mkfs.jfs</c> to create file systems. Initialize swap using <c>mkswap</c> and |
1563 |
<c>swapon</c>. |
1564 |
</p> |
1565 |
|
1566 |
<pre caption="Create the file systems and activate swap"> |
1567 |
<comment>(ext2 is all you need on the /boot partition)</comment> |
1568 |
livecd ~ # <i>mke2fs /dev/md1</i> |
1569 |
|
1570 |
<comment>(Let's use ext3 on the root partition)</comment> |
1571 |
livecd ~ # <i>mke2fs -j -O dir_index /dev/md3</i> |
1572 |
|
1573 |
<comment>(Create file systems on logical volumes)</comment> |
1574 |
livecd ~ # <i>mke2fs -b 4096 -T largefile /dev/vg/distfiles</i> |
1575 |
livecd ~ # <i>mke2fs -j -O dir_index /dev/vg/home</i> |
1576 |
livecd ~ # <i>mke2fs -j -O dir_index /dev/vg/opt</i> |
1577 |
livecd ~ # <i>mke2fs -b 1024 -N 200000 /dev/vg/portage</i> |
1578 |
livecd ~ # <i>mke2fs /dev/vg/tmp</i> |
1579 |
livecd ~ # <i>mke2fs -j -O dir_index /dev/vg/usr</i> |
1580 |
livecd ~ # <i>mke2fs -j -O dir_index /dev/vg/var</i> |
1581 |
livecd ~ # <i>mke2fs /dev/vg/vartmp</i> |
1582 |
|
1583 |
<comment>(Create and activate swap)</comment> |
1584 |
livecd ~ # <i>mkswap /dev/sda2 && mkswap /dev/sdb2</i> |
1585 |
livecd ~ # <i>swapon -p 1 /dev/sda2 && swapon -p 1 /dev/sdb2</i> |
1586 |
<comment>(Check that all swap partitions use the same priority)</comment> |
1587 |
livecd ~ # <i>swapon -v -s</i> |
1588 |
Filename Type Size Used Priority |
1589 |
/dev/sda2 partition 401616 0 1 |
1590 |
/dev/sdb2 partition 401616 0 1 |
1591 |
</pre> |
1592 |
|
1593 |
<p> |
1594 |
Mount the freshly created file systems on <path>/mnt/gentoo</path>. Create |
1595 |
directories for the other mount points and mount them too. |
1596 |
</p> |
1597 |
|
1598 |
<pre caption="Mount the file systems"> |
1599 |
livecd ~ # <i>mount /dev/md3 /mnt/gentoo</i> |
1600 |
livecd ~ # <i>cd /mnt/gentoo</i> |
1601 |
livecd gentoo # <i>mkdir boot home usr opt var tmp</i> |
1602 |
livecd gentoo # <i>mount /dev/md1 /mnt/gentoo/boot</i> |
1603 |
livecd gentoo # <i>mount /dev/vg/usr /mnt/gentoo/usr</i> |
1604 |
livecd gentoo # <i>mount /dev/vg/home /mnt/gentoo/home</i> |
1605 |
livecd gentoo # <i>mount /dev/vg/opt /mnt/gentoo/opt</i> |
1606 |
livecd gentoo # <i>mount /dev/vg/tmp /mnt/gentoo/tmp</i> |
1607 |
livecd gentoo # <i>mount /dev/vg/var /mnt/gentoo/var</i> |
1608 |
livecd gentoo # <i>mkdir usr/portage var/tmp</i> |
1609 |
livecd gentoo # <i>mount /dev/vg/vartmp /mnt/gentoo/var/tmp</i> |
1610 |
livecd gentoo # <i>mount /dev/vg/portage /mnt/gentoo/usr/portage</i> |
1611 |
livecd gentoo # <i>mkdir usr/portage/distfiles</i> |
1612 |
livecd gentoo # <i>mount /dev/vg/distfiles /mnt/gentoo/usr/portage/distfiles</i> |
1613 |
|
1614 |
<comment>(Set proper perms on tmp directories)</comment> |
1615 |
livecd gentoo # <i>chmod 1777 /mnt/gentoo/tmp /mnt/gentoo/var/tmp</i> |
1616 |
</pre> |
1617 |
|
1618 |
</body> |
1619 |
</section> |
1620 |
<section> |
1621 |
<title>Setting Up The Stage</title> |
1622 |
<body> |
1623 |
|
1624 |
<p> |
1625 |
First make sure your date and time is set correctly using <c>date |
1626 |
MMDDhhmmYYYY</c>. Use UTC time. |
1627 |
</p> |
1628 |
|
1629 |
<pre caption="Set the date and UTC time"> |
1630 |
<comment>(Check the clock)</comment> |
1631 |
livecd gentoo # <i>date</i> |
1632 |
Mon Mar 6 00:14:13 UTC 2006 |
1633 |
|
1634 |
<comment>(Set the current date and time if required)</comment> |
1635 |
livecd gentoo # <i>date 030600162006</i> <comment>(Format is MMDDhhmmYYYY)</comment> |
1636 |
Mon Mar 6 00:16:00 UTC 2006 |
1637 |
</pre> |
1638 |
|
1639 |
<p> |
1640 |
Next, download a stage from one of our <uri |
1641 |
link="/main/en/mirrors.xml">mirrors</uri>. Go to <path>/mnt/gentoo</path> and |
1642 |
unpack the stage using <c>tar xjpf <stage3 tarball></c>. |
1643 |
</p> |
1644 |
|
1645 |
<pre caption="Download a stage3 archive"> |
1646 |
livecd gentoo # <i>links http://www.gentoo.org/main/en/mirrors.xml</i> |
1647 |
<comment>(Pick a mirror, move to the releases/x86/current/stages directory |
1648 |
highlight the stage3 of your choice, probably stage3-i686-2006.0.tar.bz2 |
1649 |
and press D to download it)</comment> |
1650 |
|
1651 |
<comment>(<b>Or</b> download it directly with wget without choosing a nearby mirror)</comment> |
1652 |
livecd gentoo # <i>wget http://gentoo.osuosl.org/releases/x86/current/stages/stage3-i686-2006.0.tar.bz2</i> |
1653 |
</pre> |
1654 |
|
1655 |
<pre caption="Unpack the stage3 archive"> |
1656 |
livecd gentoo # <i>time tar xjpf stage3*</i> |
1657 |
|
1658 |
real 1m14.157s |
1659 |
user 1m2.920s |
1660 |
sys 0m7.530s |
1661 |
</pre> |
1662 |
|
1663 |
<p> |
1664 |
Install the latest Portage snapshot. Proceed as for the stage3 archive: choose |
1665 |
a nearby mirror from our <uri link="/main/en/mirrors.xml">list</uri>, download |
1666 |
the latest snapshot and unpack it. |
1667 |
</p> |
1668 |
|
1669 |
<pre caption="Download the latest Portage snapshot"> |
1670 |
livecd gentoo # <i>cd /mnt/gentoo/usr</i> |
1671 |
livecd usr # <i>links http://www.gentoo.org/main/en/mirrors.xml</i> |
1672 |
<comment>(Pick a mirror, move to the snapshots/ directory, |
1673 |
highlight <b>portage-latest.tar.bz2</b> and press D to download it)</comment> |
1674 |
|
1675 |
<comment>(<b>Or</b> download it directly with wget without choosing a nearby mirror)</comment> |
1676 |
livecd gentoo # <i>cd /mnt/gentoo/usr</i> |
1677 |
livecd usr # <i>wget http://gentoo.osuosl.org/snapshots/portage-latest.tar.bz2</i> |
1678 |
</pre> |
1679 |
|
1680 |
<pre caption="Unpack the Portage snapshot"> |
1681 |
livecd usr # <i>time tar xjf portage-lat*</i> |
1682 |
|
1683 |
real 0m40.523s |
1684 |
user 0m28.280s |
1685 |
sys 0m8.240s |
1686 |
</pre> |
1687 |
|
1688 |
</body> |
1689 |
</section> |
1690 |
<section> |
1691 |
<title>Chrooting</title> |
1692 |
<body> |
1693 |
|
1694 |
<p> |
1695 |
Mount the <path>/proc</path> file system, copy over the |
1696 |
<path>/etc/resolv.conf</path> file, then chroot into your Gentoo environment. |
1697 |
</p> |
1698 |
|
1699 |
<pre caption="Chroot"> |
1700 |
livecd usr # <i>cd /</i> |
1701 |
livecd / # <i>mount -t proc proc /mnt/gentoo/proc</i> |
1702 |
livecd / # <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/</i> |
1703 |
livecd / # <i>chroot /mnt/gentoo /bin/bash</i> |
1704 |
livecd / # <i>env-update && source /etc/profile</i> |
1705 |
>>> Regenerating /etc/ld.so.cache... |
1706 |
</pre> |
1707 |
|
1708 |
</body> |
1709 |
</section> |
1710 |
<section> |
1711 |
<title>Set your timezone</title> |
1712 |
<body> |
1713 |
|
1714 |
<p> |
1715 |
Set your time zone information by copying the correct file from |
1716 |
<path>/usr/share/zoneinfo</path> over the <path>/etc/localtime</path> file. |
1717 |
</p> |
1718 |
|
1719 |
<pre caption="Copy your timezone file"> |
1720 |
<comment>(Using Brussels as an example)</comment> |
1721 |
livecd / # <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i> |
1722 |
livecd / # <i>date</i> |
1723 |
Wed Mar 8 00:46:05 CET 2006 |
1724 |
</pre> |
1725 |
|
1726 |
</body> |
1727 |
</section> |
1728 |
<section> |
1729 |
<title>Set your host name and domain name</title> |
1730 |
<body> |
1731 |
|
1732 |
<p> |
1733 |
Set your host name in <path>/etc/conf.d/hostname</path> and |
1734 |
<path>/etc/hosts</path>. In the following example, we use |
1735 |
<c>mybox</c> as host name and <c>at.myplace</c> as domain name. You can either |
1736 |
edit the config files with <c>nano</c> or use the following commands: |
1737 |
</p> |
1738 |
|
1739 |
<pre caption="Set host and domain name"> |
1740 |
livecd / # <i>cd /etc</i> |
1741 |
livecd etc # <i>echo "127.0.0.1 mybox.at.myplace mybox localhost" > hosts</i> |
1742 |
livecd etc # <i>sed -i -e 's/HOSTNAME.*/HOSTNAME="mybox"/' conf.d/hostname</i> |
1743 |
<comment>(Use defined host name and check)</comment> |
1744 |
livecd etc # <i>hostname mybox</i> |
1745 |
livecd etc # <i>hostname -f</i> |
1746 |
mybox.at.myplace |
1747 |
</pre> |
1748 |
|
1749 |
</body> |
1750 |
</section> |
1751 |
<section> |
1752 |
<title>Kernel Configuration</title> |
1753 |
<body> |
1754 |
|
1755 |
<p> |
1756 |
Install a kernel source (usually <c>gentoo-sources</c> or |
1757 |
<c>vanilla-sources</c>), configure it, compile it and copy the |
1758 |
<path>arch/i386/boot/bzImage</path> file to <path>/boot</path>. |
1759 |
</p> |
1760 |
|
1761 |
<pre caption="Install a kernel source, compile it and install the kernel"> |
1762 |
livecd etc # <i>time emerge gentoo-sources</i> |
1763 |
|
1764 |
real 3m3.110s |
1765 |
user 1m2.320s |
1766 |
sys 0m34.990s |
1767 |
livecd etc # <i>cd /usr/src/linux</i> |
1768 |
livecd linux # <i>make menuconfig</i> |
1769 |
|
1770 |
<comment>(Configure your kernel as usual and |
1771 |
make sure you select the modules you need under raid and lvm)</comment> |
1772 |
Multi-device support (RAID and LVM) ---> |
1773 |
[*] Multiple devices driver support (RAID and LVM) |
1774 |
<*> RAID support |
1775 |
< > Linear (append) mode (NEW) |
1776 |
<*> RAID-0 (striping) mode |
1777 |
<*> RAID-1 (mirroring) mode |
1778 |
< > RAID-10 (mirrored striping) mode (EXPERIMENTAL) (NEW) |
1779 |
< > RAID-4/RAID-5 mode (NEW) |
1780 |
< > RAID-6 mode (NEW) |
1781 |
< > Multipath I/O support (NEW) |
1782 |
< > Faulty test module for MD (NEW) |
1783 |
<*> Device mapper support |
1784 |
< > Crypt target support (NEW) |
1785 |
< > Snapshot target (EXPERIMENTAL) (NEW) |
1786 |
< > Mirror target (EXPERIMENTAL) (NEW) |
1787 |
< > Zero target (EXPERIMENTAL) (NEW) |
1788 |
< > Multipath target (EXPERIMENTAL) (NEW) |
1789 |
< > Bad Block Relocation Device Target (EXPERIMENTAL) (NEW) |
1790 |
|
1791 |
livecd linux # <i>time make -j2</i> |
1792 |
|
1793 |
<comment>(Elapsed time depends highly on the options you selected)</comment> |
1794 |
real 5m5.869s |
1795 |
user 4m32.320s |
1796 |
sys 0m32.930s |
1797 |
|
1798 |
livecd linux # <i>make modules_install</i> |
1799 |
livecd linux # <i>cp arch/i386/boot/bzImage /boot/kernel</i> |
1800 |
</pre> |
1801 |
|
1802 |
</body> |
1803 |
</section> |
1804 |
<section> |
1805 |
<title>Configure the system</title> |
1806 |
<body> |
1807 |
|
1808 |
<p> |
1809 |
Edit your <path>/etc/fstab</path> and replace <c>BOOT</c>, <c>ROOT</c> and |
1810 |
<c>SWAP</c> with the actual partition names and add your logical volumes. Don't |
1811 |
forget to check that the file systems match your installation. |
1812 |
</p> |
1813 |
|
1814 |
<pre caption="Example fstab"> |
1815 |
livecd linux # <i>cd /etc</i> |
1816 |
livecd etc # <i>nano -w fstab</i> |
1817 |
/dev/<i>md1</i> /boot ext2 noauto,noatime 1 2 |
1818 |
/dev/<i>md3</i> / ext3 noatime 0 1 |
1819 |
/dev/<i>sda2</i> none swap sw,pri=1 0 0 |
1820 |
/dev/<i>sdb2</i> none swap sw,pri=1 0 0 |
1821 |
/dev/vg/usr /usr ext3 noatime 1 2 |
1822 |
/dev/vg/portage /usr/portage ext2 noatime 1 2 |
1823 |
/dev/vg/distfiles /usr/portage/distfiles ext2 noatime 1 2 |
1824 |
/dev/vg/home /home ext3 noatime 1 2 |
1825 |
/dev/vg/opt /opt ext3 noatime 1 2 |
1826 |
/dev/vg/tmp /tmp ext2 noatime 1 2 |
1827 |
/dev/vg/var /var ext3 noatime 1 2 |
1828 |
/dev/vg/vartmp /var/tmp ext2 noatime 1 2 |
1829 |
</pre> |
1830 |
|
1831 |
<p> |
1832 |
Configure your network in <path>/etc/conf.d/net</path>. Add the <c>net.eth0</c> |
1833 |
init script to the default run level. If you have multiple NICs, symlink them |
1834 |
to the <c>net.eth0</c> init script and add them to the default run level as |
1835 |
well. Either edit <path>/etc/conf.d/net</path> with <c>nano</c> or use the |
1836 |
following commands: |
1837 |
</p> |
1838 |
|
1839 |
<pre caption="Configure networking"> |
1840 |
livecd etc # <i>cd conf.d</i> |
1841 |
livecd conf.d # <i>echo 'config_eth0=( "192.168.1.10/24" )' >> net</i> |
1842 |
livecd conf.d # <i>echo 'routes_eth0=( "default via 192.168.1.1" )' >> net</i> |
1843 |
livecd conf.d # <i>rc-update add net.eth0 default</i> |
1844 |
<comment>(If you compiled your network card driver as a module, |
1845 |
add it to /etc/modules.autoload.d/kernel-2.6)</comment> |
1846 |
livecd conf.d # <i>echo r8169 >> /etc/modules.autoload.d/kernel-2.6</i> |
1847 |
<comment>(If you want to reconnect via ssh after you have rebooted your new box)</comment> |
1848 |
livecd conf.d # <i>rc-update add sshd default</i> |
1849 |
</pre> |
1850 |
|
1851 |
<note> |
1852 |
Emerge <c>pcmcia-cs</c> and add it to the default run level if you need it. |
1853 |
</note> |
1854 |
|
1855 |
<p> |
1856 |
Set the root password using <c>passwd</c>. |
1857 |
</p> |
1858 |
|
1859 |
<pre caption="Set the root password"> |
1860 |
livecd conf.d # <i>passwd</i> |
1861 |
New UNIX password: <comment>type_the_password</comment> |
1862 |
Retype new UNIX password: <comment>type_the_password_again</comment> |
1863 |
passwd: password updated successfully |
1864 |
</pre> |
1865 |
|
1866 |
<p> |
1867 |
Check the system configuration in <path>/etc/rc.conf</path>, |
1868 |
<path>/etc/conf.d/rc</path>, <path>/etc/conf.d/keymaps</path>, |
1869 |
<path>/etc/conf.d/clock</path> and edit any of those files if required. |
1870 |
</p> |
1871 |
|
1872 |
<pre caption="Optional: edit some config files"> |
1873 |
livecd conf.d # <i>nano -w /etc/rc.conf</i> |
1874 |
livecd conf.d # <i>nano -w /etc/conf.d/rc</i> |
1875 |
livecd conf.d # <i>nano -w /etc/conf.d/keymaps</i> |
1876 |
livecd conf.d # <i>nano -w /etc/conf.d/clock</i> |
1877 |
</pre> |
1878 |
|
1879 |
</body> |
1880 |
</section> |
1881 |
<section> |
1882 |
<title>Installing System Tools</title> |
1883 |
<body> |
1884 |
|
1885 |
<p> |
1886 |
Install RAID and LVM2 utilities. |
1887 |
</p> |
1888 |
|
1889 |
<pre caption="Install RAID & LVM2 tools"> |
1890 |
livecd conf.d # <i>emerge mdadm lvm2</i> |
1891 |
</pre> |
1892 |
|
1893 |
<p> |
1894 |
Install a system logger like <c>syslog-ng</c> and a cron daemon like |
1895 |
<c>vixie-cron</c>, and add them to the default run level. |
1896 |
</p> |
1897 |
|
1898 |
<note> |
1899 |
Cron daemons depend on an MTA. <c>mail-mta/ssmtp</c> will be pulled in as a |
1900 |
dependency. If you want to use a more advanced MTA, you might want to install |
1901 |
it now. If you are in a hurry, let ssmtp be installed and remove it later when |
1902 |
you install the MTA of your choice. |
1903 |
</note> |
1904 |
|
1905 |
<pre caption="Install a syslogger and a cron daemon"> |
1906 |
livecd conf.d # <i>time emerge syslog-ng vixie-cron</i> |
1907 |
|
1908 |
real 1m54.099s |
1909 |
user 1m2.630s |
1910 |
sys 0m34.620s |
1911 |
livecd conf.d # <i>rc-update add syslog-ng default</i> |
1912 |
livecd conf.d # <i>rc-update add vixie-cron default</i> |
1913 |
</pre> |
1914 |
|
1915 |
<p> |
1916 |
Install the necessary file system tools (<c>xfsprogs</c>, <c>reiserfsprogs</c> |
1917 |
or <c>jfsutils</c>) and networking tools (<c>dhcpcd</c> or <c>rp-pppoe</c>) if |
1918 |
you need any. |
1919 |
</p> |
1920 |
|
1921 |
<pre caption="Install extra tools if required"> |
1922 |
livecd conf.d # <i>emerge xfsprogs</i> <comment>(If you use the XFS file system)</comment> |
1923 |
livecd conf.d # <i>emerge jfsutils</i> <comment>(If you use the JFS file system)</comment> |
1924 |
livecd conf.d # <i>emerge reiserfsprogs</i> <comment>(If you use the Reiser file system)</comment> |
1925 |
livecd conf.d # <i>emerge dhcpcd</i> <comment>(If you need a DHCP client)</comment> |
1926 |
livecd conf.d # <i>USE="-X" emerge rp-pppoe</i> <comment>(If you need PPPoE ADSL connectivity)</comment> |
1927 |
</pre> |
1928 |
|
1929 |
</body> |
1930 |
</section> |
1931 |
<section> |
1932 |
<title>Configuring the Bootloader</title> |
1933 |
<body> |
1934 |
|
1935 |
<p> |
1936 |
Emerge <c>grub</c> and configure it. |
1937 |
</p> |
1938 |
|
1939 |
<pre caption="Emerge grub and edit its configuration file"> |
1940 |
livecd conf.d # <i>time emerge grub</i> |
1941 |
|
1942 |
real 1m4.634s |
1943 |
user 0m39.460s |
1944 |
sys 0m15.280s |
1945 |
livecd conf.d # <i>nano -w /boot/grub/grub.conf</i> |
1946 |
</pre> |
1947 |
|
1948 |
<pre caption="Example grub.conf"> |
1949 |
default 0 |
1950 |
timeout 10 |
1951 |
|
1952 |
title=Gentoo |
1953 |
root (hd0,0) |
1954 |
kernel /boot/kernel root=/dev/md3 |
1955 |
</pre> |
1956 |
|
1957 |
<pre caption="Install grub on both disks"> |
1958 |
livecd conf.d # <i>grub</i> |
1959 |
Probing devices to guess BIOS drives. This may take a long time. |
1960 |
|
1961 |
grub> <i>root (hd0,0)</i> |
1962 |
Filesystem type is ext2fs, partition type 0x83 |
1963 |
|
1964 |
grub> <i>setup (hd0)</i> |
1965 |
Checking if "/boot/grub/stage1" exists... yes |
1966 |
Checking if "/boot/grub/stage2" exists... yes |
1967 |
Checking if "/boot/grub/e2fs_stage1_5" exists... yes |
1968 |
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 16 sectors are embedded. |
1969 |
succeeded |
1970 |
Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/ |
1971 |
grub/menu.lst"... succeeded |
1972 |
Done. |
1973 |
|
1974 |
grub> <i>root (hd1,0)</i> |
1975 |
Filesystem type is ext2fs, partition type 0x83 |
1976 |
|
1977 |
grub> <i>setup (hd1)</i> |
1978 |
|
1979 |
grub> <i>quit</i> |
1980 |
</pre> |
1981 |
|
1982 |
</body> |
1983 |
</section> |
1984 |
<section> |
1985 |
<title>Reboot</title> |
1986 |
<body> |
1987 |
|
1988 |
<p> |
1989 |
Exit the chrooted environment, unmount all file systems and reboot: |
1990 |
</p> |
1991 |
|
1992 |
<pre caption="Reboot"> |
1993 |
livecd conf.d # <i>exit</i> |
1994 |
livecd / # <i>umount /mnt/gentoo/usr/portage/distfiles /mnt/gentoo/usr/portage /mnt/gentoo/usr</i> |
1995 |
livecd / # <i>umount /mnt/gentoo/var/tmp /mnt/gentoo/tmp /mnt/gentoo/var /mnt/gentoo/opt</i> |
1996 |
livecd / # <i>umount /mnt/gentoo/proc /mnt/gentoo/home /mnt/gentoo/boot /mnt/gentoo</i> |
1997 |
livecd / # <i>reboot</i> |
1998 |
<comment>(Don't forget to remove the CD)</comment> |
1999 |
</pre> |
2000 |
|
2001 |
<p> |
2002 |
Please follow the <uri |
2003 |
link="gentoo-x86-quickinstall.xml#after-reboot">Finalizing the |
2004 |
Installation</uri> part of the regular x86 quick setup guide to complete your |
2005 |
installation. |
2006 |
</p> |
2007 |
|
2008 |
</body> |
2009 |
</section> |
2010 |
</chapter> |
2011 |
</guide> |
2012 |
|
2013 |
|
2014 |
|
2015 |
-- |
2016 |
gentoo-doc-cvs@g.o mailing list |