1 |
<?xml version='1.0' encoding="UTF-8"?> |
2 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v 1.42 2005/07/30 14:56:57 swift 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 |
<license/> |
21 |
|
22 |
<version>2.4</version> |
23 |
<date>2005-08-01</date> |
24 |
|
25 |
<chapter> |
26 |
<title>Quick Install Guide</title> |
27 |
<section> |
28 |
<title>Installation Media</title> |
29 |
<body> |
30 |
|
31 |
<p> |
32 |
Download a CD from one of our <uri link="/main/en/mirrors.xml">mirrors</uri>. |
33 |
You can find the ISOs in |
34 |
<path>releases/<architecture>/<release>/installcd</path>. The |
35 |
<e>minimal</e> installation cd is only useful for internet-based installations; |
36 |
with the <e>universal</e> installation cd you can perform a networkless |
37 |
installation as well. |
38 |
</p> |
39 |
|
40 |
<p> |
41 |
<uri link="/doc/en/faq.xml#isoburning">Burn</uri> the CD and boot it. Press |
42 |
<c>F2</c> at the boot screen to find out what boot options exist. Once booted, |
43 |
you need to start the <c>pcmcia</c> init script if you need PCMCIA support. |
44 |
</p> |
45 |
|
46 |
<p> |
47 |
The installation cds allow you to start an <c>sshd</c> server, add additional |
48 |
users, run <c>irssi</c> (a command-line chat client) and surf the web using |
49 |
<c>lynx</c> or <c>links2</c>. |
50 |
</p> |
51 |
|
52 |
</body> |
53 |
</section> |
54 |
<section> |
55 |
<title>Network Configuration</title> |
56 |
<body> |
57 |
|
58 |
<p> |
59 |
If your network does not work already, you can use <c>net-setup</c> to configure |
60 |
your network. You might need to load support for your network card using |
61 |
<c>modprobe</c> prior to the configuration. If you have ADSL, use |
62 |
<c>adsl-setup</c> and <c>adsl-start</c>. For PPTP support, first edit |
63 |
<path>/etc/ppp/chap-secrets</path> and <path>/etc/ppp/options.pptp</path> and |
64 |
then use <c>pptp <server ip></c>. |
65 |
</p> |
66 |
|
67 |
<p> |
68 |
For wireless access, use <c>iwconfig</c> to set the wireless parameters and then |
69 |
use eiter <c>net-setup</c> again or run <c>ifconfig</c>, <c>dhcpcd</c> and/or |
70 |
<c>route</c> manually. |
71 |
</p> |
72 |
|
73 |
<p> |
74 |
If you are behind a proxy, do not forget to initialise your system using |
75 |
<c>export http_proxy</c>, <c>ftp_proxy</c> and <c>RSYNC_PROXY</c>. |
76 |
</p> |
77 |
|
78 |
</body> |
79 |
</section> |
80 |
<section> |
81 |
<title>Preparing the Disks</title> |
82 |
<body> |
83 |
|
84 |
<p> |
85 |
Use <c>fdisk</c> or <c>cfdisk</c> to create your partition layout. You need at |
86 |
least a swap partition (type 82) and one Linux partition (type 83). |
87 |
</p> |
88 |
|
89 |
<p> |
90 |
Use <c>mke2fs</c>, <c>mke2fs -j</c>, <c>mkreiserfs</c>, <c>mkfs.xfs</c> and |
91 |
<c>mkfs.jfs</c> to create file systems on your Linux partitions. Initialise your |
92 |
swap partition using <c>mkswap</c> and <c>swapon</c>. |
93 |
</p> |
94 |
|
95 |
<p> |
96 |
Mount the freshly created file systems on <path>/mnt/gentoo</path>. Create |
97 |
directories for the other mount points (like <path>/mnt/gentoo/boot</path>) if |
98 |
you need them. |
99 |
</p> |
100 |
|
101 |
</body> |
102 |
</section> |
103 |
<section> |
104 |
<title>Setting Up The Stage</title> |
105 |
<body> |
106 |
|
107 |
<p> |
108 |
First make sure your date is set correctly using <c>date MMDDhhmmYYYY</c>. Next, |
109 |
download a stage from one of our <uri link="/main/en/mirrors.xml">mirrors</uri> |
110 |
or use the one available on the installation CD |
111 |
(<path>/mnt/cdrom/stages</path>). Go to <path>/mnt/gentoo</path> and unpack the |
112 |
stage using <c>tar -xvjpf <stage tarball></c>. |
113 |
</p> |
114 |
|
115 |
<p> |
116 |
Install a Portage snapshot if you are performing a networkless installation: go |
117 |
to <path>/mnt/gentoo/usr</path> and run |
118 |
<c>tar -xvjf /mnt/cdrom/snapshots/<snapshot></c>. Other users |
119 |
can download a portage snapshot and install it likewise. |
120 |
</p> |
121 |
|
122 |
<p> |
123 |
Edit <path>/mnt/gentoo/etc/make.conf</path> to suit your needs (USE flag, CFLAGS |
124 |
and CXXFLAGS). You can use the <c>nano</c> editor for this. |
125 |
</p> |
126 |
|
127 |
</body> |
128 |
</section> |
129 |
<section> |
130 |
<title>Installing the Gentoo Base System</title> |
131 |
<body> |
132 |
|
133 |
<p> |
134 |
Mount the <path>/proc</path> file system first, copy over the |
135 |
<path>/etc/resolv.conf</path> file and then chroot into your Gentoo |
136 |
environment. |
137 |
</p> |
138 |
|
139 |
<pre caption="Preparing and chrooting"> |
140 |
# <i>mount -t proc none /mnt/gentoo/proc</i> |
141 |
# <i>cp /etc/resolv.conf /mnt/gentoo/etc/</i> |
142 |
# <i>chroot /mnt/gentoo /bin/bash</i> |
143 |
# <i>env-update</i> && <i>source /etc/profile</i> |
144 |
</pre> |
145 |
|
146 |
<p> |
147 |
If you are not running a networkless installation, issue <c>emerge --sync</c> to |
148 |
update your Portage tree. |
149 |
</p> |
150 |
|
151 |
<p> |
152 |
Next, make sure <path>/etc/make.profile</path> points to the right profile. The |
153 |
default one should suffice for most users; subprofiles are available for |
154 |
different kernels (like <path>2.4/</path> for 2.4-kernel based profiles). Change |
155 |
the profile using <c>ln -sf</c>. |
156 |
</p> |
157 |
|
158 |
<ul> |
159 |
<li> |
160 |
Bootstrapping (not available for networkless installations) happens using |
161 |
<c>scripts/bootstrap.sh</c> in the <path>/usr/portage</path> directory. |
162 |
</li> |
163 |
<li> |
164 |
System installation (not available for networkless installations) happens |
165 |
using <c>emerge -e system</c> (or <c>-N</c> if you haven't |
166 |
altered the default CFLAGS/CXXFLAGS). |
167 |
</li> |
168 |
</ul> |
169 |
|
170 |
<p> |
171 |
Stage3 users (except those performing a networkless installation) need to |
172 |
upgrade the baselayout package: |
173 |
</p> |
174 |
|
175 |
<pre caption="Upgrading baselayout"> |
176 |
# <i>CONFIG_PROTECT="-*" emerge baselayout</i> |
177 |
</pre> |
178 |
|
179 |
</body> |
180 |
</section> |
181 |
<section> |
182 |
<title>Kernel Configuration</title> |
183 |
<body> |
184 |
|
185 |
<p> |
186 |
Set your time zone information by changing the <path>/etc/localtime</path> |
187 |
symbolic link to the correct location in <path>/usr/share/zoneinfo</path> using |
188 |
<c>ln -sf</c>. |
189 |
</p> |
190 |
|
191 |
<p> |
192 |
Install a kernel source (<c>gentoo-sources</c> and <c>vanilla-sources</c> are |
193 |
available for networkless installations) and configure it using <c>make |
194 |
menuconfig</c> followed by <c>make &&make modules_install</c> |
195 |
inside <path>/usr/src/linux</path>. Copy the <path>arch/i386/bzImage</path> file |
196 |
over to <path>/boot</path>. You can also <c>emerge genkernel</c> |
197 |
and use <c>genkernel --udev all</c>. |
198 |
</p> |
199 |
|
200 |
<p> |
201 |
Genkernel users will need to <c>emerge coldplug</c> and |
202 |
<c>rc-update add coldplug default</c>. |
203 |
</p> |
204 |
|
205 |
</body> |
206 |
</section> |
207 |
<section> |
208 |
<title>Configuring the System</title> |
209 |
<body> |
210 |
|
211 |
<p> |
212 |
Edit your <path>/etc/fstab</path>; an example follows: |
213 |
</p> |
214 |
|
215 |
<pre caption="Example fstab"> |
216 |
/dev/hda1 /boot ext2 defaults,noatime 1 2 |
217 |
/dev/hda2 none swap sw 0 0 |
218 |
/dev/hda3 / ext3 noatime 0 1 |
219 |
none /proc proc defaults 0 0 |
220 |
none /dev/shm tmpfs nodev,nosuid,noexec 0 0 |
221 |
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0 |
222 |
</pre> |
223 |
|
224 |
<p> |
225 |
Edit <path>/etc/conf.d/hostname</path> and <path>/etc/conf.d/domainname</path>, |
226 |
run <c>rc-update add domainname default</c> and edit |
227 |
<path>/etc/conf.d/net</path> to |
228 |
configure your network. Add the <c>net.eth0</c> initscript to the default |
229 |
runlevel. If you have multiple NICs, symlink them to the <c>net.eth0</c> |
230 |
init script and add them to the default runlevel as well. |
231 |
</p> |
232 |
|
233 |
<p> |
234 |
Edit <path>/etc/hosts</path>; examples are given below: |
235 |
</p> |
236 |
|
237 |
<pre caption="Example /etc/hosts"> |
238 |
<comment>(For static IPs)</comment> |
239 |
127.0.0.1 localhost |
240 |
192.168.0.5 jenny.homenetwork jenny |
241 |
192.168.0.6 benny.homenetwork benny |
242 |
192.168.0.7 tux.homenetwork tux |
243 |
|
244 |
<comment>(For a dynamic IP)</comment> |
245 |
127.0.0.1 localhost.homenetwork tux localhost |
246 |
</pre> |
247 |
|
248 |
<p> |
249 |
Emerge <c>pcmcia-cs</c> and add it to the default runlevel if you need it. |
250 |
</p> |
251 |
|
252 |
<p> |
253 |
Set the root password using <c>passwd</c>. |
254 |
</p> |
255 |
|
256 |
<p> |
257 |
Set the necessary system configuration in <path>/etc/rc.conf</path>, |
258 |
<path>/etc/conf.d/rc</path>, <path>/etc/conf.d/keymaps</path>, |
259 |
<path>/etc/conf.d/clock</path>. |
260 |
</p> |
261 |
|
262 |
</body> |
263 |
</section> |
264 |
<section> |
265 |
<title>Installing System Tools</title> |
266 |
<body> |
267 |
|
268 |
<p> |
269 |
2.4 kernel users need to <c>emerge --unmerge udev</c> and |
270 |
<c>emerge devfsd</c>. |
271 |
</p> |
272 |
|
273 |
<p> |
274 |
Install a system logger like <c>syslog-ng</c> and add it to the default |
275 |
run level. Do the same for a cron daemon like <c>vixie-cron</c> (optional). |
276 |
</p> |
277 |
|
278 |
<p> |
279 |
Install the necessary file system tools (<c>xfsprogs</c>, <c>reiserfsprogs</c> |
280 |
or <c>jfsutils</c>) and networking tools (<c>dhcpcd</c> or <c>rp-pppoe</c>). |
281 |
</p> |
282 |
|
283 |
</body> |
284 |
</section> |
285 |
<section> |
286 |
<title>Configuring the Bootloader</title> |
287 |
<body> |
288 |
|
289 |
<p> |
290 |
Emerge <c>grub</c> or <c>lilo</c>. Edit <path>/boot/grub/grub.conf</path> or |
291 |
<path>/etc/lilo.conf</path> to your likings. Below you will find an example for |
292 |
each. |
293 |
</p> |
294 |
|
295 |
<pre caption="Example grub.conf"> |
296 |
default 0 |
297 |
timeout 30 |
298 |
splashimage=(hd0,0)/grub/splash.xpm.gz |
299 |
|
300 |
<comment># genkernel users</comment> |
301 |
title=Gentoo Linux 2.6.11-r3 |
302 |
root (hd0,0) |
303 |
kernel /kernel-genkernel-x86-2.6.11-gentoo-r3 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev |
304 |
initrd /initramfs-genkernel-x86-2.6.11-gentoo-r3 |
305 |
|
306 |
<comment># non-genkernel users (no initrd)</comment> |
307 |
title=Gentoo Linux 2.6.11 r3 |
308 |
root (hd0,0) |
309 |
kernel /kernel-2.6.11-gentoo-r3 root=/dev/hda3 |
310 |
|
311 |
<comment># Only in case you want to dual-boot</comment> |
312 |
title=Windows XP |
313 |
root (hd0,5) |
314 |
makeactive |
315 |
chainloader +1 |
316 |
</pre> |
317 |
|
318 |
<pre caption="Example lilo.conf"> |
319 |
boot=/dev/hda |
320 |
prompt |
321 |
timeout=50 |
322 |
default=gentoo |
323 |
|
324 |
<comment># For non-genkernel users</comment> |
325 |
image=/boot/kernel-2.6.11-gentoo-r3 |
326 |
label=gentoo |
327 |
read-only |
328 |
root=/dev/hda3 |
329 |
|
330 |
<comment># For genkernel users</comment> |
331 |
image=/boot/kernel-genkernel-x86-2.6.11-gentoo-r3 |
332 |
label=gentoo |
333 |
read-only |
334 |
root=/dev/ram0 |
335 |
append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev" |
336 |
initrd=/boot/initramfs-genkernel-x86-2.6.11-gentoo-r3 |
337 |
|
338 |
<comment># For dual-booting</comment> |
339 |
other=/dev/hda6 |
340 |
label=windows |
341 |
</pre> |
342 |
|
343 |
<p> |
344 |
GRUB users need to install GRUB in the MBR using |
345 |
<c>grub-install /dev/hda</c> after copying <path>/proc/mounts</path> to |
346 |
<path>/etc/mtab</path>. LILO users need to run <c>/sbin/lilo</c>. |
347 |
</p> |
348 |
|
349 |
<p> |
350 |
Exit the chrooted environment, unmount all file systems and reboot. |
351 |
</p> |
352 |
|
353 |
</body> |
354 |
</section> |
355 |
<section> |
356 |
<title>Finalizing the Installation</title> |
357 |
<body> |
358 |
|
359 |
<p> |
360 |
Log in as <c>root</c>, then add one or more users for day-to-day use using |
361 |
<c>useradd -m -G <groups> <username></c>. |
362 |
</p> |
363 |
|
364 |
<p> |
365 |
If you performed a networkless installation, mount the packages CD at |
366 |
<path>/mnt/cdrom</path> and <c>export PKGDIR="/mnt/cdrom"</c> after which |
367 |
you can <c>emerge -k <package></c> to install additional |
368 |
software like <c>kde</c>. |
369 |
</p> |
370 |
|
371 |
<p> |
372 |
Thanks for installing Gentoo! |
373 |
</p> |
374 |
|
375 |
</body> |
376 |
</section> |
377 |
</chapter> |
378 |
</guide> |