| 1 | <?xml version="1.0" encoding="UTF-8"?> |
1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/kernel-upgrade.xml,v 1.2 2004/12/06 10:07:29 swift Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/kernel-upgrade.xml,v 1.3 2005/04/06 14:36:19 neysx Exp $ --> |
| 3 | |
3 | |
| 4 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
4 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 5 | <guide link="kernel-upgrade.xml"> |
5 | <guide link="/doc/en/kernel-upgrade.xml"> |
| 6 | <title>Gentoo Linux Kernel Upgrade Guide</title> |
6 | <title>Gentoo Linux Kernel Upgrade Guide</title> |
| 7 | <author title="Author"> |
7 | <author title="Author"> |
| 8 | <mail link="dsd@gentoo.org">Daniel Drake</mail> |
8 | <mail link="dsd@gentoo.org">Daniel Drake</mail> |
| 9 | </author> |
9 | </author> |
| 10 | |
10 | |
| … | |
… | |
| 15 | |
15 | |
| 16 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
16 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 17 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
17 | <!-- See http://creativecommons.org/licenses/by-sa/2.0 --> |
| 18 | <license/> |
18 | <license/> |
| 19 | |
19 | |
| 20 | <version>0.1.1</version> |
20 | <version>0.1.2</version> |
| 21 | <date>2004-12-06</date> |
21 | <date>2005-04-06</date> |
| 22 | |
22 | |
| 23 | <chapter> |
23 | <chapter> |
| 24 | <title>Introduction</title> |
24 | <title>Introduction</title> |
| 25 | <section> |
25 | <section> |
| 26 | <body> |
26 | <body> |
| … | |
… | |
| 37 | to another, it will also be useful for users migrating from one kernel |
37 | to another, it will also be useful for users migrating from one kernel |
| 38 | package to another. |
38 | package to another. |
| 39 | </p> |
39 | </p> |
| 40 | |
40 | |
| 41 | <p> |
41 | <p> |
| 42 | <c>gentoo-dev-sources</c> is used as an example in this document, however, the |
42 | <c>gentoo-sources</c> is used as an example in this document, however, the |
| 43 | instructions here also apply to the other packages present in our tree. |
43 | instructions here also apply to the other packages present in our tree. |
| 44 | </p> |
44 | </p> |
| 45 | |
45 | |
| 46 | </body> |
46 | </body> |
| 47 | </section> |
47 | </section> |
| … | |
… | |
| 83 | </p> |
83 | </p> |
| 84 | |
84 | |
| 85 | <pre caption="New kernel sources appearing on update list"> |
85 | <pre caption="New kernel sources appearing on update list"> |
| 86 | # <i>emerge -Dup world</i> |
86 | # <i>emerge -Dup world</i> |
| 87 | Calculating dependencies ...done! |
87 | Calculating dependencies ...done! |
| 88 | [ebuild U ] sys-kernel/gentoo-dev-sources-2.6.9-r2 [2.6.8-r5] |
88 | [ebuild NS ] sys-kernel/gentoo-sources-2.6.9-r2 [2.6.8-r5] |
| 89 | </pre> |
89 | </pre> |
|
|
90 | |
|
|
91 | <note> |
|
|
92 | The "NS" label in the above output means that the new kernel will be installed |
|
|
93 | in a New Slot, i.e. the sources of your old kernel will be kept around, until |
|
|
94 | you manually remove them. |
|
|
95 | </note> |
| 90 | |
96 | |
| 91 | <p> |
97 | <p> |
| 92 | You can then go ahead and install the update, e.g.: |
98 | You can then go ahead and install the update, e.g.: |
| 93 | </p> |
99 | </p> |
| 94 | |
100 | |
| 95 | <pre caption="Upgrading your kernel sources"> |
101 | <pre caption="Upgrading your kernel sources"> |
| 96 | # <i>emerge -u gentoo-dev-sources</i> |
102 | # <i>emerge -u gentoo-sources</i> |
| 97 | </pre> |
103 | </pre> |
| 98 | |
104 | |
| 99 | <p> |
105 | <p> |
| 100 | The kernel sources will then be installed into a subdirectory of |
106 | The kernel sources will then be installed into a subdirectory of |
| 101 | <path>/usr/src</path>. In the above example, my new kernel sources will be |
107 | <path>/usr/src</path>. In the above example, my new kernel sources will be |
| … | |
… | |
| 306 | <p> |
312 | <p> |
| 307 | Continuing on from the last section, you may be happy with your new kernel and |
313 | Continuing on from the last section, you may be happy with your new kernel and |
| 308 | not have any need to keep older kernel versions around. To easily remove all |
314 | not have any need to keep older kernel versions around. To easily remove all |
| 309 | sources for a particular kernel except for the newest one, you can take |
315 | sources for a particular kernel except for the newest one, you can take |
| 310 | advantages of emerge's <e>prune</e> option. Continuing the example using |
316 | advantages of emerge's <e>prune</e> option. Continuing the example using |
| 311 | gentoo-dev-sources: |
317 | gentoo-sources: |
| 312 | </p> |
318 | </p> |
| 313 | |
319 | |
| 314 | <pre caption="Pruning old versions"> |
320 | <pre caption="Pruning old versions"> |
| 315 | # <i>emerge -P gentoo-dev-sources</i> |
321 | # <i>emerge -P gentoo-sources</i> |
| 316 | </pre> |
322 | </pre> |
| 317 | |
323 | |
| 318 | <p> |
324 | <p> |
| 319 | In most cases, temporary files used during compilation will still remain under |
325 | In most cases, temporary files used during compilation will still remain under |
| 320 | the appropriate source directory under <path>/usr/src</path>. It is safe to |
326 | the appropriate source directory under <path>/usr/src</path>. It is safe to |
| … | |
… | |
| 338 | </body> |
344 | </body> |
| 339 | </section> |
345 | </section> |
| 340 | </chapter> |
346 | </chapter> |
| 341 | |
347 | |
| 342 | <chapter> |
348 | <chapter> |
|
|
349 | <title>Advanced: Using your old kernel .config to configure a new one</title> |
|
|
350 | <section> |
|
|
351 | <body> |
|
|
352 | |
|
|
353 | <p> |
|
|
354 | It is sometimes possible to save time by re-using the configuration file from |
|
|
355 | your old kernel when configuring the new one. Note that this is generally |
|
|
356 | unsafe - too many changes between every kernel release for this to be a |
|
|
357 | reliable upgrade path. |
|
|
358 | </p> |
|
|
359 | |
|
|
360 | <p> |
|
|
361 | The only situation where this is appropriate is when upgrading from one Gentoo |
|
|
362 | kernel revision to another. For example, the changes made between |
|
|
363 | <c>gentoo-sources-2.6.9-r1</c> and <c>gentoo-sources-2.6.9-r2</c> will be very |
|
|
364 | small, so it is usually OK to use the following method. However, it is not |
|
|
365 | appropriate to use it in the example used throughout this document: upgrading |
|
|
366 | from 2.6.8 to 2.6.9. Too many changes between the official releases, and the |
|
|
367 | method described below does not display enough context to the user, often |
|
|
368 | resulting in the user running into problems because they disabled options that |
|
|
369 | they really didn't want to. |
|
|
370 | </p> |
|
|
371 | |
|
|
372 | <p> |
|
|
373 | To reuse your old config, you simply need to copy it over and then run <c>make |
|
|
374 | oldconfig</c>. In the following example, we take the config from |
|
|
375 | <c>gentoo-sources-2.6.9-r1</c> and import it into |
|
|
376 | <c>gentoo-sources-2.6.9-r2</c>. |
|
|
377 | </p> |
|
|
378 | |
|
|
379 | <pre caption="Reusing your old config"> |
|
|
380 | # <i>cd /usr/src/linux-2.6.9-gentoo-r2</i> |
|
|
381 | # <i>cp ../linux-2.6.9-gentoo-r1/.config .</i> |
|
|
382 | # <i>make oldconfig</i> |
|
|
383 | </pre> |
|
|
384 | |
|
|
385 | <p> |
|
|
386 | At this point, you may be asked to produce answers for configuration options |
|
|
387 | which have changed between the two versions. Once you have done that, you can |
|
|
388 | compile and install your kernel as normal, without having to go through the |
|
|
389 | <c>menuconfig</c> configuration process. |
|
|
390 | </p> |
|
|
391 | |
|
|
392 | </body> |
|
|
393 | </section> |
|
|
394 | </chapter> |
|
|
395 | |
|
|
396 | <chapter> |
| 343 | <title>Problems after a kernel upgrade?</title> |
397 | <title>Problems after a kernel upgrade?</title> |
| 344 | <section> |
398 | <section> |
| 345 | <body> |
399 | <body> |
| 346 | |
400 | |
| 347 | <p> |
401 | <p> |
| 348 | With the rapid development of the Linux kernel, it is inevitable that some |
402 | With the rapid development of the Linux kernel, it is inevitable that some |
| 349 | changes made from one kernel release to another may cause some problems. If |
403 | changes made from one kernel release to another may cause some problems. If you |
| 350 | you have any issues with the latest versions of |
404 | have any issues with the latest versions of <uri |
| 351 | <uri link="http://www.gentoo.org/doc/en/gentoo-kernel.xml#doc_chap2"> |
405 | link="/doc/en/gentoo-kernel.xml#doc_chap2"> Gentoo-supported kernels</uri> then |
| 352 | Gentoo-supported kernels</uri> then please do report the issues to us. |
406 | please do report the issues to us. |
| 353 | </p> |
407 | </p> |
| 354 | |
408 | |
| 355 | </body> |
409 | </body> |
| 356 | </section> |
410 | </section> |
| 357 | </chapter> |
411 | </chapter> |