1 |
<?xml version='1.0' encoding='UTF-8'?> |
2 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
3 |
|
4 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
5 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
6 |
|
7 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ia64-kernel.xml,v 1.25 2012/02/22 21:27:45 swift Exp $ --> |
8 |
|
9 |
<sections> |
10 |
|
11 |
<version>16</version> |
12 |
<date>2012-03-27</date> |
13 |
|
14 |
<section> |
15 |
<title>Timezone</title> |
16 |
<body> |
17 |
|
18 |
<p> |
19 |
You first need to select your timezone so that your system knows where it is |
20 |
located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy |
21 |
it to <path>/etc/localtime</path>. Please avoid the |
22 |
<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not |
23 |
indicate the expected zones. For instance, <path>GMT-8</path> is in fact |
24 |
GMT+8. |
25 |
</p> |
26 |
|
27 |
<pre caption="Setting the timezone information"> |
28 |
# <i>ls /usr/share/zoneinfo</i> |
29 |
<comment>(Suppose you want to use Europe/Brussels)</comment> |
30 |
# <i>cp /usr/share/zoneinfo/Europe/Brussels /etc/localtime</i> |
31 |
<comment>(Next set the timezone)</comment> |
32 |
# <i>echo "Europe/Brussels" > /etc/timezone</i> |
33 |
</pre> |
34 |
|
35 |
</body> |
36 |
</section> |
37 |
<section> |
38 |
<title>Installing the Sources</title> |
39 |
<subsection> |
40 |
<title>Choosing a Kernel</title> |
41 |
<body> |
42 |
|
43 |
<p> |
44 |
The core around which all distributions are built is the Linux kernel. It is the |
45 |
layer between the user programs and your system hardware. Gentoo provides its |
46 |
users several possible kernel sources. A full listing with description is |
47 |
available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel |
48 |
Guide</uri>. |
49 |
</p> |
50 |
|
51 |
<p> |
52 |
For <keyval id="arch"/> systems, we will use <c>gentoo-sources</c> (contains |
53 |
additional patches for extra features). |
54 |
</p> |
55 |
|
56 |
<p> |
57 |
Now install it using <c>emerge</c>. |
58 |
</p> |
59 |
|
60 |
<pre caption="Installing a kernel source"> |
61 |
# <i>emerge gentoo-sources</i> |
62 |
</pre> |
63 |
|
64 |
<p> |
65 |
When you take a look in <path>/usr/src</path> you should see a symlink called |
66 |
<path>linux</path> pointing to your kernel source. In this case, the installed |
67 |
kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>. |
68 |
Your version may be different, so keep this in mind. |
69 |
</p> |
70 |
|
71 |
<pre caption="Viewing the kernel source symlink"> |
72 |
# <i>ls -l /usr/src/linux</i> |
73 |
lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-<keyval id="kernel-version"/> |
74 |
</pre> |
75 |
|
76 |
<p> |
77 |
Now it is time to configure and compile your kernel source. You can use |
78 |
<c>genkernel</c> for this, which will build a generic kernel as used by the |
79 |
Installation CD. We explain the "manual" configuration first though, as it is |
80 |
the best way to optimize your environment. |
81 |
</p> |
82 |
|
83 |
<p> |
84 |
If you want to manually configure your kernel, continue now with <uri |
85 |
link="#manual">Default: Manual Configuration</uri>. If you want to use |
86 |
<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using |
87 |
genkernel</uri> instead. |
88 |
</p> |
89 |
|
90 |
</body> |
91 |
</subsection> |
92 |
</section> |
93 |
<section id="manual"> |
94 |
<title>Default: Manual Configuration</title> |
95 |
<subsection> |
96 |
<title>Introduction</title> |
97 |
<body> |
98 |
|
99 |
<p> |
100 |
Manually configuring a kernel is often seen as the most difficult procedure a |
101 |
Linux user ever has to perform. Nothing is less true -- after configuring a |
102 |
couple of kernels you don't even remember that it was difficult ;) |
103 |
</p> |
104 |
|
105 |
<p> |
106 |
However, one thing <e>is</e> true: you must know your system when you start |
107 |
configuring a kernel manually. Most information can be gathered by emerging |
108 |
pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now |
109 |
be able to use <c>lspci</c> within the chrooted environment. You may safely |
110 |
ignore any <e>pcilib</e> warnings (like pcilib: cannot open |
111 |
/sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run |
112 |
<c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same. |
113 |
You can also run <c>lsmod</c> to see what kernel modules the Installation CD |
114 |
uses (it might provide you with a nice hint on what to enable). |
115 |
</p> |
116 |
|
117 |
<p> |
118 |
Now go to your kernel source directory and execute <c>make menuconfig</c>. This |
119 |
will fire up an ncurses-based configuration menu. |
120 |
</p> |
121 |
|
122 |
<pre caption="Invoking menuconfig"> |
123 |
# <i>cd /usr/src/linux</i> |
124 |
# <i>make menuconfig</i> |
125 |
</pre> |
126 |
|
127 |
<p> |
128 |
You will be greeted with several configuration sections. We'll first list some |
129 |
options you must activate (otherwise Gentoo will not function, or not function |
130 |
properly without additional tweaks). |
131 |
</p> |
132 |
|
133 |
</body> |
134 |
</subsection> |
135 |
<subsection> |
136 |
<title>Activating Required Options</title> |
137 |
<body> |
138 |
|
139 |
<p> |
140 |
Make sure that every driver that is vital to the booting of your system (such as |
141 |
SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module, |
142 |
otherwise your system will not be able to boot completely. |
143 |
</p> |
144 |
|
145 |
<p> |
146 |
Now select the correct system type and processor type. If you don't know what |
147 |
kind of IA64 system type you have, <c>DIG-compliant</c> is a good default |
148 |
choice. If you are installing on an SGI system make sure you select the |
149 |
SGI system type, your kernel may just lock up and refuse to boot otherwise. |
150 |
</p> |
151 |
|
152 |
<pre caption="Selecting correct system type"> |
153 |
System type ---> |
154 |
<comment>(Change according to your system)</comment> |
155 |
<i>DIG-compliant</i> |
156 |
Processor type ---> |
157 |
<comment>(Change according to your system)</comment> |
158 |
<i>Itanium 2</i> |
159 |
</pre> |
160 |
|
161 |
<p> |
162 |
Now go to <c>File Systems</c> and select support for the filesystems you use. |
163 |
<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be |
164 |
able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc |
165 |
file system</c>. |
166 |
</p> |
167 |
|
168 |
<pre caption="Selecting necessary file systems"> |
169 |
File systems ---> |
170 |
Pseudo Filesystems ---> |
171 |
[*] /proc file system support |
172 |
[*] Virtual memory file system support (former shm fs) |
173 |
|
174 |
<comment>(Select one or more of the following options as needed by your system)</comment> |
175 |
<*> Reiserfs support |
176 |
<*> Ext3 journalling file system support |
177 |
<*> JFS filesystem support |
178 |
<*> Second extended fs support |
179 |
<*> XFS filesystem support |
180 |
|
181 |
<comment>(Be sure to enable VFAT support for the EFI partition)</comment> |
182 |
DOS/FAT/NT Filesystems ---> |
183 |
<*> VFAT (Windows-95) fs support |
184 |
|
185 |
<comment>(Enable GPT partition label support if you used that previously</comment> |
186 |
Partition Types ---> |
187 |
[*] Advanced partition selection |
188 |
... |
189 |
[*] EFI GUID Partition support |
190 |
</pre> |
191 |
|
192 |
<p> |
193 |
If you are using PPPoE to connect to the Internet or you are using a dial-up |
194 |
modem, you will need the following options in the kernel: |
195 |
</p> |
196 |
|
197 |
<pre caption="Selecting PPPoE necessary drivers"> |
198 |
Device Drivers ---> |
199 |
Network device support ---> |
200 |
<*> PPP (point-to-point protocol) support |
201 |
<*> PPP support for async serial ports |
202 |
<*> PPP support for sync tty ports |
203 |
</pre> |
204 |
|
205 |
<p> |
206 |
The two compression options won't harm but are not definitely needed, neither |
207 |
does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c> |
208 |
when configured to do kernel mode PPPoE. |
209 |
</p> |
210 |
|
211 |
<p> |
212 |
If you require it, don't forget to include support in the kernel for your |
213 |
ethernet card. |
214 |
</p> |
215 |
|
216 |
<p> |
217 |
If you have an Intel CPU that supports HyperThreading (tm), or you have a |
218 |
multi-CPU system, you should activate "Symmetric multi-processing support": |
219 |
</p> |
220 |
|
221 |
<pre caption="Activating SMP support"> |
222 |
Processor type and features ---> |
223 |
[*] Symmetric multi-processing support |
224 |
</pre> |
225 |
|
226 |
<p> |
227 |
If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable |
228 |
those as well: |
229 |
</p> |
230 |
|
231 |
<pre caption="Activating USB Support for Input Devices"> |
232 |
Device Drivers ---> |
233 |
[*] HID Devices ---> |
234 |
<*> USB Human Interface Device (full HID) support |
235 |
</pre> |
236 |
|
237 |
<p> |
238 |
When you've finished configuring the kernel, continue with <uri |
239 |
link="#compiling">Compiling and Installing</uri>. |
240 |
</p> |
241 |
|
242 |
</body> |
243 |
</subsection> |
244 |
<subsection id="compiling"> |
245 |
<title>Compiling and Installing</title> |
246 |
<body> |
247 |
|
248 |
<p> |
249 |
Now that your kernel is configured, it is time to compile and install it. Exit |
250 |
the configuration and start the compilation process: |
251 |
</p> |
252 |
|
253 |
<pre caption="Compiling the kernel"> |
254 |
# <i>make && make modules_install</i> |
255 |
</pre> |
256 |
|
257 |
<p> |
258 |
When the kernel has finished compiling, copy the kernel image to |
259 |
<path>/boot</path>. Use whatever name you feel is appropriate for your kernel |
260 |
choice and remember it as you will need it later on when you configure your |
261 |
bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the |
262 |
name and version of your kernel. |
263 |
</p> |
264 |
|
265 |
<pre caption="Installing the kernel"> |
266 |
# <i>cp vmlinux.gz /boot/<keyval id="kernel-name"/></i> |
267 |
</pre> |
268 |
|
269 |
<p> |
270 |
Now continue with <uri link="#kernel_modules">Kernel Modules</uri>. |
271 |
</p> |
272 |
|
273 |
</body> |
274 |
</subsection> |
275 |
</section> |
276 |
<section id="genkernel"> |
277 |
<title>Alternative: Using genkernel</title> |
278 |
<body> |
279 |
|
280 |
<p> |
281 |
If you are reading this section, you have chosen to use our <c>genkernel</c> |
282 |
script to configure your kernel for you. |
283 |
</p> |
284 |
|
285 |
<p> |
286 |
Now that your kernel source tree is installed, it's now time to compile your |
287 |
kernel by using our <c>genkernel</c> script to automatically build a kernel for |
288 |
you. <c>genkernel</c> works by configuring a kernel nearly identically to the |
289 |
way our Installation CD kernel is configured. This means that when you use |
290 |
<c>genkernel</c> to build your kernel, your system will generally detect all |
291 |
your hardware at boot-time, just like our Installation CD does. Because |
292 |
genkernel doesn't require any manual kernel configuration, it is an ideal |
293 |
solution for those users who may not be comfortable compiling their own kernels. |
294 |
</p> |
295 |
|
296 |
<p> |
297 |
Now, let's see how to use genkernel. First, emerge the genkernel ebuild: |
298 |
</p> |
299 |
|
300 |
<pre caption="Emerging genkernel"> |
301 |
# <i>emerge genkernel</i> |
302 |
</pre> |
303 |
|
304 |
<p> |
305 |
Now, compile your kernel sources by running <c>genkernel all</c>. Be aware |
306 |
though, as <c>genkernel</c> compiles a kernel that supports almost all hardware, |
307 |
this compilation will take quite a while to finish! |
308 |
</p> |
309 |
|
310 |
<note> |
311 |
Users of LVM2 will probably want to add <c>--lvm2</c> to the genkernel |
312 |
command-line. |
313 |
</note> |
314 |
|
315 |
<pre caption="Running genkernel"> |
316 |
# <i>genkernel all</i> |
317 |
</pre> |
318 |
|
319 |
<p> |
320 |
Once <c>genkernel</c> completes, a kernel, full set of modules and |
321 |
<e>initial ram disk</e> (initramfs) will be created. We will use the kernel |
322 |
and initrd when configuring a boot loader later in this document. Write |
323 |
down the names of the kernel and initrd as you will need it when writing |
324 |
the bootloader configuration file. The initrd will be started immediately after |
325 |
booting to perform hardware autodetection (just like on the Installation CD) |
326 |
before your "real" system starts up. |
327 |
</p> |
328 |
|
329 |
<pre caption="Checking the created kernel image name and initrd"> |
330 |
# <i>ls /boot/kernel* /boot/initramfs*</i> |
331 |
</pre> |
332 |
|
333 |
</body> |
334 |
</section> |
335 |
<section id="kernel_modules"> |
336 |
<title>Kernel Modules</title> |
337 |
|
338 |
<subsection> |
339 |
<include href="hb-install-kernelmodules.xml"/> |
340 |
</subsection> |
341 |
|
342 |
</section> |
343 |
</sections> |