/[gentoo]/xml/htdocs/doc/en/migration-to-2.6.xml
Gentoo

Contents of /xml/htdocs/doc/en/migration-to-2.6.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download) (as text)
Mon Feb 7 19:23:22 2005 UTC (10 years, 4 months ago) by swift
Branch: MAIN
Changes since 1.11: +8 -3 lines
File MIME type: application/xml
#79660 - Additional information for serial mouse users

1 <?xml version='1.0' encoding="UTF-8"?>
2 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3
4 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/migration-to-2.6.xml,v 1.11 2005/01/22 01:24:31 cam Exp $ -->
5
6 <guide link="/doc/en/migration-to-2.6.xml">
7
8 <title>The complete Gentoo Linux 2.6 migration guide</title>
9
10 <author title="Author">
11 <mail link="dsd@gentoo.org">Daniel Drake</mail>
12 </author>
13 <author title="Contributor">
14 <mail link="sergey_zlodey@mail.ru">Sergey Galkin</mail>
15 </author>
16 <author title="Contributor">
17 <mail link="svyatogor@gentoo.org">Sergey Kuleshov</mail>
18 </author>
19 <author title="Editor">
20 <mail link="neysx@gentoo.org">Xavier Neys</mail>
21 </author>
22 <author title="Editor">
23 <mail link="bennyc@gentoo.org">Benny Chuang</mail>
24 </author>
25
26 <abstract>
27 This document will aid you in the process of migrating from Linux 2.4 to Linux
28 2.6, devfs to udev, OSS to ALSA, and LVM to LVM2.
29 </abstract>
30
31 <version>0.2.3</version>
32 <date>2005-02-07</date>
33
34 <chapter>
35 <title>Introduction</title>
36
37 <section>
38 <title>Status of this document</title>
39 <body>
40
41 <p>
42 The migration processes described in this document are not minor changes. This
43 document is in early stages and may be missing some details but hopefully the
44 main things have been covered. If you do try a migration, please <uri
45 link="http://bugs.gentoo.org">report</uri> any problem you might encounter so
46 that we can refine this guide.
47 </p>
48
49 <p>
50 We are planning on making Linux 2.6 the default kernel for when 2005.0 is
51 released (for some arch's). At the same time, we will encourage all existing
52 users of those arch's to upgrade to Linux 2.6, as many will still be running
53 2.4. Your feedback on this document is much appreciated, so that when this
54 time comes, the document can be in good shape for the mass-migration.
55 </p>
56
57 </body>
58 </section>
59
60 <section>
61 <title>Whats new in Linux 2.6?</title>
62 <body>
63
64 <p>
65 That is no easy question to answer. Linux 2.6 is the result of over 2 years
66 of rapid development and stabilisation of new features, and is architectually
67 quite different from its 2.4 counterpart. Some of the more major changes are
68 listed below:
69 </p>
70
71 <ul>
72 <li>
73 Scheduler/Interactivity improvements: Linux feels very smooth on desktop
74 systems and copes much better than 2.4 while under load
75 </li>
76 <li>
77 Scalability: Linux now scales much better at both ends - on small embedded
78 devices and also systems with many processors
79 </li>
80 <li>Performance: Throughput from common applications is much improved</li>
81 <li>
82 Hardware support: Linux now supports many more architectures and hardware
83 devices out-of-the-box than any other operating system.
84 </li>
85 </ul>
86
87 <p>
88 Joseph Pranevich has written a very detailed document, <uri
89 link="http://www.kniggit.net/wwol26.html">The Wonderful World Of Linux
90 2.6</uri> which you may be interested to glance over. If you are interested in
91 the more technical details, you can refer to <uri
92 link="http://www.linux.org.uk/~davej/docs/post-halloween-2.6.txt">The
93 post-halloween document</uri> - but bear in mind that this is somewhat outdated
94 now.
95 </p>
96
97 </body>
98 </section>
99 <section>
100 <title>What is udev?</title>
101 <body>
102
103 <p>
104 In the past, Gentoo has instructed users to use <e>devfs</e> for managing the
105 /dev directory, which contains a series of device interfaces to allow system
106 applications to communicate with hardware (through the kernel).
107 </p>
108
109 <p>
110 <e>devfs</e>, whilst a good concept, has some internal problems, and has been
111 marked obselete in Linux 2.6.
112 </p>
113
114 <p>
115 <e>udev</e> is the new way of managing device nodes. It addresses issues with
116 previous device managers, and also attempts to solve some other problems.
117 </p>
118
119 <p>
120 The above may not mean much to you, but fear not, the hard working Gentoo
121 developers have put effort into making the migration from devfs very easy.
122 </p>
123
124 </body>
125 </section>
126 <section>
127 <title>What is ALSA?</title>
128 <body>
129
130 <p>
131 With Linux 2.4, chances are that you used OSS (open sound system) drivers to
132 power your sound card. OSS has been replaced by a newer and better set of sound
133 drivers: ALSA.
134 </p>
135
136 <p>
137 ALSA, the Advanced Linux Sound Architecture, is a new set of sound drivers with
138 a new and improved API, present in the Linux 2.6 kernel. It is backwards
139 compatible with OSS applications, provided that you select the right kernel
140 configuration options!
141 </p>
142
143 <note>
144 If you do not have any sound/audio hardware, you can safely skip over any
145 ALSA-related instructions in this document.
146 </note>
147
148 </body>
149 </section>
150 <section>
151 <title>What is LVM?</title>
152 <body>
153
154 <p>
155 <e>Logical Volume Management</e> (LVM) exists as set of tools allowing you to
156 manage your disk storage in a very flexible manner. Amongst other things, it
157 allows powerful control over partitions (e.g. resizing without reboot), and
158 makes operations like device changes relatively simple. LVM acts as an
159 alternative to standard partition-based disk management.
160 </p>
161
162 <p>
163 LVM support has historically been implemented in Linux 2.4. Linux 2.6 features
164 a new version of LVM, named <e>LVM2</e>. The migration process requires you to
165 install new versions of the user-level tools (covered later in this document)
166 but will leave your data intact!
167 </p>
168
169 <p>
170 <e>If you do not currently use LVM for data-storage management, then LVM2
171 migration does not apply to you.</e> If this is the case, you can safely ignore
172 any parts of this document referencing LVM/LVM2. Upgrading to Linux 2.6 does
173 <e>not</e> require you to store your data on LVM partitions - you can keep
174 your data in the standard partition-format as it always has been.
175 </p>
176
177 <p>
178 If you are not a LVM user, but you think LVM2 sounds useful for you, you can
179 convert your disks to this format at a later date, by following the
180 <uri link="http://www.gentoo.org/doc/en/lvm2.xml">Gentoo LVM2 Installation
181 Guide</uri>. For now, lets just concentrate on getting a smooth 2.6 migration
182 underway.
183 </p>
184
185 </body>
186 </section>
187 </chapter>
188
189 <chapter>
190 <title>Preparation</title>
191 <section>
192 <title>Get your system up-to-date</title>
193 <body>
194
195 <p>
196 Some of the changes brought in with Linux 2.6 also required some changes in the
197 base system applications. Before continuing, you should ensure that your system
198 is relatively up-to-date, and to be perfectly sure, you should update all world
199 and system packages where updates are available.
200 </p>
201
202 <p>
203 In particular, make sure you have the latest stable versions of the following
204 packages:
205 </p>
206
207 <ul>
208 <li><c>sys-apps/baselayout</c></li>
209 <li><c>sys-apps/util-linux</c></li>
210 <li>
211 <c>sys-kernel/genkernel</c> (only if you wish to use genkernel as opposed
212 to manual configuration)
213 </li>
214 </ul>
215
216 <pre caption="Updating all world packages">
217 # <i>emerge --sync</i>
218 # <i>emerge -ua world</i>
219 </pre>
220
221 </body>
222 </section>
223 <section>
224 <title>modutils vs module-init-tools</title>
225 <body>
226
227 <p>
228 <c>sys-apps/modutils</c> is the package that provides tools such as
229 <c>modprobe</c>, <c>rmmod</c> and <c>insmod</c> for Linux 2.4.
230 </p>
231
232 <p>
233 Linux 2.6 introduces a new module format, and therefore requires new tools for
234 handling modules. These are bundled up into the
235 <c>sys-apps/module-init-tools</c> package. </p>
236
237 <p>
238 You should now remove modutils and install module-init-tools:
239 </p>
240
241 <pre caption="Switching from modutils to module-init-tools">
242 # <i>emerge --unmerge sys-apps/modutils</i>
243 # <i>emerge module-init-tools</i>
244 </pre>
245
246 <note>
247 Don't worry - even though you have just unmerged modutils, module-init-tools
248 provides backwards compatibility for Linux 2.4, so you will still be
249 able to boot into Linux 2.4 and handle modules for that kernel.
250 </note>
251
252 <note>
253 For the above reason, module-init-tools might already be installed and working
254 with your existing Linux 2.4 kernel. In this case, you don't need to worry
255 about this stage - your system is already ready to deal with Linux 2.6 modules.
256 </note>
257
258 </body>
259 </section>
260 <section>
261 <title>Installing udev</title>
262 <body>
263
264 <p>
265 There is no configuration involved here. Simply use <c>emerge</c> to install
266 udev:
267 </p>
268
269 <pre caption="Installing udev">
270 # <i>emerge -a udev</i>
271 </pre>
272
273 <p>
274 You should now read the
275 <uri link="http://www.gentoo.org/doc/en/udev-guide.xml">Gentoo udev
276 Guide</uri> to get a more complete idea about the differences between udev
277 and devfs.
278 </p>
279
280 </body>
281 </section>
282 <section>
283 <title>Checking for essential device nodes</title>
284 <body>
285
286 <p>
287 When the system boots up, the system requires some essential device nodes. As
288 udev is not included in the kernel, it is not activated immediately. To work
289 around this, you must ensure that you have some essential device nodes on your
290 disk.
291 </p>
292
293 <p>
294 Our installation stage files will have created the required devices during the
295 initial installation. However, some users have reported that this is not the
296 case. We will use this opportunity to check that the device files exist, and
297 create them if they do not.
298 </p>
299
300 <p>
301 As your existing device manager will be mounted at /dev, we cannot access it
302 directly. So we will bind-mount your root partition to another location and
303 access the /dev directory from there.
304 </p>
305
306 <pre caption="Bind-mounting your root partition and listing static devices">
307 # <i>mkdir -p /mnt/temp</i>
308 # <i>mount -o bind / /mnt/temp</i>
309 # <i>cd /mnt/temp/dev</i>
310 # <i>ls -l console null</i>
311 </pre>
312
313 <p>
314 If the above <e>ls</e> command reported that either <c>console</c> or
315 <c>null</c> do not exist, then you must create them yourself, as shown below.
316 </p>
317
318 <pre caption="Creating the missing console and null nodes">
319 # <i>mknod -m 660 console c 5 1</i>
320 # <i>mknod -m 660 null c 1 3</i>
321 </pre>
322
323 <p>
324 You should now unmount your bind-mounted root partition, even if you did not
325 have to create those devices:
326 </p>
327
328 <pre caption="Unmounting the bind-mounted root">
329 # <i>cd</i>
330 # <i>umount /mnt/temp</i>
331 # <i>rmdir /mnt/temp</i>
332 </pre>
333
334 </body>
335 </section>
336 <section>
337 <title>Installing ALSA utilities</title>
338 <body>
339
340 <p>
341 ALSA requires you to have some packages installed, so that applications can use
342 the ALSA API. These packages will also allow you to control the mixer and
343 volume levels. Install the required utilities as follows:
344 </p>
345
346 <pre caption="Installing ALSA utilities and libraries">
347 # <i>emerge -a alsa-lib alsa-utils alsa-tools alsa-headers alsa-oss</i>
348 </pre>
349
350 </body>
351 </section>
352 </chapter>
353
354 <chapter>
355 <title>Installing the Linux 2.6 sources</title>
356
357 <section>
358 <title>Choosing and installing a kernel</title>
359 <body>
360
361 <p>
362 The first thing you need to do is install sources of a 2.6 kernel of your
363 choice. The two Gentoo-supported 2.6 kernels are currently
364 <e>gentoo-dev-sources</e> (for desktops) and <e>hardened-dev-sources</e> (for
365 servers). There are others available, see the <uri
366 link="/doc/en/gentoo-kernel.xml">Gentoo Linux Kernel Guide</uri> for more
367 choices.
368 </p>
369
370 <p>
371 In this guide, we'll use <c>gentoo-dev-sources</c> as an example. Install your
372 chosen set of kernel sources using the <c>emerge</c> utility:
373 </p>
374
375 <pre caption="Installing gentoo-dev-sources">
376 # <i>emerge -a gentoo-dev-sources</i>
377 These are the packages that I would merge, in order:
378 Calculating dependencies ...done!
379 [ebuild N ] sys-kernel/gentoo-dev-sources-2.6.9-r2
380
381 Do you want me to merge these packages? [Yes/No] <i>y</i>
382 </pre>
383
384 </body>
385 </section>
386 <section>
387 <title>Updating the /usr/src/linux symbolic link</title>
388 <body>
389
390 <p>
391 Various components of the Gentoo utilities rely on /usr/src/linux being a
392 symbolic link to the kernel sources that you are running (or wish to compile
393 against).
394 </p>
395
396 <p>
397 We will now update our /usr/src/linux link to point at the kernel sources we
398 just installed. Continuing our example:
399 </p>
400
401 <pre caption="Updating the /usr/src/linux softlink">
402 # <i>cd /usr/src</i>
403 # <i>ln -sfn linux-2.6.9-gentoo-r2 linux</i>
404 </pre>
405
406 </body>
407 </section>
408 </chapter>
409
410 <chapter id="pitfalls">
411 <title>Known pitfalls with Linux 2.6 migration</title>
412 <section>
413 <body>
414
415 <p>
416 Before we get stuck into configuring the kernel, I'll attempt to detail the
417 most common errors that people make when migrating to Linux 2.6, as some of
418 these points will influence the way you configure the new kernel.
419 </p>
420
421 <note>
422 Not all of these points are relevant at this stage, but I will detail them all
423 here in one place, and you can refer back at your leisure.
424 </note>
425
426 </body>
427 </section>
428 <section>
429 <title>Don't use "make oldconfig" with a 2.4 .config</title>
430 <body>
431
432 <note>
433 If you don't understand what this means, don't worry, you won't make this
434 mistake if you follow the rest of this guide correctly.
435 </note>
436
437 <p>
438 You'll be asked many many questions, since there have been a large amount of
439 changes. Many people who do try a <c>make oldconfig</c> from a 2.4 config end
440 up creating an unworkable kernel (e.g. no output on-screen, no input from
441 keyboard, etc). Please save yourself the trouble, and use the traditional
442 <c>menuconfig</c> configuration method just this once.
443 </p>
444
445 </body>
446 </section>
447 <section>
448 <title>Don't use ide-scsi for CD/DVD writing</title>
449 <body>
450
451 <p>
452 In Linux 2.4, the only way to achieve good CD/DVD writing results was to enable
453 the (rather ugly) <c>ide-scsi</c> emulation. Thankfully, the IDE layer in Linux
454 2.6 has been extended to support CD/DVD writers much better.
455 </p>
456
457 <p>
458 You don't need to enable any extra options to support CD writing. Just be sure
459 <e>not</e> to enable <c>ide-scsi</c> as you used to.
460 </p>
461
462 </body>
463 </section>
464 <section>
465 <title>PC Speaker is now a configurable option</title>
466 <body>
467
468 <p>
469 You won't get your normal console beeps (or any response from the PC speaker at
470 all) unless you specifically enable the new PC speaker option
471 (<c>CONFIG_INPUT_PCSPKR</c>):
472 </p>
473
474 <pre caption="Location of PC speaker option">
475 Device Drivers ---&gt;
476 Input device support ---&gt;
477 [*] Misc
478 &lt;*&gt; PC Speaker support
479 </pre>
480
481 <note>
482 By "PC speaker", I am referring to the analogue speaker that beeps once when
483 your system is powering up, I am not referring to normal sound hardware used
484 for playing music, etc.
485 </note>
486
487 </body>
488 </section>
489 <section>
490 <title>New USB Storage block device driver sometimes problematic</title>
491 <body>
492
493 <p>
494 Very recently, a new USB storage device driver has been added to the kernel.
495 At the time of writing, this driver ("ub") is still in its early stages and
496 some users find it to be unreliable. If you have problems accessing your USB
497 hard disk, USB flash disk, USB card reader, or USB digital camera, then you
498 could try reverting to the older SCSI-style driver:
499 </p>
500
501 <pre caption="Disabling ub">
502 Device Drivers ---&gt;
503 Block devices ---&gt;
504 &lt; &gt; Low Performance USB Block driver
505 </pre>
506
507 <note>
508 The older SCSI-style driver (USB Mass Storage support) is enabled by default.
509 It can be found under "Device Drivers --&gt; USB support", but will generally
510 not come into effect while ub is also present.
511 </note>
512
513 </body>
514 </section>
515 <section>
516 <title>usbdevfs renamed to usbfs</title>
517 <body>
518
519 <p>
520 If you have edited your <path>/etc/fstab</path> file to customise the way that
521 the USB device filesystem gets mounted, you may have to modify the filesystem
522 type from <e>usbdevfs</e> to <e>usbfs</e>.
523 </p>
524
525 <note>
526 Recent 2.4 kernels will also allow you to use "usbfs" as well as "usbdevfs", so
527 you aren't breaking any backwards compatibility by doing this.
528 </note>
529
530 </body>
531 </section>
532 <section>
533 <title>Don't renice X</title>
534 <body>
535
536 <p>
537 If you are a desktop 2.4 user, you may have hacked your system into running X
538 at a higher priority, as in some cases it seems to provide better desktop
539 performance.
540 </p>
541
542 <p>
543 There have been many scheduler changes in 2.6 which change this behaviour. If
544 you continue to run X at a higher priority, it will do exactly what it is
545 supposed to (run the <e>display server</e> at a very high priority) and you
546 will notice consequences such as sound stuttering and slow application load
547 times because your CPU is spending too long serving X and only X.
548 </p>
549
550 <p>
551 In Linux 2.6, you no longer need to renice desktop applications to get good
552 interactivity. Please remove your "niceness" hacks!
553 </p>
554
555 </body>
556 </section>
557 <section>
558 <title>X11 config file should now use /dev/input/mice for PS/2 and USB
559 mice</title>
560 <body>
561
562 <p>
563 One of the changes that a default udev configuration introduces is different
564 organisation of the mouse device nodes. Previously, you would have had nodes
565 such as <path>/dev/psaux</path> and <path>/dev/mouse</path>. You will now have
566 nodes such as <path>/dev/input/mouse0</path>, <path>/dev/input/mouse1</path>,
567 and a collective <path>/dev/input/mice</path> node which combines movements
568 from all mice.
569 </p>
570
571 <p>
572 Since the old X configurations typically reference <path>/dev/mouse</path> or
573 <path>/dev/psaux</path> then you may get an error similar to the one shown
574 below when you attempt to start X11:
575 </p>
576
577 <pre caption="Common error when starting X on a udev system for the first time">
578 (EE) xf86OpenSerial: Cannot open device /dev/mouse
579 No such file or directory.
580 (EE) Mouse0: cannot open input device
581 (EE) PreInit failed for input device "Mouse0"
582 No core pointer
583 </pre>
584
585 <p>
586 To correct this, open your X11 config in a text editor, and update the mouse
587 <e>InputDevice</e> section to use the <path>/dev/input/mice</path> device. An
588 example is shown below:
589 </p>
590
591 <pre caption="Opening your X11 config file">
592 # <i>nano -w /etc/X11/xorg.conf</i>
593 </pre>
594
595 <note>
596 If you are still using XFree86, your config file will be
597 <path>/etc/X11/XF86Config</path>
598 </note>
599
600 <pre caption="Sample mouse InputDevice section">
601 Section "InputDevice"
602 Identifier "Mouse0"
603 Driver "mouse"
604 Option "Protocol" "auto"
605 Option "Device" "/dev/input/mice"
606 EndSection
607 </pre>
608
609 <note>
610 If you are using a serial mouse, the new device path will be
611 <path>/dev/tts/0</path> instead of <path>/dev/ttyS0</path>.
612 </note>
613
614 </body>
615 </section>
616 <section>
617 <title>New Serial-ATA (SATA) drivers name the devices differently</title>
618 <body>
619
620 <p>
621 If you used the original Serial ATA drivers under Linux 2.4, you probably
622 observed your SATA devices having names such as <c>/dev/hde</c>.
623 </p>
624
625 <p>
626 Linux 2.6 introduces some new SATA drivers (libata) which are based on the
627 SCSI subsystem. As these drivers are based on SCSI, your SATA disks will now
628 show up as SCSI devices. Your first SATA disk will be named <c>/dev/sda</c>.
629 You will need to update your <c>/etc/fstab</c> file to reflect this, and you
630 will need to bear this in mind when choosing the root/real_root kernel boot
631 parameter later on.
632 </p>
633
634 <note>
635 libata has been backported into recent versions of Linux 2.4, so you may
636 already be familiar with the new device naming.
637 </note>
638
639 </body>
640 </section>
641 <section>
642 <title>bootsplash no longer maintained</title>
643 <body>
644
645 <p>
646 If you used the <c>gentoo-sources-2.4</c> kernel, you may have used the
647 <e>bootsplash</e> functionality in order to provide yourself with a colourful
648 framebuffer console.
649 </p>
650
651 <p>
652 The developer of bootsplash appears to have lost interest in his project, given
653 some design problems. However, Gentoo developer <e>Michal Januszewski</e> is
654 developing a successor, <c>gensplash</c>, which in included in the
655 gentoo-dev-sources kernel. You can follow Michals
656 <uri link="http://dev.gentoo.org/~spock/projects/gensplash/archive/gensplash-in-5-easy-steps.txt">
657 Gensplash in 5 easy steps</uri> document in order to familiarize yourself with
658 how gensplash is operated.
659 </p>
660
661 </body>
662 </section>
663 <section>
664 <title>I2C drivers now included in the kernel</title>
665 <body>
666
667 <p>
668 If you use <c>lm-sensors</c> to monitor system temperatures and power levels,
669 you previously needed to install the <c>i2c</c> package in order to provide
670 hardware support.
671 </p>
672
673 <p>
674 The I2C hardware drivers are now included in the Linux 2.6 kernel, no external
675 i2c package is required. Remember to compile support for your specific I2C
676 devices into the kernel configuration. You will then be able to use
677 <c>lm-sensors</c> as usual.
678 </p>
679
680 </body>
681 </section>
682
683
684 </chapter>
685
686 <chapter id="conf">
687 <title>Configuring, building, and installing the kernel</title>
688 <section>
689 <body>
690
691 <p>
692 As with Linux 2.4, you have two options for managing your new kernel build.
693 </p>
694
695 <ol>
696 <li>
697 The default method is to configure your kernel manually. This may seem
698 daunting but is the preferred way as long as you know your system. If you
699 wish to configure your new kernel manually, please continue on to the <uri
700 link="#manual">next chapter</uri>.
701 </li>
702 <li>
703 The alternative option is to use our <c>genkernel</c> utility to
704 automatically configure, compile, and install a kernel for you. If you wish
705 to use <c>genkernel</c> then skip over the next chapter and proceed with
706 <uri link="#genkernel">using genkernel</uri>.
707 </li>
708 </ol>
709
710 </body>
711 </section>
712 </chapter>
713
714 <chapter id="manual">
715 <title>Default: Manual configuration</title>
716 <section>
717 <title>Configuring the kernel</title>
718 <body>
719
720 <p>
721 We'll now get on with configuring the kernel. Open menuconfig in the usual way:
722 </p>
723
724 <pre caption="Invoking menuconfig">
725 # <i>cd /usr/src/linux</i>
726 # <i>make menuconfig</i>
727 </pre>
728
729 <p>
730 You will probably be familiar with using menuconfig from configuring 2.4
731 kernels. Fortunately, the front end has barely changed at all, but you will
732 observe much better organisation of kernel options, plus <e>many</e> new
733 options that weren't present in 2.4.
734 </p>
735
736 <p>
737 Be sure to enable the following important kernel options:
738 </p>
739
740 <pre caption="Required kernel options">
741 File systems ---&gt;
742 Pseudo Filesystems ---&gt;
743 [*] /proc file system support
744 [*] Virtual memory file system support (former shm fs)
745
746 <comment>(the following are required for udev):</comment>
747 General setup ---&gt;
748 [*] Support for hot-pluggable devices
749
750 Device Drivers ---&gt;
751 Block devices ---&gt;
752 &lt;*&gt; RAM disk support
753
754 <comment>(the following are required for ALSA):</comment>
755 Device Drivers ---&gt;
756 Sound ---&gt;
757 &lt;*&gt; Sound card support
758 Advanced Linux Sound Architecture ---&gt;
759 &lt;M&gt; Advanced Linux Sound Architecture
760 &lt;M&gt; Sequencer support
761 &lt;M&gt; OSS Mixer API
762 [*] OSS Sequencer API
763 <comment> (and dont forget to select your soundcard from the submenus!)</comment>
764
765 <comment>(the following are required if you use LVM for disk management):</comment>
766 Device Drivers ---&gt;
767 Multi-device support (RAID and LVM) ---&gt;
768 [*] Multiple devices driver support (RAID and LVM)
769 &lt;*&gt; Device mapper support
770 </pre>
771
772 <warn>
773 Previously you may have included support for the <path>/dev</path> file system
774 (now marked OBSOLETE). Do not enable devfs support. We have installed udev,
775 which we will be using instead of devfs from now on.
776 </warn>
777
778 <p>
779 Also, remember to enable support for the filesystems that you use, and the
780 hardware present in your system. Be sure to enable support for the IDE
781 controller on your motherboard if you wish to benefit from fast DMA disk
782 access. Refer to the <uri
783 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the
784 Kernel</uri> section of the <uri link="/doc/en/handbook/index.xml">Gentoo
785 Handbook</uri> for additional guidance here.
786 </p>
787
788 </body>
789 </section>
790 <section>
791 <title>Building the kernel</title>
792 <body>
793
794 <p>
795 Now that we have configured the kernel, we can start the compilation process:
796 </p>
797
798 <pre caption="Compiling the kernel source">
799 # <i>make &amp;&amp; make modules_install</i>
800 </pre>
801
802 <note>
803 You may recall having to run <c>make dep</c> with Linux 2.4 sources. This is no
804 longer required.
805 </note>
806
807 <p>
808 Wait for the kernel compilation to complete (and observe the much more readable
809 compilation output).
810 </p>
811
812 </body>
813 </section>
814 <section>
815 <title>Installing the kernel</title>
816 <body>
817
818 <p>
819 The next step is mounting your <path>/boot</path> partition and copying the
820 kernel image over. You must then update your bootloader config manually.
821 </p>
822
823 <pre caption="Installing the kernel">
824 # <i>mount /boot</i>
825 # <i>cp arch/i386/boot/bzImage /boot/bzImage-2.6.9-gentoo-r2</i>
826 # <i>cp System.map /boot/System.map-2.6.9-gentoo-r2</i>
827 </pre>
828
829 <p>
830 Note that the above instructions are examples only, you should follow your
831 usual procedure of updating kernels by following the instructions in the <uri
832 link="/doc/en/handbook/index.xml">Gentoo Handbook</uri> (see the <uri
833 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the
834 Kernel</uri> chapter).
835 </p>
836
837 <p>
838 When updating your bootloader config, do not remove the old entry pointing at
839 your 2.4 kernel. This way, you will easily be able to switch between the two if
840 something is not working.
841 </p>
842
843 <p>
844 Now continue onto the <uri link="#modules">Module Configuration</uri> section.
845 </p>
846
847 </body>
848 </section>
849 </chapter>
850
851 <chapter id="genkernel">
852 <title>Alternative: Using genkernel</title>
853 <section>
854 <body>
855
856 <p>
857 If you prefer to use genkernel instead of manually configuring your kernel, you
858 will be happy to hear that using genkernel to produce 2.6 kernels is very
859 similar to the process you performed when producing your previous 2.4 kernel.
860 </p>
861
862 <p>
863 You should invoke genkernel as shown below:
864 </p>
865
866 <pre caption="Invoking genkernel with some common arguments">
867 # <i>genkernel --udev --menuconfig --bootloader=grub all</i>
868 </pre>
869
870 <p>
871 In the above example, we also take advantage of genkernel features to open
872 menuconfig to allow you to customise the kernel configuration (if you wish),
873 and to update the grub bootloader configuration after compilation.
874 </p>
875
876 <p>
877 You should choose genkernel arguments that suit you, but do not forget to
878 include the <c>--udev</c> argument! Refer to the <uri
879 link="/doc/en/genkernel.xml">Gentoo Linux Genkernel Guide</uri> and the <uri
880 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the
881 Kernel</uri> chapter of the <uri link="/doc/en/handbook/index.xml">Gentoo
882 Handbook</uri> for additional information.
883 </p>
884
885 <p>
886 If you choose to update your bootloader config yourself, then you must
887 remember to include the <c>udev</c> kernel parameter. A sample <e>grub</e>
888 config section is shown below, but remember to adjust the <e>real_root</e>
889 parameter for your system.
890 </p>
891
892 <pre caption="Sample GRUB config for genkernel + udev">
893 title=Gentoo Linux (2.6 kernel)
894 root (hd0,0)
895 kernel /kernel-2.6.9-gentoo-r2 <i>udev</i> root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3
896 initrd /initrd-2.6.9-gentoo-r2
897 </pre>
898
899 </body>
900 </section>
901 </chapter>
902
903 <chapter id="modules">
904 <title>Module Configuration</title>
905
906 <section>
907 <title>Installing external modules</title>
908 <body>
909
910 <p>
911 Many users will additionally rely on kernel modules that are built outside of
912 the kernel tree. Common examples are the binary ATI and Nvidia graphics
913 drivers. You now need to install those modules, which will compile against the
914 2.6 sources found at <path>/usr/src/linux</path>. This is the usual case of
915 <c>emerge packagename</c> for all the external modules you are used to using
916 with 2.4.
917 </p>
918
919 <p>
920 Refer again to the <uri
921 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the
922 Kernel</uri> chapter of the <uri link="/doc/en/handbook/index.xml">Gentoo
923 Handbook</uri> for more info.
924 </p>
925
926 </body>
927 </section>
928 <section>
929 <title>Autoloading modules</title>
930 <body>
931
932 <p>
933 You may have decided to compile some kernel components as modules (as opposed
934 to compiled directly into the kernel) and would like to have them autoloaded on
935 bootup like you did with 2.4. Also, if you installed any external modules from
936 the portage tree (as described above) you will probably want to autoload them
937 too.
938 </p>
939
940 <p>
941 You can achieve this similarly as to how you did with 2.4. Simply open up the
942 file <path>/etc/modules.autoload.d/kernel-2.6</path> in a text editor and list
943 the names of the modules you would like autoloaded.
944 </p>
945
946 <pre caption="Opening the module autoload list in nano">
947 # <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
948 </pre>
949
950 <pre caption="Sample autoload list to load the 3c59x and nvidia modules">
951 # /etc/modules.autoload.d/kernel-2.6: kernel modules to load when system boots.
952 #
953 # Note that this file is for 2.6 kernels.
954 #
955 # Add the names of modules that you'd like to load when the system
956 # starts into this file, one per line. Comments begin with # and
957 # are ignored. Read man modules.autoload for additional details.
958
959 3c59x
960 nvidia
961 </pre>
962
963 </body>
964 </section>
965 </chapter>
966
967 <chapter>
968 <title>LVM to LVM2 migration</title>
969 <section>
970 <title>Upgrading to LVM2 tools</title>
971 <body>
972
973 <note>
974 If you do not use LVM to manage your disk storage, you can safely skip
975 this chapter and skip onto the next.
976 </note>
977
978 <p>
979 Fortunately, upgrading from the LVM1 user tools to the LVM2 versions is very
980 simple:
981 </p>
982
983 <pre caption="Upgrading user-tools from LVM1 to LVM2">
984 # <i>emerge --unmerge lvm-user</i>
985 # <i>emerge lvm2</i>
986 </pre>
987
988 <note>
989 The LVM2 tools are fully backwards-compatible with LVM1. Your disk data will
990 not be touched. You are not breaking any backwards-compatibility by doing
991 this, you will continue to be able to boot 2.4 as usual.
992 </note>
993
994 </body>
995 </section>
996 </chapter>
997
998 <chapter>
999 <title>Booting into Linux 2.6</title>
1000 <section>
1001 <body>
1002
1003 <p>
1004 It's now time to boot into Linux 2.6. Close all applications and reboot:
1005 </p>
1006
1007 <pre caption="Rebooting">
1008 # <i>umount /boot</i>
1009 # <i>reboot</i>
1010 </pre>
1011
1012 <p>
1013 When you reboot, if you followed this document correctly so far, you will have
1014 the option of either loading Linux 2.4 or Linux 2.6 from your bootloader.
1015 Choose Linux 2.6.
1016 </p>
1017
1018 <p>
1019 Once the system has booted, check that things are working. If you made a
1020 mistake in the kernel configuration, don't worry, you can skip back to the
1021 <uri link="#conf">Configuring, building, and installing the kernel</uri>
1022 section, make your change, recompile and install new kernel image, reboot, and
1023 try again!
1024 </p>
1025
1026 </body>
1027 </section>
1028 <section>
1029 <title>Configuring and unmuting ALSA</title>
1030 <body>
1031
1032 <p>
1033 We will now complete the ALSA configuration and unmute the audio channels. The
1034 ALSA packages provide a useful utility to make this process relatively simple:
1035 </p>
1036
1037 <pre caption="Invoking the automatic ALSA configuration utility">
1038 # <i>alsaconf</i>
1039 </pre>
1040
1041 <p>
1042 The process is straightforward: allow the <e>/etc/modules.d/alsa</e> file to
1043 be automatically updated, and then allow ALSA to be reloaded. alsaconf will
1044 then terminate, however you will need to run it multiple times if you have
1045 multiple sound devices installed in your system.
1046 </p>
1047
1048 <p>
1049 You should now add <c>alsasound</c> to your boot runlevel, so that volumes
1050 will be saved on shutdown and restored on bootup:
1051 </p>
1052
1053 <pre caption="Adding alsasound to the boot runlevel">
1054 # <i>rc-update add alsasound boot</i>
1055 </pre>
1056
1057 <note>
1058 The <c>alsaconf</c> utility chooses initial volume levels for your sound
1059 devices. If these are inappropriate, you can modify them at any time with the
1060 <c>alsamixer</c> utility.
1061 </note>
1062
1063 </body>
1064 </section>
1065 <section>
1066 <title>Any immediate problems?</title>
1067 <body>
1068
1069 <p>
1070 At this stage you should refer back to the <uri link="#pitfalls">Known
1071 pitfalls with Linux 2.6 migration</uri> section which may be helpful with any
1072 issues you encounter immediately.
1073 </p>
1074
1075 </body>
1076 </section>
1077 </chapter>
1078
1079 <chapter>
1080 <title>Header files and NPTL</title>
1081 <section>
1082 <body>
1083
1084 <p>
1085 By now you are running Linux 2.6 and hopefully have all issues ironed out. You
1086 should now update your Linux kernel header files and re-merge glibc so that
1087 userspace applications can take advantage of new Linux 2.6 features.
1088 </p>
1089
1090 <pre caption="Updating to linux26-headers">
1091 # <i>emerge --unmerge linux-headers</i>
1092 # <i>emerge linux26-headers</i>
1093 </pre>
1094
1095 <p>
1096 After updating your headers package, you should generally re-merge glibc.
1097 There is a new feature here that you may be interested in - NPTL. NPTL is a new
1098 threading model present in Linux 2.6, which features much quicker thread create
1099 and destroy times. This won't make much of a difference to most systems, but
1100 you may wish to enable it during this migration process! To enable NPTL, edit
1101 <path>/etc/make.conf</path>, adding <e>nptl</e> to your USE variable.
1102 </p>
1103
1104 <warn>
1105 With the current stable glibc ebuilds, you will be unable to boot a 2.4 kernel
1106 after compiling glibc with USE="nptl". Be warned, be careful!
1107 </warn>
1108
1109 <p>
1110 Now re-merge glibc (you should do this even if you did not choose to enable
1111 NPTL).
1112 </p>
1113
1114 <pre caption="Reinstalling glibc against the new kernel headers">
1115 # <i>emerge -a glibc</i>
1116 </pre>
1117
1118 <p>
1119 If you enabled NPTL, existing binaries will not use it until they are
1120 recompiled. However, any binaries compiled from this point onwards <e>will</e>
1121 use NPTL. You may wish to recompile all binaries now, e.g.:
1122 </p>
1123
1124 <pre caption="Recompiling all packages on the system">
1125 # <i>emerge -e world</i>
1126 </pre>
1127
1128 <p>
1129 Alternatively, you can just let your system "naturally" convert itself to NPTL
1130 as you update to newer versions of packages when they are released.
1131 </p>
1132
1133 </body>
1134 </section>
1135 </chapter>
1136
1137 <chapter>
1138 <title>Closing remarks</title>
1139 <section>
1140 <title>Problems?</title>
1141 <body>
1142
1143 <p>
1144 With the incredible amount of work that went into Linux 2.6, it is sometimes
1145 inevitable that things which used to work fine, no longer function as expected.
1146 </p>
1147
1148 <p>
1149 If you have any problems with your 2.6 kernel, and you can confirm that this
1150 problem does not exist with Linux 2.4, then please open a bug with us on our
1151 <uri link="http://bugs.gentoo.org">Bugzilla</uri>. We will investigate the
1152 issue, and if we find that it is a problem in the mainline kernel, we may then
1153 ask you to file a report at the central kernel bugzilla.
1154 </p>
1155
1156 </body>
1157 </section>
1158 <section>
1159 <title>Conclusion</title>
1160 <body>
1161
1162 <p>
1163 Hopefully you have just completed a smooth migration and you are enjoying the
1164 benefits which Linux 2.6 brings over 2.4. As I mentioned at the start, we are
1165 looking for feedback on this document - even if your migration went perfectly
1166 smoothly. Please <mail link="dsd@gentoo.org">mail me</mail> your feedback so
1167 that we can get this document in perfect shape for when 2005.0 comes around.
1168 Thanks!
1169 </p>
1170
1171 </body>
1172 </section>
1173 <section>
1174 <title>Removing Linux 2.4 from your system</title>
1175 <body>
1176
1177 <p>
1178 After you have been running 2.6 for a while, you may decide that you no longer
1179 have any requirement to be able to use Linux 2.4. The steps you can take to
1180 clean up your system are detailed below. <e>Only follow the procedure in this
1181 section if you are sure that you don't want/need to use 2.4 again!</e>
1182 </p>
1183
1184 <p>
1185 The 2.4 kernel source code can be removed, using the emerge utility as usual.
1186 For example, assuming you have 2.4 versions of vanilla-sources and
1187 gentoo-sources installed, you could use the following command to remove them
1188 while keeping the 2.6 versions intact:
1189 </p>
1190
1191 <pre caption="Example: Removing Linux 2.4 sources">
1192 # <i>emerge --unmerge =vanilla-sources-2.4.* =gentoo-sources-2.4.*</i>
1193 </pre>
1194
1195 <p>
1196 Portage will not completely clean out your 2.4 kernel source installations,
1197 because some temporary files are created during compilation. It is safe to
1198 remove these remnants with the following command:
1199 </p>
1200
1201 <pre caption="Removing remaining temporary files">
1202 # <i>rm -rf /usr/src/linux-2.4.*</i>
1203 </pre>
1204
1205 <p>
1206 You can additionally remove modules and information files relating to your
1207 old 2.4 kernel installations, as these are no longer needed.
1208 </p>
1209
1210 <pre caption="Removing previously-installed 2.4 modules">
1211 # <i>rm -rf /lib/modules/2.4.*</i>
1212 </pre>
1213
1214 <p>
1215 The 2.4 kernel binaries you used to boot from can also be safely removed.
1216 You should mount your <c>/boot</c> partition, and remove those images. You
1217 should also update your bootloader configuration so that it no longer
1218 references these deleted kernel images.
1219 </p>
1220
1221 <p>
1222 Some Linux 2.4 users will have previously installed the <c>alsa-driver</c>
1223 package to benefit from the new audio capabilities included in Linux 2.6. If
1224 you were one of these users, and you followed the advice given earlier in this
1225 document about building ALSA with the 2.6 kernel sources (as opposed to using
1226 the <c>alsa-driver</c> package), then you can safely remove this to prevent
1227 future conflicts.
1228 </p>
1229
1230 <p>
1231 Additionally, <c>lm-sensors</c> users will have previously used the <c>i2c</c>
1232 package to provide the hardware drivers. As already mentioned, I2C drivers are
1233 now included in the kernel, so this package can also be removed in order to
1234 prevent future conflicts.
1235 </p>
1236
1237 <p>
1238 The devfs management daemon, <c>devfsd</c>, can also safely be removed, now
1239 that we are using <c>udev</c> for device management.
1240 </p>
1241
1242 <pre caption="Removing alsa-driver, i2c, and devfsd">
1243 # <i>emerge --unmerge alsa-driver i2c devfsd</i>
1244 </pre>
1245
1246 <p>
1247 If you are LVM2 user, you may wish to convert your data into the LVM2 data
1248 format in order to benefit from the advantages which LVM2 provides.
1249 However, this operation will prevent you from ever accessing your LVM data
1250 from a 2.4 kernel. If you want to continue with the conversion (this is totally
1251 optional!), then you should examine the <c>vgconvert</c> man page for
1252 instructions on how to carry this out. An example is shown below, where
1253 <c>main</c> is the volume group name.
1254 </p>
1255
1256 <pre caption="Converting a LVM1 volume to LVM2 format">
1257 # <i>vgconvert -M2 main</i>
1258 </pre>
1259
1260 </body>
1261 </section>
1262 </chapter>
1263 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20