1 |
<?xml version='1.0' encoding="UTF-8"?> |
2 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v 1.49 2005/10/14 13:24:25 neysx Exp $ --> |
3 |
|
4 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
5 |
|
6 |
<guide link="/doc/en/gentoo-x86-quickinstall.xml"> |
7 |
<title>Gentoo Linux x86 Quick Install Guide</title> |
8 |
|
9 |
<author title="Author"> |
10 |
<mail link="swift@gentoo.org">Sven Vermeulen</mail> |
11 |
</author> |
12 |
<author title="Author">Steven Wagner</author> |
13 |
|
14 |
<abstract> |
15 |
The Quick install guide covers the Gentoo install process in a |
16 |
non-verbose manner. Users should already have prior experience with |
17 |
installing Gentoo Linux if they want to follow this guide. |
18 |
</abstract> |
19 |
|
20 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
21 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
22 |
<license/> |
23 |
|
24 |
<version>2.9</version> |
25 |
<date>2005-12-21</date> |
26 |
|
27 |
<chapter> |
28 |
<title>Quick Install Guide</title> |
29 |
<section> |
30 |
<title>Installation Media</title> |
31 |
<body> |
32 |
|
33 |
<p> |
34 |
Download a CD from one of our <uri link="/main/en/mirrors.xml">mirrors</uri>. |
35 |
You can find the ISOs in |
36 |
<path>releases/<architecture>/<release>/installcd</path>. The |
37 |
<e>minimal</e> installation CD is only useful for Internet-based installations; |
38 |
with the <e>universal</e> installation CD you can perform a networkless |
39 |
installation as well. |
40 |
</p> |
41 |
|
42 |
<p> |
43 |
<uri link="/doc/en/faq.xml#isoburning">Burn</uri> the CD and boot it. Press |
44 |
<c>F2</c> at the boot screen to find out what boot options exist. Once booted, |
45 |
you need to start the <c>pcmcia</c> init script if you need PCMCIA support. |
46 |
</p> |
47 |
|
48 |
<p> |
49 |
The installation CDs allow you to start an <c>sshd</c> server, add additional |
50 |
users, run <c>irssi</c> (a command-line chat client) and surf the web using |
51 |
<c>lynx</c> or <c>links2</c>. |
52 |
</p> |
53 |
|
54 |
</body> |
55 |
</section> |
56 |
<section> |
57 |
<title>Network Configuration</title> |
58 |
<body> |
59 |
|
60 |
<p> |
61 |
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 |
63 |
<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 |
65 |
<path>/etc/ppp/chap-secrets</path> and <path>/etc/ppp/options.pptp</path> and |
66 |
then use <c>pptp <server ip></c>. |
67 |
</p> |
68 |
|
69 |
<p> |
70 |
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 |
72 |
<c>route</c> manually. |
73 |
</p> |
74 |
|
75 |
<p> |
76 |
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>. |
78 |
</p> |
79 |
|
80 |
</body> |
81 |
</section> |
82 |
<section> |
83 |
<title>Preparing the Disks</title> |
84 |
<body> |
85 |
|
86 |
<p> |
87 |
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). |
89 |
</p> |
90 |
|
91 |
<p> |
92 |
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 |
94 |
swap partition using <c>mkswap</c> and <c>swapon</c>. |
95 |
</p> |
96 |
|
97 |
<p> |
98 |
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 |
100 |
you need them. |
101 |
</p> |
102 |
|
103 |
</body> |
104 |
</section> |
105 |
<section> |
106 |
<title>Setting Up The Stage</title> |
107 |
<body> |
108 |
|
109 |
<p> |
110 |
First make sure your date is set correctly using <c>date MMDDhhmmYYYY</c>. Next, |
111 |
download a stage from one of our <uri link="/main/en/mirrors.xml">mirrors</uri> |
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> |
118 |
Install a Portage snapshot if you are performing a networkless installation: go |
119 |
to <path>/mnt/gentoo/usr</path> and run |
120 |
<c>tar -xvjf /mnt/cdrom/snapshots/<snapshot></c>. Other users |
121 |
can download a portage snapshot and install it likewise. |
122 |
</p> |
123 |
|
124 |
<p> |
125 |
For a networkless installation, copy over the source code files from |
126 |
<path>/mnt/cdrom/distfiles/</path> to |
127 |
<path>/mnt/gentoo/usr/portage/distfiles/</path>. |
128 |
</p> |
129 |
|
130 |
<p> |
131 |
Edit <path>/mnt/gentoo/etc/make.conf</path> to suit your needs (USE flags, |
132 |
CFLAGS and CXXFLAGS). You can use the <c>nano</c> editor for this. |
133 |
</p> |
134 |
|
135 |
</body> |
136 |
</section> |
137 |
<section> |
138 |
<title>Installing the Gentoo Base System</title> |
139 |
<body> |
140 |
|
141 |
<p> |
142 |
Mount the <path>/proc</path> file system first, copy over the |
143 |
<path>/etc/resolv.conf</path> file and then chroot into your Gentoo |
144 |
environment. |
145 |
</p> |
146 |
|
147 |
<pre caption="Preparing and chrooting"> |
148 |
# <i>mount -t proc none /mnt/gentoo/proc</i> |
149 |
# <i>cp /etc/resolv.conf /mnt/gentoo/etc/</i> |
150 |
# <i>chroot /mnt/gentoo /bin/bash</i> |
151 |
# <i>env-update</i> && <i>source /etc/profile</i> |
152 |
</pre> |
153 |
|
154 |
<p> |
155 |
If you are not running a networkless installation, issue <c>emerge --sync</c> to |
156 |
update your Portage tree. |
157 |
</p> |
158 |
|
159 |
<p> |
160 |
Next, make sure <path>/etc/make.profile</path> points to the right profile. The |
161 |
default one should suffice for most users; sub profiles are available for |
162 |
different kernels (like <path>2.4/</path> for 2.4-kernel based profiles). Change |
163 |
the profile using <c>ln -sfn</c>. |
164 |
</p> |
165 |
|
166 |
<ul> |
167 |
<li> |
168 |
Bootstrapping (not available for networkless installations) happens using |
169 |
<c>scripts/bootstrap.sh</c> in the <path>/usr/portage</path> directory. |
170 |
</li> |
171 |
<li> |
172 |
System installation (not available for networkless installations) happens |
173 |
using <c>emerge -e system</c> (or <c>-N</c> if you haven't |
174 |
altered the default CFLAGS/CXXFLAGS). |
175 |
</li> |
176 |
</ul> |
177 |
|
178 |
</body> |
179 |
</section> |
180 |
<section> |
181 |
<title>Kernel Configuration</title> |
182 |
<body> |
183 |
|
184 |
<p> |
185 |
Set your time zone information by copying correct file from |
186 |
<path>/usr/share/zoneinfo</path> over the <path>/etc/localtime</path> file. |
187 |
</p> |
188 |
|
189 |
<p> |
190 |
Install a kernel source (<c>gentoo-sources</c> and <c>vanilla-sources</c> are |
191 |
available for networkless installations) and configure it using <c>make |
192 |
menuconfig</c> followed by |
193 |
<c>make && make modules_install</c> inside |
194 |
<path>/usr/src/linux</path>. Copy the <path>arch/i386/boot/bzImage</path> file |
195 |
over to <path>/boot</path>. You can also <c>emerge genkernel</c> and use |
196 |
<c>genkernel all</c>. |
197 |
</p> |
198 |
|
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> |
205 |
</section> |
206 |
<section> |
207 |
<title>Configuring the System</title> |
208 |
<body> |
209 |
|
210 |
<p> |
211 |
Edit your <path>/etc/fstab</path>; an example follows: |
212 |
</p> |
213 |
|
214 |
<pre caption="Example fstab"> |
215 |
/dev/hda1 /boot ext2 defaults,noatime 1 2 |
216 |
/dev/hda2 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> |
222 |
|
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> |
231 |
|
232 |
<p> |
233 |
Edit <path>/etc/hosts</path>; examples are given below: |
234 |
</p> |
235 |
|
236 |
<pre caption="Example /etc/hosts"> |
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. |
249 |
</p> |
250 |
|
251 |
<p> |
252 |
Set the root password using <c>passwd</c>. |
253 |
</p> |
254 |
|
255 |
<p> |
256 |
Set the necessary system configuration in <path>/etc/rc.conf</path>, |
257 |
<path>/etc/conf.d/rc</path>, <path>/etc/conf.d/keymaps</path>, |
258 |
<path>/etc/conf.d/clock</path>. |
259 |
</p> |
260 |
|
261 |
</body> |
262 |
</section> |
263 |
<section> |
264 |
<title>Installing System Tools</title> |
265 |
<body> |
266 |
|
267 |
<p> |
268 |
Users of a 2.4 kernel need to run <c>emerge --unmerge udev</c> and |
269 |
<c>emerge devfsd</c>. |
270 |
</p> |
271 |
|
272 |
<p> |
273 |
Install a system logger like <c>syslog-ng</c> and add it to the default |
274 |
run level. Do the same for a cron daemon like <c>vixie-cron</c> (optional). |
275 |
</p> |
276 |
|
277 |
<p> |
278 |
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>). |
280 |
</p> |
281 |
|
282 |
</body> |
283 |
</section> |
284 |
<section> |
285 |
<title>Configuring the Bootloader</title> |
286 |
<body> |
287 |
|
288 |
<p> |
289 |
Emerge <c>grub</c> or <c>lilo</c>. Edit <path>/boot/grub/grub.conf</path> or |
290 |
<path>/etc/lilo.conf</path> to your likings. Below you will find an example for |
291 |
each. |
292 |
</p> |
293 |
|
294 |
<pre caption="Example grub.conf"> |
295 |
default 0 |
296 |
timeout 30 |
297 |
splashimage=(hd0,0)/grub/splash.xpm.gz |
298 |
|
299 |
<comment># genkernel users</comment> |
300 |
title=Gentoo Linux 2.6.11-r3 |
301 |
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 |
303 |
initrd /initramfs-genkernel-x86-2.6.11-gentoo-r3 |
304 |
|
305 |
<comment># non-genkernel users (no initrd)</comment> |
306 |
title=Gentoo Linux 2.6.11 r3 |
307 |
root (hd0,0) |
308 |
kernel /kernel-2.6.11-gentoo-r3 root=/dev/hda3 |
309 |
|
310 |
<comment># Only in case you want to dual-boot</comment> |
311 |
title=Windows XP |
312 |
root (hd0,5) |
313 |
makeactive |
314 |
chainloader +1 |
315 |
</pre> |
316 |
|
317 |
<pre caption="Example lilo.conf"> |
318 |
boot=/dev/hda |
319 |
prompt |
320 |
timeout=50 |
321 |
default=gentoo |
322 |
|
323 |
<comment># For non-genkernel users</comment> |
324 |
image=/boot/kernel-2.6.11-gentoo-r3 |
325 |
label=gentoo |
326 |
read-only |
327 |
root=/dev/hda3 |
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> |
341 |
|
342 |
<p> |
343 |
GRUB users need to install GRUB in the MBR using |
344 |
<c>grub-install /dev/hda</c> after copying <path>/proc/mounts</path> to |
345 |
<path>/etc/mtab</path>. LILO users need to run <c>/sbin/lilo</c>. |
346 |
</p> |
347 |
|
348 |
<p> |
349 |
Exit the chrooted environment, unmount all file systems and reboot. |
350 |
</p> |
351 |
|
352 |
</body> |
353 |
</section> |
354 |
<section> |
355 |
<title>Finalizing the Installation</title> |
356 |
<body> |
357 |
|
358 |
<p> |
359 |
Log in as <c>root</c>, then add one or more users for day-to-day use using |
360 |
<c>useradd -m -G <groups> <username></c>. |
361 |
</p> |
362 |
|
363 |
<p> |
364 |
If you performed a networkless installation, mount the packages CD at |
365 |
<path>/mnt/cdrom</path> and <c>export PKGDIR="/mnt/cdrom"</c> after which |
366 |
you can <c>emerge -k <package></c> to install additional |
367 |
software like <c>kde</c>. |
368 |
</p> |
369 |
|
370 |
<p> |
371 |
Thanks for installing Gentoo! |
372 |
</p> |
373 |
|
374 |
</body> |
375 |
</section> |
376 |
</chapter> |
377 |
</guide> |