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