/[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.1 - (hide annotations) (download) (as text)
Tue Nov 9 22:05:05 2004 UTC (9 years, 9 months ago) by neysx
Branch: MAIN
File MIME type: application/xml
Adding migration-to-2.6.xml from #36716

1 neysx 1.1 <?xml version='1.0' encoding="UTF-8"?>
2     <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3    
4     <!-- $Header:$ -->
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    
23     <abstract>
24     This document will aid you in the process of migrating from Linux 2.4 to Linux
25     2.6, devfs to udev and OSS to ALSA.
26     </abstract>
27    
28     <version>0.1.0</version>
29     <date>November 9, 2004</date>
30    
31     <chapter>
32     <title>Introduction</title>
33    
34     <section>
35     <title>Status of this document</title>
36     <body>
37    
38     <p>
39     The migration processes described in this document are not minor changes. This
40     document is in early stages and may be missing some details but hopefully the
41     main things have been covered. If you do try a migration, please <uri
42     link="http://bugs.gentoo.org">report</uri> any problem you might encounter so
43     that we can refine this guide.
44     </p>
45    
46     <p>
47     We are planning on making Linux 2.6 the default kernel for when 2005.0 is
48     released (for some arch's). At the same time, we will encourage all existing
49     users of those arch's to upgrade to Linux 2.6, as many will still be running
50     2.4. Your feedback on this document is much appreciated, so that when this
51     time comes, the document can be in good shape for the mass-migration.
52     </p>
53    
54     </body>
55     </section>
56    
57     <section>
58     <title>Whats new in Linux 2.6?</title>
59     <body>
60    
61     <p>
62     That is no easy question to answer. Linux 2.6 is the result of over 2 years
63     of rapid development and stabilisation of new features, and is architectually
64     quite different from its 2.4 counterpart. Some of the more major changes are
65     listed below:
66     </p>
67    
68     <ul>
69     <li>
70     Scheduler/Interactivity improvements: Linux feels very smooth on desktop
71     systems and copes much better than 2.4 while under load
72     </li>
73     <li>
74     Scalability: Linux now scales much better at both ends - on small embedded
75     devices and also systems with many processors
76     </li>
77     <li>Performance: Throughput from common applications is much improved</li>
78     <li>
79     Hardware support: Linux now supports many more architectures and hardware
80     devices out-of-the-box than any other operating system.
81     </li>
82     </ul>
83    
84     <p>
85     Joseph Pranevich has written a very detailed document, <uri
86     link="http://www.kniggit.net/wwol26.html">The Wonderful World Of Linux
87     2.6</uri> which you may be interested to glance over. If you are interested in
88     the more technical details, you can refer to <uri
89     link="http://www.linux.org.uk/~davej/docs/post-halloween-2.6.txt">The
90     post-halloween document</uri> - but bear in mind that this is somewhat outdated
91     now.
92     </p>
93    
94     </body>
95     </section>
96     <section>
97     <title>What is udev?</title>
98     <body>
99    
100     <p>
101     In the past, Gentoo has instructed users to use <e>devfs</e> for managing the
102     /dev directory, which contains a series of device interfaces to allow system
103     applications to communicate with hardware (through the kernel).
104     </p>
105    
106     <p>
107     <e>devfs</e>, whilst a good concept, has some internal problems, and has been
108     marked obselete in Linux 2.6.
109     </p>
110    
111     <p>
112     <e>udev</e> is the new way of managing device nodes. It addresses issues with
113     previous device managers, and also attempts to solve some other problems.
114     </p>
115    
116     <p>
117     The above may not mean much to you, but fear not, the hard working Gentoo
118     developers have put effort into making the migration from devfs very easy.
119     </p>
120    
121     </body>
122     </section>
123     <section>
124     <title>What is ALSA?</title>
125     <body>
126    
127     <p>
128     With Linux 2.4, chances are that you used OSS (open sound system) drivers to
129     power your sound card. OSS has been replaced by a newer and better set of sound
130     drivers: ALSA.
131     </p>
132    
133     <p>
134     ALSA, the Advanced Linux Sound Architecture, is a new set of sound drivers with
135     a new and improved API, present in the Linux 2.6 kernel. It is backwards
136     compatible with OSS applications, provided that you select the right kernel
137     configuration options!
138     </p>
139    
140     <note>
141     If you do not have any sound/audio hardware, you can safely skip over any
142     ALSA-related instructions in this document.
143     </note>
144    
145     </body>
146     </section>
147     </chapter>
148    
149     <chapter>
150     <title>Preparation</title>
151     <section>
152     <title>Get your system up-to-date</title>
153     <body>
154    
155     <p>
156     Some of the changes brought in with Linux 2.6 also required some changes in the
157     base system applications. Before continuing, you should ensure that your system
158     is relatively up-to-date, and to be perfectly sure, you should update all world
159     and system packages where updates are available.
160     </p>
161    
162     <p>
163     In particular, make sure you have the latest stable versions of the following
164     packages:
165     </p>
166    
167     <ul>
168     <li><c>sys-apps/baselayout</c></li>
169     <li><c>sys-apps/util-linux</c></li>
170     <li>
171     <c>sys-kernel/genkernel</c> (only if you wish to use genkernel as opposed
172     to manual configuration)
173     </li>
174     </ul>
175    
176     <pre caption="Updating all world packages">
177     # <i>emerge sync</i>
178     # <i>emerge -ua world</i>
179     </pre>
180    
181     </body>
182     </section>
183     <section>
184     <title>modutils vs module-init-tools</title>
185     <body>
186    
187     <p>
188     <c>sys-apps/modutils</c> is the package that provides tools such as
189     <c>modprobe</c>, <c>rmmod</c> and <c>insmod</c> for Linux 2.4.
190     </p>
191    
192     <p>
193     Linux 2.6 introduces a new module format, and therefore requires new tools for
194     handling modules. These are bundled up into the
195     <c>sys-apps/module-init-tools</c> package. </p>
196    
197     <p>
198     You should now remove modutils and install module-init-tools:
199     </p>
200    
201     <pre caption="Switching from modutils to module-init-tools">
202     # <i>emerge unmerge modutils</i>
203     # <i>emerge module-init-tools</i>
204     </pre>
205    
206     <note>
207     Don't worry - even though you have just unmerged modutils, module-init-tools
208     provides provides backwards compatibility for Linux 2.4, so you will still be
209     able to boot into Linux 2.4 and handle modules for that kernel.
210     </note>
211    
212     <note>
213     For the above reason, module-init-tools might already be installed and working
214     with your existing Linux 2.4 kernel. In this case, you don't need to worry
215     about this stage - your system is already ready to deal with Linux 2.6 modules.
216     </note>
217    
218     </body>
219     </section>
220     <section>
221     <title>Installing udev</title>
222     <body>
223    
224     <p>
225     There is no configuration involved here. Simply use <c>emerge</c> to install
226     udev:
227     </p>
228    
229     <pre caption="Installing udev">
230     # <i>emerge -a udev</i>
231     </pre>
232    
233     </body>
234     </section>
235     <section>
236     <title>Installing ALSA utilities</title>
237     <body>
238    
239     <p>
240     ALSA requires you to have some packages installed, so that applications can use
241     the ALSA API. These packages will also allow you to control the mixer and
242     volume levels. Install the required utilities as follows:
243     </p>
244    
245     <pre caption="Installing ALSA utilities and libraries">
246     # <i>emerge -a alsa-lib alsa-utils alsa-tools alsa-headers alsa-oss</i>
247     </pre>
248    
249     </body>
250     </section>
251     </chapter>
252    
253     <chapter>
254     <title>Installing the Linux 2.6 sources</title>
255    
256     <section>
257     <title>Choosing and installing a kernel</title>
258     <body>
259    
260     <p>
261     The first thing you need to do is install sources of a 2.6 kernel of your
262     choice. The two Gentoo-supported 2.6 kernels are currently
263     <e>gentoo-dev-sources</e> (for desktops) and <e>hardened-dev-sources</e> (for
264     servers). There are others available, see the <uri
265     link="/doc/en/gentoo-kernel.xml">Gentoo Linux Kernel Guide</uri> for more
266     choices.
267     </p>
268    
269     <p>
270     In this guide, we'll use <c>gentoo-dev-sources</c> as an example. Install your
271     chosen set of kernel sources using the <c>emerge</c> utility:
272     </p>
273    
274     <pre caption="Installing gentoo-dev-sources">
275     # <i>emerge -a gentoo-dev-sources</i>
276     These are the packages that I would merge, in order:
277     Calculating dependencies ...done!
278     [ebuild N ] sys-kernel/gentoo-dev-sources-2.6.9-r2
279    
280     Do you want me to merge these packages? [Yes/No] <i>y</i>
281     </pre>
282    
283     </body>
284     </section>
285     <section>
286     <title>Updating the /usr/src/linux symbolic link</title>
287     <body>
288    
289     <p>
290     Various components of the Gentoo utilities rely on /usr/src/linux being a
291     symbolic link to the kernel sources that you are running (or wish to compile
292     against).
293     </p>
294    
295     <p>
296     We will now update our /usr/src/linux link to point at the kernel sources we
297     just installed. Continuing our example:
298     </p>
299    
300     <pre caption="Updating the /usr/src/linux softlink">
301     # <i>cd /usr/src</i>
302     # <i>ln -sf linux-2.6.9-gentoo-r2 linux</i>
303     </pre>
304    
305     </body>
306     </section>
307     </chapter>
308    
309     <chapter>
310     <title>Known pitfalls with Linux 2.6 migration</title>
311     <section>
312     <body>
313    
314     <p>
315     Before we get stuck into configuring the kernel, I'll attempt to detail the
316     most common errors that people make when migrating to Linux 2.6, as some of
317     these points will influence the way you configure the new kernel.
318     </p>
319    
320     <note>
321     Not all of these points are relevant at this stage, but I will detail them all
322     here in one place, and you can refer back at your leisure.
323     </note>
324    
325     </body>
326     </section>
327     <section>
328     <title>Don't use "make oldconfig" with a 2.4 .config</title>
329     <body>
330    
331     <note>
332     If you don't understand what this means, don't worry, you won't make this
333     mistake if you follow the rest of this guide correctly.
334     </note>
335    
336     <p>
337     You'll be asked many many questions, since there have been a large amount of
338     changes. Many people who do try a <c>make oldconfig</c> from a 2.4 config end
339     up creating an unworkable kernel (e.g. no output on-screen, no input from
340     keyboard, etc). Please save yourself the trouble, and use the traditional
341     <c>menuconfig</c> configuration method just this once.
342     </p>
343    
344     </body>
345     </section>
346     <section>
347     <title>Don't use ide-scsi for CD/DVD writing</title>
348     <body>
349    
350     <p>
351     In Linux 2.4, the only way to achieve good CD/DVD writing results was to enable
352     the (rather ugly) <c>ide-scsi</c> emulation. Thankfully, the IDE layer in Linux
353     2.6 has been extended to support CD/DVD writers much better.
354     </p>
355    
356     <p>
357     You don't need to enable any extra options to support CD writing. Just be sure
358     <e>not</e> to enable <c>ide-scsi</c> as you used to.
359     </p>
360    
361     </body>
362     </section>
363     <section>
364     <title>PC Speaker is now a configurable option</title>
365     <body>
366    
367     <p>
368     You won't get your normal console beeps (or any response from the PC speaker at
369     all) unless you specifically enable the new PC speaker option
370     (<c>CONFIG_INPUT_PCSPKR</c>):
371     </p>
372    
373     <pre caption="Location of PC speaker option">
374     Device Drivers ---&gt;
375     Input device support ---&gt;
376     [*] Misc
377     &lt;*&gt; PC Speaker support
378     </pre>
379    
380     <note>
381     By "PC speaker", I am referring to the analogue speaker that beeps once when
382     your system is powering up, I am not referring to normal sound hardware used
383     for playing music, etc.
384     </note>
385    
386     </body>
387     </section>
388     <section>
389     <title>New USB Storage block device driver sometimes problematic</title>
390     <body>
391    
392     <p>
393     Very recently, a new USB storage device driver has been added to the kernel.
394     At the time of writing, this driver ("ub") is still in its early stages and
395     some users find it to be unreliable. If you have problems accessing your USB
396     hard disk, USB flash disk, USB card reader, or USB digital camera, then you
397     could try reverting to the older SCSI-style driver:
398     </p>
399    
400     <pre caption="Disabling ub">
401     Device Drivers ---&gt;
402     Block devices ---&gt;
403     &lt; &gt; Low Performance USB Block driver
404     </pre>
405    
406     <note>
407     The older SCSI-style driver (USB Mass Storage support) is enabled by default.
408     It can be found under "Device Drivers --&gt; USB support", but will generally
409     not come into effect while ub is also present.
410     </note>
411    
412     </body>
413     </section>
414     <section>
415     <title>usbdevfs renamed to usbfs</title>
416     <body>
417    
418     <p>
419     If you have edited your <path>/etc/fstab</path> file to customise the way that
420     the USB device filesystem gets mounted, you may have to modify the filesystem
421     type from <e>usbdevfs</e> to <e>usbfs</e>.
422     </p>
423    
424     <note>
425     Recent 2.4 kernels will also allow you to use "usbfs" as well as "usbdevfs", so
426     you aren't breaking any backwards compatibility by doing this.
427     </note>
428    
429     </body>
430     </section>
431     <section>
432     <title>Don't renice X</title>
433     <body>
434    
435     <p>
436     If you are a desktop 2.4 user, you may have hacked your system into running X
437     at a higher priority, as in some cases it seems to provide better desktop
438     performance.
439     </p>
440    
441     <p>
442     There have been many scheduler changes in 2.6 which change this behaviour. If
443     you continue to run X at a higher priority, it will do exactly what it is
444     supposed to (run the <e>display server</e> at a very high priority) and you
445     will notice consequences such as sound stuttering and slow application load
446     times because your CPU is spending too long serving X and only X.
447     </p>
448    
449     <p>
450     In Linux 2.6, you no longer need to renice desktop applications to get good
451     interactivity. Please remove your "niceness" hacks!
452     </p>
453    
454     </body>
455     </section>
456     <section>
457     <title>X11 config file should now use /dev/input/mice</title>
458     <body>
459    
460     <p>
461     One of the changes that a default udev configuration introduces is different
462     organisation of the mouse device nodes. Previously, you would have had nodes
463     such as <path>/dev/psaux</path> and <path>/dev/mouse</path>. You will now have
464     nodes such as <path>/dev/input/mouse0</path>, <path>/dev/input/mouse1</path>,
465     and a collective <path>/dev/input/mice</path> node which combines movements
466     from all mice.
467     </p>
468    
469     <p>
470     Since the old X configurations typically reference <path>/dev/mouse</path> or
471     <path>/dev/psaux</path> then you may get an error similar to the one shown
472     below when you attempt to start X11:
473     </p>
474    
475     <pre caption="Common error when starting X on a udev system for the first time">
476     (EE) xf86OpenSerial: Cannot open device /dev/mouse
477     No such file or directory.
478     (EE) Mouse0: cannot open input device
479     (EE) PreInit failed for input device "Mouse0"
480     No core pointer
481     </pre>
482    
483     <p>
484     To correct this, open your X11 config in a text editor, and update the mouse
485     <e>InputDevice</e> section to use the <path>/dev/input/mice</path> device. An
486     example is shown below:
487     </p>
488    
489     <pre caption="Opening your X11 config file">
490     # <i>nano -w /etc/X11/xorg.conf</i>
491     </pre>
492    
493     <note>
494     If you are still using XFree86, your config file will be
495     <path>/etc/X11/XF86Config</path>
496     </note>
497    
498     <pre caption="Sample mouse InputDevice section">
499     Section "InputDevice"
500     Identifier "Mouse0"
501     Driver "mouse"
502     Option "Protocol" "auto"
503     Option "Device" "/dev/input/mice"
504     EndSection
505     </pre>
506    
507     </body>
508     </section>
509     </chapter>
510    
511     <chapter id="conf">
512     <title>Configuring, building, and installing the kernel</title>
513     <section>
514     <body>
515    
516     <p>
517     As with Linux 2.4, you have two options for managing your new kernel build.
518     </p>
519    
520     <ol>
521     <li>
522     The default method is to configure your kernel manually. This may seem
523     daunting but is the preferred way as long as you know your system. If you
524     wish to configure your new kernel manually, please continue on to the <uri
525     link="#manual">next chapter</uri>.
526     </li>
527     <li>
528     The alternative option is to use our <c>genkernel</c> utility to
529     automatically configure, compile, and install a kernel for you. If you wish
530     to use <c>genkernel</c> then skip over the next chapter and proceed with
531     <uri link="#genkernel">using genkernel</uri>.
532     </li>
533     </ol>
534    
535     </body>
536     </section>
537     </chapter>
538    
539     <chapter id="manual">
540     <title>Default: Manual configuration</title>
541     <section>
542     <title>Configuring the kernel</title>
543     <body>
544    
545     <p>
546     We'll now get on with configuring the kernel. Open menuconfig in the usual way:
547     </p>
548    
549     <pre caption="Invoking menuconfig">
550     # <i>cd /usr/src/linux</i>
551     # <i>make menuconfig</i>
552     </pre>
553    
554     <p>
555     You will probably be familiar with using menuconfig from configuring 2.4
556     kernels. Fortunately, the front end has barely changed at all, but you will
557     observe much better organisation of kernel options, plus <e>many</e> new
558     options that weren't present in 2.4.
559     </p>
560    
561     <p>
562     Be sure to enable the following important kernel options:
563     </p>
564    
565     <pre caption="Required kernel options">
566     File systems ---&gt;
567     Pseudo Filesystems ---&gt;
568     [*] /proc file system support
569     [*] Virtual memory file system support (former shm fs)
570    
571     <comment>(the following are required for udev):</comment>
572     General setup ---&gt;
573     [*] Support for hot-pluggable devices
574    
575     Device Drivers ---&gt;
576     Block devices ---&gt;
577     &lt;*&gt; RAM disk support
578    
579     <comment>(the following are required for ALSA):</comment>
580     Device Drivers ---&gt;
581     Sound ---&gt;
582     &lt;*&gt; Sound card support
583     Advanced Linux Sound Architecture ---&gt;
584     &lt;M&gt; Advanced Linux Sound Architecture
585     &lt;M&gt; Sequencer support
586     &lt;M&gt; OSS Mixer API
587     [*] OSS Sequencer API
588     <comment> (and dont forget to select your soundcard from the submenus!)</comment>
589     </pre>
590    
591     <warn>
592     Previously you may have included support for the <path>/dev</path> file system
593     (now marked OBSOLETE). Do not enable devfs support. We have installed udev,
594     which we will be using instead of devfs from now on.
595     </warn>
596    
597     <p>
598     Also, remember to enable support for the filesystems that you use, and the
599     hardware present in your system. Be sure to enable support for the IDE
600     controller on your motherboard if you wish to benefit from fast DMA disk
601     access. Refer to the <uri
602     link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the
603     Kernel</uri> section of the <uri link="/doc/en/handbook/index.xml">Gentoo
604     Handbook</uri> for additional guidance here.
605     </p>
606    
607     </body>
608     </section>
609     <section>
610     <title>Building the kernel</title>
611     <body>
612    
613     <p>
614     Now that we have configured the kernel, we can start the compilation process:
615     </p>
616    
617     <pre caption="Compiling the kernel source">
618     # <i>make &amp;&amp; make modules_install</i>
619     </pre>
620    
621     <note>
622     You may recall having to run <c>make dep</c> with Linux 2.4 sources. This is no
623     longer required.
624     </note>
625    
626     <p>
627     Wait for the kernel compilation to complete (and observe the much more readable
628     compilation output).
629     </p>
630    
631     </body>
632     </section>
633     <section>
634     <title>Installing the kernel</title>
635     <body>
636    
637     <p>
638     The next step is mounting your <path>/boot</path> partition and copying the
639     kernel image over. You must then update your bootloader config manually.
640     </p>
641    
642     <pre caption="Installing the kernel">
643     # <i>mount /boot</i>
644     # <i>cp arch/i386/boot/bzImage /boot/bzImage-2.6.9-gentoo-r2</i>
645     # <i>cp System.map /boot/System.map-2.6.9-gentoo-r2</i>
646     </pre>
647    
648     <p>
649     Note that the above instructions are examples only, you should follow your
650     usual procedure of updating kernels by following the instructions in the <uri
651     link="/doc/en/handbook/index.xml">Gentoo Handbook</uri> (see the <uri
652     link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the
653     Kernel</uri> chapter).
654     </p>
655    
656     <p>
657     When updating your bootloader config, do not remove the old entry pointing at
658     your 2.4 kernel. This way, you will easily be able to switch between the two if
659     something is not working.
660     </p>
661    
662     <p>
663     Now continue onto the <uri link="#modules">Module Configuration</uri> section.
664     </p>
665    
666     </body>
667     </section>
668     </chapter>
669    
670     <chapter id="genkernel">
671     <title>Alternative: Using genkernel</title>
672     <section>
673     <body>
674    
675     <p>
676     If you prefer to use genkernel instead of manually configuring your kernel, you
677     will be happy to hear that using genkernel to produce 2.6 kernels is very
678     similar to the process you performed when producing your previous 2.4 kernel.
679     </p>
680    
681     <p>
682     You should invoke genkernel as shown below:
683     </p>
684    
685     <pre caption="Invoking genkernel with some common arguments">
686     # <i>genkernel --udev --menuconfig --bootloader=grub all</i>
687     </pre>
688    
689     <p>
690     In the above example, we also take advantage of genkernel features to open
691     menuconfig to allow you to customise the kernel configuration (if you wish),
692     and to update the grub bootloader configuration after compilation.
693     </p>
694    
695     <p>
696     You should choose genkernel arguments that suit you, but do not forget to
697     include the <c>--udev</c> argument! Refer to the <uri
698     link="/doc/en/genkernel.xml">Gentoo Linux Genkernel Guide</uri> and the <uri
699     link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the
700     Kernel</uri> chapter of the <uri link="/doc/en/handbook/index.xml">Gentoo
701     Handbook</uri> for additional information.
702     </p>
703    
704     </body>
705     </section>
706     </chapter>
707    
708     <chapter id="modules">
709     <title>Module Configuration</title>
710    
711     <section>
712     <title>Installing external modules</title>
713     <body>
714    
715     <p>
716     Many users will additionally rely on kernel modules that are built outside of
717     the kernel tree. Common examples are the binary ATI and Nvidia graphics
718     drivers. You now need to install those modules, which will compile against the
719     2.6 sources found at <path>/usr/src/linux</path>. This is the usual case of
720     <c>emerge packagename</c> for all the external modules you are used to using
721     with 2.4.
722     </p>
723    
724     <p>
725     Refer again to the <uri
726     link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the
727     Kernel</uri> chapter of the <uri link="/doc/en/handbook/index.xml">Gentoo
728     Handbook</uri> for more info.
729     </p>
730    
731     </body>
732     </section>
733     <section>
734     <title>Autoloading modules</title>
735     <body>
736    
737     <p>
738     You may have decided to compile some kernel components as modules (as opposed
739     to compiled directly into the kernel) and would like to have them autoloaded on
740     bootup like you did with 2.4. Also, if you installed any external modules from
741     the portage tree (as described above) you will probably want to autoload them
742     too.
743     </p>
744    
745     <p>
746     You can achieve this similarly as to how you did with 2.4. Simply open up the
747     file <path>/etc/modules.autoload.d/kernel-2.6</path> in a text editor and list
748     the names of the modules you would like autoloaded.
749     </p>
750    
751     <pre caption="Opening the module autoload list in nano">
752     # <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
753     </pre>
754    
755     <pre caption="Sample autoload list to load the 3c59x and nvidia modules">
756     # /etc/modules.autoload.d/kernel-2.6: kernel modules to load when system boots.
757     #
758     # Note that this file is for 2.6 kernels.
759     #
760     # Add the names of modules that you'd like to load when the system
761     # starts into this file, one per line. Comments begin with # and
762     # are ignored. Read man modules.autoload for additional details.
763    
764     3c59x
765     nvidia
766     </pre>
767    
768     </body>
769     </section>
770     <section>
771     <title>Configuring the ALSA modules</title>
772     <body>
773    
774     <p>
775     You will have noticed that we chose to compile ALSA as modules. We can now
776     configure ALSA's behaviour easily. However, we also need to configure which
777     modules are to be loaded. Open up <path>/etc/modules.d/alsa</path> in your text
778     editor:
779     </p>
780    
781     <pre caption="Opening /etc/modules.d/alsa in nano">
782     # <i>nano -w /etc/modules.d/alsa</i>
783     </pre>
784    
785     <p>
786     Now look for the section marked as <e>IMPORTANT</e>. In most cases, you just
787     need to uncomment and modify the snd-card-0 and snd-slot-0 aliases.
788     </p>
789    
790     <pre caption="Sample section of /etc/modules.d/alsa">
791     ## IMPORTANT:
792     ## You need to customise this section for your specific sound card(s)
793     ## and then run `update-modules' command.
794     ## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
795     ##
796     ## ALSA portion
797    
798     # My laptop uses the snd-maestro3 driver
799     alias snd-card-0 snd-maestro3
800    
801     ## OSS/Free portion
802    
803     # Generally all you need to do is uncomment this line:
804     alias sound-slot-0 snd-card-0
805     </pre>
806    
807     <p>
808     For more info on which driver name to use, consult the <uri
809     link="/doc/en/alsa-guide.xml">Gentoo Linux ALSA Guide</uri>. Remember to prefix
810     it with <e>snd-</e> in this file.
811     </p>
812    
813     <p>
814     Finally, set the <c>alsasound</c> init script to be executed on bootup:
815     </p>
816    
817     <pre caption="Adding alsasound to default runlevel">
818     # <i>rc-update add alsasound boot</i>
819     </pre>
820    
821     </body>
822     </section>
823     </chapter>
824    
825     <chapter>
826     <title>Booting into Linux 2.6</title>
827     <section>
828     <body>
829    
830     <p>
831     It's now time to boot into Linux 2.6. Close all applications and reboot:
832     </p>
833    
834     <pre caption="Rebooting">
835     # <i>modules-update</i>
836     # <i>umount /boot</i>
837     # <i>reboot</i>
838     </pre>
839    
840     <p>
841     When you reboot, if you followed this document correctly so far, you will have
842     the option of either loading Linux 2.4 or Linux 2.6 from your bootloader.
843     Choose Linux 2.6.
844     </p>
845    
846     <p>
847     Once the system has booted, check that things are working. If you made a
848     mistake in the kernel configuration, don't worry, you can skip back to the
849     <uri link="#conf">Configuring, building, and installing the kernel</uri>
850     section, make your change, recompile and install new kernel image, reboot, and
851     try again!
852     </p>
853    
854     </body>
855     </section>
856     <section>
857     <title>Unmuting ALSA channels</title>
858     <body>
859    
860     <p>
861     By default, ALSA channels are muted, so you won't hear anything when you go to
862     play a sound. You need to unmute them now. Run the <c>alsamixer</c> program
863     from a console and use the arrow keys to move around and adjust volumes, and
864     the M key to mute and unmute. Read the <uri
865     link="/doc/en/alsa-guide.xml">Gentoo Linux ALSA Guide</uri> for more complete
866     documentation and other ways to do this.
867     </p>
868    
869     <note>
870     The alsasound init script that we put in the default runlevel will save mixer
871     levels on shutdown and restore them on bootup. You won't need to set all these
872     volumes every time you boot!
873     </note>
874    
875     </body>
876     </section>
877     </chapter>
878    
879     <chapter>
880     <title>Header files and NPTL</title>
881     <section>
882     <body>
883    
884     <p>
885     By now you are running Linux 2.6 and hopefully have all issues ironed out. You
886     should now update your Linux kernel header files and re-merge glibc so that
887     userspace applications can take advantage of new Linux 2.6 features.
888     </p>
889    
890     <pre caption="Updating to linux26-headers">
891     # <i>emerge linux26-headers</i>
892     # <i>emerge unmerge linux-headers</i>
893     </pre>
894    
895     <p>
896     After updating your headers package, you should generally re-merge glibc.
897     There is a new feature here that you may be interested in - NPTL. NPTL is a new
898     threading model present in Linux 2.6, which features much quicker thread create
899     and destroy times. This won't make much of a difference to most systems, but
900     you may wish to enable it during this migration process! To enable NPTL, edit
901     <path>/etc/make.conf</path>, adding <e>nptl</e> to your USE variable.
902     </p>
903    
904     <warn>
905     With the current stable glibc ebuilds, you will be unable to boot a 2.4 kernel
906     after compiling glibc with USE="nptl". Be warned, be careful!
907     </warn>
908    
909     <p>
910     Now re-merge glibc (you should do this even if you did not choose to enable
911     NPTL).
912     </p>
913    
914     <pre caption="Reinstalling glibc against the new kernel headers">
915     # <i>emerge -a glibc</i>
916     </pre>
917    
918     <p>
919     If you enabled NPTL, existing binaries will not use it until they are
920     recompiled. However, any binaries compiled from this point onwards <e>will</e>
921     use NPTL. You may wish to recompile all binaries now, e.g.:
922     </p>
923    
924     <pre caption="Recompiling all packages on the system">
925     # <i>emerge -e world</i>
926     </pre>
927    
928     <p>
929     Alternatively, you can just let your system "naturally" convert itself to NPTL
930     as you update to newer versions of packages when they are released.
931     </p>
932    
933     </body>
934     </section>
935     </chapter>
936    
937     <chapter>
938     <title>Closing remarks</title>
939     <section>
940     <title>Problems?</title>
941     <body>
942    
943     <p>
944     With the incredible amount of work that went into Linux 2.6, it is sometimes
945     inevitable that things which used to work fine, no longer function as expected.
946     </p>
947    
948     <p>
949     If you have any problems with your 2.6 kernel, and you can confirm that this
950     problem does not exist with Linux 2.4, then please open a bug with us on our
951     <uri link="http://bugs.gentoo.org">Bugzilla</uri>. We will investigate the
952     issue, and if we find that it is a problem in the mainline kernel, we may then
953     ask you to file a report at the central kernel bugzilla.
954     </p>
955    
956     </body>
957     </section>
958     <section>
959     <title>Conclusion</title>
960     <body>
961    
962     <p>
963     Hopefully you have just completed a smooth migration and you are enjoying the
964     benefits which Linux 2.6 brings over 2.4. As I mentioned at the start, we are
965     looking for feedback on this document - even if your migration went perfectly
966     smoothly. Please <mail link="dsd@gentoo.org">mail me</mail> your feedback so
967     that we can get this document in perfect shape for when 2005.0 comes around.
968     Thanks!
969     </p>
970    
971     </body>
972     </section>
973     </chapter>
974     </guide>

  ViewVC Help
Powered by ViewVC 1.1.20