| 1 | <?xml version='1.0' encoding='UTF-8'?> |
1 | <?xml version='1.0' encoding='UTF-8'?> |
| 2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 3 | |
3 | |
| 4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 6 | |
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 $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ia64-kernel.xml,v 1.27 2012/09/11 22:49:20 nightmorph Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <version>15</version> |
11 | <version>17</version> |
| 12 | <date>2012-02-22</date> |
12 | <date>2012-09-11</date> |
| 13 | |
13 | |
| 14 | <section> |
14 | <section> |
| 15 | <title>Timezone</title> |
15 | <title>Timezone</title> |
| 16 | <body> |
16 | <body> |
| 17 | |
17 | |
| 18 | <p> |
18 | <p> |
| 19 | You first need to select your timezone so that your system knows where it is |
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 |
20 | located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy |
| 21 | it to <path>/etc/localtime</path>. Please avoid the |
21 | it to <path>/etc/localtime</path>. Please avoid the |
| 22 | <path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not |
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 |
23 | indicate the expected zones. For instance, <path>GMT-8</path> is in fact |
| 24 | GMT+8. |
24 | GMT+8. |
| 25 | </p> |
25 | </p> |
| 26 | |
26 | |
| 27 | <pre caption="Setting the timezone information"> |
27 | <pre caption="Setting the timezone information"> |
| … | |
… | |
| 184 | |
184 | |
| 185 | <comment>(Enable GPT partition label support if you used that previously</comment> |
185 | <comment>(Enable GPT partition label support if you used that previously</comment> |
| 186 | Partition Types ---> |
186 | Partition Types ---> |
| 187 | [*] Advanced partition selection |
187 | [*] Advanced partition selection |
| 188 | ... |
188 | ... |
| 189 | [*] EFI GUID Partition support |
189 | [*] EFI GUID Partition support |
| 190 | </pre> |
190 | </pre> |
| 191 | |
191 | |
| 192 | <p> |
192 | <p> |
| 193 | If you are using PPPoE to connect to the Internet or you are using a dial-up |
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: |
194 | modem, you will need the following options in the kernel: |
| 195 | </p> |
195 | </p> |
| 196 | |
196 | |
| 197 | <pre caption="Selecting PPPoE necessary drivers"> |
197 | <pre caption="Selecting PPPoE necessary drivers"> |
| 198 | Device Drivers ---> |
198 | Device Drivers ---> |
| 199 | Networking Support ---> |
199 | Network device support ---> |
| 200 | <*> PPP (point-to-point protocol) support |
200 | <*> PPP (point-to-point protocol) support |
| 201 | <*> PPP support for async serial ports |
201 | <*> PPP support for async serial ports |
| 202 | <*> PPP support for sync tty ports |
202 | <*> PPP support for sync tty ports |
| 203 | </pre> |
203 | </pre> |
| 204 | |
204 | |
| 205 | <p> |
205 | <p> |
| 206 | The two compression options won't harm but are not definitely needed, neither |
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> |
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. |
208 | when configured to do kernel mode PPPoE. |
| 209 | </p> |
209 | </p> |
| 210 | |
210 | |
| 211 | <p> |
211 | <p> |
| 212 | If you require it, don't forget to include support in the kernel for your |
212 | If you require it, don't forget to include support in the kernel for your |
| 213 | ethernet card. |
213 | ethernet card. |
| 214 | </p> |
214 | </p> |
| … | |
… | |
| 243 | </subsection> |
243 | </subsection> |
| 244 | <subsection id="compiling"> |
244 | <subsection id="compiling"> |
| 245 | <title>Compiling and Installing</title> |
245 | <title>Compiling and Installing</title> |
| 246 | <body> |
246 | <body> |
| 247 | |
247 | |
| 248 | <p> |
248 | <p> |
| 249 | Now that your kernel is configured, it is time to compile and install it. Exit |
249 | Now that your kernel is configured, it is time to compile and install it. Exit |
| 250 | the configuration and start the compilation process: |
250 | the configuration and start the compilation process: |
| 251 | </p> |
251 | </p> |
| 252 | |
252 | |
| 253 | <pre caption="Compiling the kernel"> |
253 | <pre caption="Compiling the kernel"> |
| 254 | # <i>make && make modules_install</i> |
254 | # <i>make && make modules_install</i> |
| 255 | </pre> |
255 | </pre> |
| 256 | |
256 | |
| 257 | <p> |
257 | <p> |
| 258 | When the kernel has finished compiling, copy the kernel image to |
258 | When the kernel has finished compiling, copy the kernel image to <path>/</path>. |
| 259 | <path>/boot</path>. Use whatever name you feel is appropriate for your kernel |
259 | Use whatever name you feel is appropriate for your kernel choice and remember it |
| 260 | choice and remember it as you will need it later on when you configure your |
260 | as you will need it later on when you configure your bootloader. Remember to |
| 261 | bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the |
261 | replace <c>vmlinuz</c> with the name and version of your kernel. |
| 262 | name and version of your kernel. |
|
|
| 263 | </p> |
262 | </p> |
| 264 | |
263 | |
| 265 | <pre caption="Installing the kernel"> |
264 | <pre caption="Installing the kernel"> |
| 266 | # <i>cp vmlinux.gz /boot/<keyval id="kernel-name"/></i> |
265 | # <i>cp vmlinux.gz /boot/vmlinuz</i> |
|
|
266 | </pre> |
|
|
267 | |
|
|
268 | </body> |
|
|
269 | </subsection> |
|
|
270 | <subsection id="initramfs"> |
|
|
271 | <title>(Optional) Building an Initramfs</title> |
|
|
272 | <body> |
|
|
273 | |
|
|
274 | <p> |
|
|
275 | If you use a specific partition layout where important file system locations |
|
|
276 | (like <path>/usr</path> or <path>/var</path>) are on separate partitions, then |
|
|
277 | you will need to setup an initramfs so that this partition can be mounted before |
|
|
278 | it is needed. |
|
|
279 | </p> |
|
|
280 | |
|
|
281 | <p> |
|
|
282 | Without an initramfs, you risk that the system will not boot up properly as the |
|
|
283 | tools that are responsible for mounting the file systems need information that |
|
|
284 | resides on those file systems. An initramfs will pull in the necessary files |
|
|
285 | into an archive which is used right after the kernel boots, but before the |
|
|
286 | control is handed over to the <c>init</c> tool. Scripts on the initramfs will |
|
|
287 | then make sure that the partitions are properly mounted before the system |
|
|
288 | continues booting. |
|
|
289 | </p> |
|
|
290 | |
|
|
291 | <p> |
|
|
292 | To install an initramfs, install <c>genkernel</c> first, then have it |
|
|
293 | generate an initramfs for you. |
|
|
294 | </p> |
|
|
295 | |
|
|
296 | <pre caption="Building an initramfs"> |
|
|
297 | # <i>emerge genkernel</i> |
|
|
298 | # <i>genkernel --bootdir=/. --no-mountboot --install initramfs</i> |
|
|
299 | </pre> |
|
|
300 | |
|
|
301 | <p> |
|
|
302 | If you need specific support in the initramfs, such as lvm or raid, add in the |
|
|
303 | appropriate options to genkernel. See <c>genkernel --help</c> for more |
|
|
304 | information, or the next example which enables support for LVM and software raid |
|
|
305 | (mdadm): |
|
|
306 | </p> |
|
|
307 | |
|
|
308 | <pre caption="Building an initramfs with support for LVM and software raid"> |
|
|
309 | # <i>genkernel --bootdir=/. --no-mountboot --lvm --mdadm --install initramfs</i> |
|
|
310 | </pre> |
|
|
311 | |
|
|
312 | <p> |
|
|
313 | The initramfs will be stored in <path>/</path>. You can find the file by simply |
|
|
314 | listing the files starting with <path>initramfs</path>: |
|
|
315 | </p> |
|
|
316 | |
|
|
317 | <pre caption="Checking the initramfs file name"> |
|
|
318 | # <i>ls /initramfs*</i> |
| 267 | </pre> |
319 | </pre> |
| 268 | |
320 | |
| 269 | <p> |
321 | <p> |
| 270 | Now continue with <uri link="#kernel_modules">Kernel Modules</uri>. |
322 | Now continue with <uri link="#kernel_modules">Kernel Modules</uri>. |
| 271 | </p> |
323 | </p> |
| 272 | |
324 | |
| 273 | </body> |
325 | </body> |
| 274 | </subsection> |
326 | </subsection> |
| 275 | </section> |
327 | </section> |
| 276 | <section id="genkernel"> |
328 | <section id="genkernel"> |
| 277 | <title>Alternative: Using genkernel</title> |
329 | <title>Alternative: Using genkernel</title> |
| 278 | <body> |
330 | <body> |
| 279 | |
331 | |
| 280 | <p> |
332 | <p> |
| 281 | If you are reading this section, you have chosen to use our <c>genkernel</c> |
333 | If you are reading this section, you have chosen to use our <c>genkernel</c> |
| … | |
… | |
| 290 | <c>genkernel</c> to build your kernel, your system will generally detect all |
342 | <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 |
343 | 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 |
344 | 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. |
345 | solution for those users who may not be comfortable compiling their own kernels. |
| 294 | </p> |
346 | </p> |
| 295 | |
347 | |
| 296 | <p> |
348 | <p> |
| 297 | Now, let's see how to use genkernel. First, emerge the genkernel ebuild: |
349 | Now, let's see how to use genkernel. First, emerge the genkernel ebuild: |
| 298 | </p> |
350 | </p> |
| 299 | |
351 | |
| 300 | <pre caption="Emerging genkernel"> |
352 | <pre caption="Emerging genkernel"> |
| 301 | # <i>emerge genkernel</i> |
353 | # <i>emerge genkernel</i> |
| 302 | </pre> |
354 | </pre> |
| 303 | |
355 | |
| 304 | <p> |
356 | <p> |
| 305 | Now, compile your kernel sources by running <c>genkernel all</c>. Be aware |
357 | Now, compile your kernel sources by running <c>genkernel</c>. Be aware |
| 306 | though, as <c>genkernel</c> compiles a kernel that supports almost all hardware, |
358 | though, as <c>genkernel</c> compiles a kernel that supports almost all hardware, |
| 307 | this compilation will take quite a while to finish! |
359 | this compilation will take quite a while to finish! |
| 308 | </p> |
360 | </p> |
| 309 | |
361 | |
| 310 | <note> |
362 | <note> |
| 311 | Users of LVM2 will probably want to add <c>--lvm2</c> to the genkernel |
363 | Users of LVM2 will probably want to add <c>--lvm2</c> to the genkernel |
| 312 | command-line. |
364 | command-line. |
| 313 | </note> |
365 | </note> |
| 314 | |
366 | |
| 315 | <pre caption="Running genkernel"> |
367 | <pre caption="Running genkernel"> |
| 316 | # <i>genkernel all</i> |
368 | # <i>genkernel --bootdir=/. --no-mountboot all</i> |
| 317 | </pre> |
369 | </pre> |
| 318 | |
370 | |
| 319 | <p> |
371 | <p> |
| 320 | Once <c>genkernel</c> completes, a kernel, full set of modules and |
372 | 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 |
373 | <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 |
374 | 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 |
375 | 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 |
376 | the bootloader configuration file. The initrd will be started immediately after |
| 325 | booting to perform hardware autodetection (just like on the Installation CD) |
377 | booting to perform hardware autodetection (just like on the Installation CD) |
| 326 | before your "real" system starts up. |
378 | before your "real" system starts up. |
| 327 | </p> |
379 | </p> |
| 328 | |
380 | |
| 329 | <pre caption="Checking the created kernel image name and initrd"> |
381 | <pre caption="Checking the created kernel image name and initrd"> |
| 330 | # <i>ls /boot/kernel* /boot/initramfs*</i> |
382 | # <i>ls /kernel* /initramfs*</i> |
| 331 | </pre> |
383 | </pre> |
| 332 | |
384 | |
| 333 | </body> |
385 | </body> |
| 334 | </section> |
386 | </section> |
| 335 | <section id="kernel_modules"> |
387 | <section id="kernel_modules"> |
| 336 | <title>Kernel Modules</title> |
388 | <title>Kernel Modules</title> |
| 337 | |
389 | |
| 338 | <subsection> |
390 | <subsection> |
| 339 | <include href="hb-install-kernelmodules.xml"/> |
391 | <include href="hb-install-kernelmodules.xml"/> |
| 340 | </subsection> |
392 | </subsection> |
| 341 | |
393 | |
| 342 | </section> |
394 | </section> |
| 343 | </sections> |
395 | </sections> |