1 |
swift |
1.1 |
<?xml version='1.0' encoding="UTF-8"?> |
2 |
|
|
<guide link="/doc/en/quickinstall.xml"> |
3 |
|
|
<title>Gentoo Linux Install Reference</title> |
4 |
|
|
<author title="Author">Steven Wagner</author> |
5 |
|
|
<author title="Editor"> |
6 |
|
|
<mail link="swift@gentoo.org">Sven Vermeulen</mail> |
7 |
|
|
</author> |
8 |
|
|
|
9 |
|
|
<abstract> |
10 |
|
|
The Quick install reference covers all details of the install process in a |
11 |
|
|
non-verbose manner. Users should already have prior experience with |
12 |
swift |
1.2 |
installing gentoo linux if they want to follow this guide. |
13 |
|
|
</abstract> |
14 |
|
|
|
15 |
swift |
1.1 |
<license/> |
16 |
swift |
1.2 |
|
17 |
swift |
1.4 |
<version>1.1</version> |
18 |
|
|
<date>November 1, 2003</date> |
19 |
swift |
1.1 |
|
20 |
|
|
<chapter> |
21 |
|
|
<title>Quick Install Reference</title> |
22 |
|
|
<body> |
23 |
|
|
|
24 |
|
|
<p> |
25 |
|
|
The installation ISOs are on the <uri link= |
26 |
|
|
"http://www.gentoo.org/main/en/mirrors.xml">Gentoo Mirrors</uri>. Detailed |
27 |
|
|
descriptions of the different CDs are available in the <uri |
28 |
|
|
link="http://store.gentoo.org">Gentoo Store</uri>. CD 1 contains |
29 |
|
|
everything you need to install Gentoo Linux quickly and without a |
30 |
|
|
connection to the Internet. CD2 is optional and contains pre-compiled packages |
31 |
|
|
such as KDE, GNOME, OpenOffice, Mozilla, Evolution and more. |
32 |
|
|
</p> |
33 |
|
|
|
34 |
|
|
<p> |
35 |
|
|
Boot from the first Gentoo CD. Press <F1> and/or <F2> to |
36 |
|
|
see what boot options are available. Press <ENTER> at the bootscreen to |
37 |
|
|
continue with the default kernel. You'll eventually receive a prompt. |
38 |
|
|
</p> |
39 |
|
|
|
40 |
|
|
<pre caption="Beginning settings"> |
41 |
|
|
# <i>date</i> (Make sure your time and date is correct. If wrong, set it with <i>date MMDDhhmmCCYY</i> ) |
42 |
|
|
# <i>modprobe module_name</i> (Optional - Load any necessary modules) |
43 |
|
|
# <i>net-setup eth0</i> (Configure the network) |
44 |
|
|
# <i>fdisk /dev/hda</i> (Partition your drive) |
45 |
|
|
</pre> |
46 |
|
|
|
47 |
|
|
<p> |
48 |
|
|
The recommended setup is a 64 meg boot volume with ext3, a swap partition |
49 |
|
|
twice the size of your available RAM, and the rest for your root partition |
50 |
|
|
using ReiserFS. |
51 |
|
|
</p> |
52 |
|
|
|
53 |
|
|
<p> |
54 |
|
|
Initialise your partitions using <c>mke2fs</c> (Ext2), <c>mke2fs |
55 |
|
|
-j</c> (Ext3), <c>mkreiserfs</c> (ReiserFS), <c>mkfs.xfs</c> (XFS), |
56 |
|
|
<c>mkfs.jfs</c> (JFS) and <c>mkswap</c> (swap partition). For instance: |
57 |
|
|
<c>mke2fs -j /dev/hda3</c>. |
58 |
|
|
</p> |
59 |
|
|
|
60 |
|
|
<p> |
61 |
|
|
Continue by mounting the partitions and extracting the appropriate stage |
62 |
|
|
file. |
63 |
|
|
</p> |
64 |
|
|
|
65 |
|
|
<pre caption="Preparing the Installation"> |
66 |
|
|
(Activate the swap partition) # <i>swapon /dev/hdax</i> |
67 |
|
|
(Mount the root partition) # <i>mount /dev/hdax /mnt/gentoo</i> |
68 |
|
|
(Create the boot mountpoint) # <i>mkdir /mnt/gentoo/boot</i> |
69 |
|
|
(Mount the boot partition) # <i>mount /dev/hdax /mnt/gentoo/boot</i> |
70 |
|
|
(Go to the mountpoint) # <i>cd /mnt/gentoo</i> |
71 |
|
|
(Extract a stage tarball...) # <i>tar -xvjpf /mnt/cdrom/stages/stage?-*.tar.bz2</i> |
72 |
|
|
(<comment>or</comment> download the latest tarball...) # <i>links http://gentoo.oregonstate.edu/releases/x86/1.4/</i> |
73 |
|
|
( ... and extract) # <i>tar -xvjpf stage*</i> |
74 |
|
|
(GRP-only: unpack a portage tree) # <i>tar -xvjf /mnt/cdrom/snapshots/portage-*.tar.bz2 -C /mnt/gentoo/usr</i> |
75 |
|
|
(GRP-only: copy over distfiles) # <i>cp -R /mnt/cdrom/distfiles /mnt/gentoo/usr/portage/distfiles</i> |
76 |
|
|
(GRP-only: copy over packages) # <i>cp -a /mnt/cdrom/packages /mnt/gentoo/usr/portage/packages</i> |
77 |
|
|
(Select a mirror) # <i>mirrorselect -i -o >> /mnt/gentoo/etc/make.conf</i> |
78 |
|
|
(Copy over nameserver information) # <i>cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</i> |
79 |
|
|
(Mount the proc filesystem) # <i>mount -t proc proc /mnt/gentoo/proc</i> |
80 |
|
|
(Chroot into the new environment) # <i>chroot /mnt/gentoo /bin/bash</i> |
81 |
|
|
(Load the necessary variables) # <i>env-update; source /etc/profile</i> |
82 |
|
|
(Network-only, non-GRP: update Portage) # <i>emerge sync</i> |
83 |
|
|
</pre> |
84 |
|
|
|
85 |
|
|
<p> |
86 |
|
|
Now we install Gentoo: |
87 |
|
|
</p> |
88 |
|
|
|
89 |
|
|
<pre caption = "Installing Gentoo"> |
90 |
|
|
(Change USE, CFLAGS and CXXFLAGS. Stage1 can also change CHOST) # <i>nano -w /etc/make.conf</i> |
91 |
|
|
(Stage1 only: bootstrap system) # <i>cd /usr/portage; scripts/bootstrap.sh</i> |
92 |
|
|
(Stage1, Stage2 only: install base system) # <i>emerge system</i> |
93 |
|
|
</pre> |
94 |
|
|
|
95 |
|
|
<p> |
96 |
|
|
Next we set up the necessary information: |
97 |
|
|
</p> |
98 |
|
|
|
99 |
|
|
<pre caption = "Setting up Configuration Files"> |
100 |
|
|
(Set timezone information) # <i>ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime</i> |
101 |
|
|
(Edit fstab file) # <i>nano -w /etc/fstab</i> |
102 |
|
|
</pre> |
103 |
|
|
|
104 |
|
|
<p> |
105 |
|
|
Use the following as a <e>template</e> (don't copy verbatim) for |
106 |
|
|
<path>/etc/fstab</path>: |
107 |
|
|
</p> |
108 |
|
|
|
109 |
|
|
<pre caption="/etc/fstab"> |
110 |
|
|
# <fs> <mountpoint> <type> <opts> <dump/pass> |
111 |
|
|
/dev/hdax /boot ext3 noauto,noatime 1 2 |
112 |
|
|
/dev/hdax / reiserfs noatime 0 1 |
113 |
|
|
/dev/hdax none swap sw 0 0 |
114 |
|
|
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,user 0 0 |
115 |
|
|
none /proc proc defaults 0 0 |
116 |
|
|
none /dev/shm tmpfs defaults 0 0 |
117 |
|
|
/dev/hdax /mnt/dosc ntfs ro,noatime,umask=0222 0 0 |
118 |
|
|
</pre> |
119 |
|
|
|
120 |
|
|
<p> |
121 |
|
|
Continue by installing the Linux kernel: |
122 |
|
|
</p> |
123 |
|
|
|
124 |
|
|
<pre caption="Installing the Kernel"> |
125 |
|
|
(Install the kernel sources) # <i>emerge -k sys-kernel/gentoo-sources</i> |
126 |
|
|
(Configure your kernel using genkernel...) # <i>emerge -k genkernel; genkernel</i> |
127 |
|
|
(<comment>or</comment> (1) manually build your kernel) # <i>cd /usr/src/linux; make menuconfig;</i> |
128 |
|
|
( (2) Include VM fs, /proc fs, /dev fs, /dev fs auto mount at boot) |
129 |
|
|
( (3) Compile your kernel) # <i>make dep && make clean bzImage modules modules_install</i> |
130 |
|
|
( (4) Copy over the kernel) # <i>cp arch/i386/boot/bzImage /boot; cp System.map /boot</i> |
131 |
|
|
</pre> |
132 |
|
|
|
133 |
|
|
<p> |
134 |
|
|
Now install other tools you might want: |
135 |
|
|
</p> |
136 |
|
|
|
137 |
|
|
<pre caption = "Install important system tools"> |
138 |
|
|
(Install system logger; choice: sysklogd, metalog, msyslog, syslog-ng) # <i>emerge -k app-admin/syslog-ng </i> |
139 |
|
|
(Have the systemlogger automatically started at boot) # <i>rc-update add syslog-ng default</i> |
140 |
|
|
(Install cron daemon; choice: vcron, dcron, fcron) # <i>emerge -k sys-apps/vcron</i> |
141 |
|
|
(Have the cron daemon automatically started at boot) # <i>rc-update add vcron default</i> |
142 |
|
|
(genkernel users only: install hotplug) # <i>emerge -k hotplug</i> |
143 |
|
|
(genkernel users only: have hotplug automatically started at boot) # <i>rc-update add hotplug default</i> |
144 |
|
|
(Non-ext2,ext3 users only; choice: reiserfsprogs, xfsprogs, jfsutils) # <i>emerge -k reiserfsprogs</i> |
145 |
|
|
</pre> |
146 |
|
|
|
147 |
|
|
<p> |
148 |
|
|
If you need specialised kernel ebuilds, now is a good time to install them: |
149 |
|
|
</p> |
150 |
|
|
|
151 |
|
|
<pre caption = "Install Specialised Kernel Ebuilds"> |
152 |
|
|
# <i>emerge -k pcmcia-cs</i> (or <i>emu10k1</i>, <i>nforce-net</i>, <i>nforce-audio</i>, <i>e100</i>, <i>e1000</i>, <i>ati-drivers</i>, <i>rp-pppoe</i>) |
153 |
|
|
# <i>VIDEO_CARDS="yourcard" emerge xfree-drm</i> (for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and other cards) |
154 |
|
|
</pre> |
155 |
|
|
|
156 |
|
|
<p> |
157 |
|
|
Finalise the settings for your Gentoo system: |
158 |
|
|
</p> |
159 |
|
|
|
160 |
|
|
<pre caption = "Finalise the Configuration Settings"> |
161 |
|
|
(Set root password) # <i>passwd</i> |
162 |
|
|
(Create a user) # <i>useradd your_user -m -G users,wheel,audio -s /bin/bash</i> |
163 |
|
|
(Set password for that user) # <i>passwd your_user</i> |
164 |
|
|
(Set the system hostname) # <i>echo mymachine > /etc/hostname</i> |
165 |
|
|
(Set the system domainname) # <i>echo mydomain.com > /etc/dnsdomainname</i> |
166 |
|
|
(Set the hostsfile, at least set "127.0.0.1 mymachine") # <i>nano -w /etc/hosts</i> |
167 |
|
|
</pre> |
168 |
|
|
|
169 |
|
|
<pre caption = "Set up Networking"> |
170 |
|
|
(Setup networking; dhcp-users should set iface_eth0="dhcp") # <i>nano -w /etc/conf.d/net</i> |
171 |
|
|
(List modules to be loaded at startup) # <i>nano -w /etc/modules.autoload.d/kernel-2.4</i> |
172 |
|
|
(Configure basic system settings; follow comments) # <i>nano -w /etc/rc.conf</i> |
173 |
|
|
(Non-PCMCIA only: start networking automatically at boot) # <i>rc-update add net.eth0 default</i> |
174 |
|
|
(Only if you have multiple network interfaces:) |
175 |
|
|
(1) Create initscripts for each interface) # <i>ln -s /etc/init.d/net.eth0 /etc/init.d/net.ethx</i> |
176 |
|
|
(2) Automatically start at boot if no PCMCIA) # <i>rc-update add net.ethx default</i> |
177 |
|
|
(PCMCIA only: verify /etc/conf.d/pcmcia and load PCMCIA at boot) # <i>rc-update add pcmcia boot</i> |
178 |
|
|
</pre> |
179 |
|
|
|
180 |
|
|
<p> |
181 |
|
|
Now install a bootloader. Left is for grub, right for lilo: |
182 |
|
|
</p> |
183 |
|
|
|
184 |
|
|
<pre caption = "Install and Configure a bootloader"> |
185 |
|
|
# <i>emerge -k grub</i> | # <i>emerge -k lilo</i> |
186 |
|
|
# <i>grub</i> | # <i>nano -w /etc/lilo.conf</i> |
187 |
|
|
grub> <i>root (hd0,0)</i> (Boot partition) | boot=/dev/hda |
188 |
|
|
grub> <i>setup (hd0)</i> (Install on MBR) | prompt |
189 |
|
|
grub> <i>quit</i> | timeout=50 |
190 |
|
|
# <i>nano -w /boot/grub/grub.conf</i> | default=gentoo |
191 |
|
|
default 0 | |
192 |
|
|
timeout 15 | <comment># Genkernel only:</comment> |
193 |
|
|
splashimage=(hd0,0)/grub/splash.xpm.gz | image=/boot/kernel-<comment><kernel version></comment> |
194 |
|
|
| root=/dev/hda3 |
195 |
|
|
title=Gentoo Linux | label=gentoo |
196 |
|
|
root (hd0,0) | |
197 |
|
|
<comment># Genkernel only:</comment> | <comment># Non-genkernel only:</comment> |
198 |
|
|
kernel (hd0,0)/kernel-<comment><kernel version></comment> root=/dev/hda3 | image=/boot/bzImage |
199 |
|
|
initrd (hd0,0)/initrd-<comment><kernel version></comment> | root=/dev/hda3 |
200 |
|
|
<comment># Non-genkernel only:</comment> | label=gentoo |
201 |
|
|
kernel (hd0,0)/bzImage | |
202 |
|
|
| <comment># For dualbooting:</comment> |
203 |
|
|
<comment># For dualbooting:</comment> | other=/dev/hda<comment>X</comment> |
204 |
|
|
title=Windows XP | label=windows |
205 |
|
|
root (hd0,5) | |
206 |
|
|
chainloader (hd0,5)+1 | # <i>/sbin/lilo</i> |
207 |
|
|
</pre> |
208 |
|
|
|
209 |
|
|
<p> |
210 |
|
|
Now unmount all partitions and reboot into your new system: |
211 |
|
|
</p> |
212 |
|
|
|
213 |
|
|
<pre caption="Finishing off and installing GUI"> |
214 |
|
|
(Updating configuration files) # <i>etc-update</i> |
215 |
|
|
(Exiting the chroot) # <i>exit; cd /</i> |
216 |
|
|
(Unmounting partitions) # <i>umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo</i> |
217 |
|
|
(Reboot; Remove the install CD from the tray) # <i>reboot</i> |
218 |
|
|
(After booting:) |
219 |
|
|
(ADSL-users only) # <i>adsl-setup</i> |
220 |
|
|
(GRP-users only, optional CD2 usage) |
221 |
|
|
( (1) Mount CD2) # <i>mount /dev/cdrom /mnt/cdrom</i> |
222 |
|
|
( (2) Copy over packages) # <i>cp -a /mnt/cdrom/packages/* /usr/portage/packages/</i> |
223 |
|
|
( (3) Install extra software) # <i>emerge -k xfree gnome kde mozilla openoffice-bin</i> |
224 |
|
|
( (4) Configure your Xserver) # <i>/usr/X11R6/bin/xf86config</i> |
225 |
|
|
</pre> |
226 |
|
|
|
227 |
|
|
<p> |
228 |
swift |
1.3 |
You can get more information from the <uri link="http://www.gentoo.org/doc/en/index.xml">Gentoo Documentation</uri>. |
229 |
swift |
1.1 |
</p> |
230 |
|
|
</body></chapter> |
231 |
|
|
|
232 |
|
|
</guide> |
233 |
|
|
|