/[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.4 - (hide annotations) (download) (as text)
Sat Nov 27 14:19:18 2004 UTC (10 years ago) by neysx
Branch: MAIN
Changes since 1.3: +4 -4 lines
File MIME type: application/xml
#71645: use ln -sfn

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

  ViewVC Help
Powered by ViewVC 1.1.20