Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 58305 Details for
Bug 91242
2005.0 Section 7. Configuring kernel - missing info on /etc/modules.autoload.d/kernel-x.z
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
2005.0 Networkless Handbook Update - Kernel Installation - adds modules.autoload.d
hb-install-x86-kernel.xml (text/plain), 14.40 KB, created by
Sean D. Quinn
on 2005-05-07 18:16:16 UTC
(
hide
)
Description:
2005.0 Networkless Handbook Update - Kernel Installation - adds modules.autoload.d
Filename:
MIME Type:
Creator:
Sean D. Quinn
Created:
2005-05-07 18:16:16 UTC
Size:
14.40 KB
patch
obsolete
><?xml version='1.0' encoding='UTF-8'?> ><!DOCTYPE sections SYSTEM "/dtd/book.dtd"> > ><!-- The content of this document is licensed under the CC-BY-SA license --> ><!-- See http://creativecommons.org/licenses/by-sa/1.0 --> > ><!-- $Header: /var/www/www.gentoo.org/raw_cvs/gentoo/xml/htdocs/doc/en/handbook/2005.0/hb-install-x86-kernel.xml,v 1.7 2005/04/07 18:20:45 swift Exp $ --> > ><!-- Changelog for me, since I have no CVS access: Added modules.overload.d information. Thanks -squinn --> > ><sections> > ><version>4.4</version> ><date>2005-03-29</date> > ><section> ><title>Timezone</title> ><body> > ><p> >You first need to select your timezone so that your system knows where it is >located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then make a >symlink to <path>/etc/localtime</path> using <c>ln</c>: ></p> > ><pre caption="Setting the timezone information"> ># <i>ls /usr/share/zoneinfo</i> ><comment>(Suppose you want to use GMT)</comment> ># <i>ln -sf /usr/share/zoneinfo/GMT /etc/localtime</i> ></pre> > ></body> ></section> ><section> ><title>Installing the Sources</title> ><subsection> ><title>Choosing a Kernel</title> ><body> > ><p> >The core around which all distributions are built is the Linux kernel. It is the >layer between the user programs and your system hardware. Gentoo provides its >users several possible kernel sources. A full listing with description is >available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel >Guide</uri>. ></p> > ><p> >For x86-based systems, our main supported kernel is named ><c>gentoo-sources</c>. This kernel is based on the official Linux sources, but >has security, stability, compatibility and bug fixes applied on top. >Alternatively, the plain and unpatched Linux sources are supplied through the ><c>vanilla-sources</c> package. ></p> > ><p> >Both kernel sources are based on the official 2.6 kernel sources. If you >want to install a 2.4-based kernel, you will need to install Gentoo with a >working Internet connection as we do not supply these sources on our >Installation CD. ></p> > ><p> >Choose your kernel source and install it using <c>emerge</c>. ></p> > ><pre caption="Installing a kernel source"> ># <i>emerge gentoo-sources</i> ></pre> > ><p> >When you take a look in <path>/usr/src</path> you should see a symlink called ><path>linux</path> pointing to your kernel source. We will assume the kernel >source installed is <c>gentoo-sources-2.6.11-r3</c>: ></p> > ><pre caption="Viewing the kernel source symlink"> ># <i>ls -l /usr/src/linux</i> >lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-2.6.11-gentoo-r3 ></pre> > ><p> >If the symlink doesn't point to the kernel source of your choice (note that ><c>linux-2.6.11-gentoo-r3</c> is merely an example) you should change it to the >right kernel: ></p> > ><pre caption="Changing the kernel source symlink"> ># <i>rm /usr/src/linux</i> ># <i>cd /usr/src</i> ># <i>ln -s linux-2.6.11-gentoo-r3 linux</i> ></pre> > ><p> >Now it is time to configure and compile your kernel source. You >can use <c>genkernel</c> for this, which will build a generic kernel as used >by the Installation CD. We explain the "manual" configuration first though, as >it is the best way to optimize your environment. ></p> > ><p> >If you want to manually configure your kernel, continue now with <uri >link="#manual">Default: Manual Configuration</uri>. If you want to use ><c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using >genkernel</uri> instead. ></p> > ></body> ></subsection> ></section> ><section id="manual"> ><title>Default: Manual Configuration</title> ><subsection> ><title>Introduction</title> ><body> > ><p> >Manually configuring a kernel is often seen as the most difficult procedure a >Linux user ever has to perform. Nothing is less true -- after configuring a >couple of kernels you don't even remember that it was difficult ;) ></p> > ><p> >However, one thing <e>is</e> true: you must know your system when you start >configuring a kernel manually. Most information can be gathered by viewing the >contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You >can also run <c>lsmod</c> to see what kernel modules the Installation CD uses >(it might provide you with a nice hint on what to enable). ></p> > ><p> >Now go to your kernel source directory and execute <c>make menuconfig</c>. This >will fire up an ncurses-based configuration menu. ></p> > ><pre caption="Invoking menuconfig"> ># <i>cd /usr/src/linux</i> ># <i>make menuconfig</i> ></pre> > ><p> >You will be greeted with several configuration sections. We'll first list some >options you must activate (otherwise Gentoo will not function, or not function >properly without additional tweaks). ></p> > ></body> ></subsection> ><subsection> ><title>Activating Required Options</title> ><body> > ><p> >Make sure that every driver that is vital to the booting of your system (such as >SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module, >otherwise your system will not be able to boot completely. ></p> > ><p> >Now select the correct processor family: ></p> > ><pre caption="Selecting correct processor family"> >Processor type and features ---> > Subarchitecture Type (PC-compatible) ---> > <comment>(Change according to your system)</comment> > (<i>Athlon/Duron/K7</i>) Processor family ></pre> > ><p> >Now go to <c>File Systems</c> and select support for the filesystems you use. ><e>Don't</e> compile them as modules, otherwise your Gentoo system will not be >able to mount your partitions. Also select <c>/proc file system</c> and ><c>Virtual memory</c>. Do <e>not</e> select the <c>/dev file system</c>. ></p> > ><pre caption="Selecting necessary file systems"> >File systems ---> > Pseudo Filesystems ---> > <*> /proc file system support > < > /dev file system support (OBSOLETE) > <*> Virtual memory file system support (former shm fs) > > ><comment>(Select one or more of the following options as needed by your system)</comment> > <*> Reiserfs support > <*> Ext3 journalling file system support > <*> JFS filesystem support > <*> Second extended fs support > <*> XFS filesystem support ></pre> > ><p> >Do not forget to enable DMA for your drives: ></p> > ><pre caption="Activating DMA"> >Device Drivers ---> > ATA/ATAPI/MFM/RLL support ---> > [*] Generic PCI bus-master DMA support > [*] Use PCI DMA by default when available ></pre> > ><p> >If you are using PPPoE to connect to the Internet or you are using a dial-up >modem, you will need the following options in the kernel: ></p> > ><pre caption="Selecting PPPoE necessary drivers"> >Device Drivers ---> > Networking support ---> > <*> PPP (point-to-point protocol) support > <*> PPP support for async serial ports > <*> PPP support for sync tty ports ></pre> > ><p> >The two compression options won't harm but are not definitely needed, neither >does the <c>PPP over Ethernet</c> option, that might only be used by ><c>rp-pppoe</c> when configured to do kernel mode PPPoE. ></p> > ><p> >If you require it, don't forget to include support in the kernel for your >ethernet card. ></p> > ><p> >If you have an Intel CPU that supports HyperThreading (tm), or you have a >multi-CPU system, you should activate "Symmetric multi-processing support": ></p> > ><pre caption="Activating SMP support"> >Processor type and features ---> > <*> Symmetric multi-processing support ></pre> > ><p> >If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable >those as well: ></p> > ><pre caption="Activating USB Support for Input Devices"> >Device Drivers ---> > USB Support ---> > <*> USB Human Interface Device (full HID) support > [*] HID input layer support ></pre> > ><p> >If you are a laptop user and require PCMCIA support, remember to compile it >into the kernel. As well as the option below, be sure to enable support for >the PCMCIA card bridge present in your system (found in the same menu of the >configuration). ></p> > ><pre caption="Activating PCMCIA support"> >Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---> > PCCARD (PCMCIA/CardBus) support ---> > <*> PCCard (PCMCIA/CardBus) support > <comment>(select 16 bit if you need support for older PCMCIA cards. Most people want this.)</comment> > <*> 16-bit PCMCIA support > [*] 32-bit CardBus support > <comment>(select the relevant bridges below)</comment> > --- PC-card bridges > <*> CardBus yenta-compatible bridge support (NEW) > <*> Cirrus PD6729 compatible bridge support (NEW) > <*> i82092 compatible bridge support (NEW) > <*> i82365 compatible bridge support (NEW) > <*> Databook TCIC host bridge support (NEW) ></pre> > ></body> ></subsection> ><subsection id="compiling"> ><title>Compiling and Installing</title> ><body> > ><p> >Now that your kernel is configured, it is time to compile and install it. Exit >the configuration and start the compilation process: ></p> > ><pre caption="Compiling the kernel"> ># <i>make && make modules_install</i> ></pre> > ><p> >When the kernel has finished compiling, copy the kernel image to ><path>/boot</path>. From here onwards we assume that the kernel you are >installing is the 2.6.11-r3 version of the <c>gentoo-sources</c>. Use whatever >name you feel is appropriate for your choice and remember it as you will need >it later on when you configure your bootloader. ></p> > ><pre caption="Installing the kernel"> ># <i>cp arch/i386/boot/bzImage /boot/kernel-2.6.11-gentoo-r3</i> ></pre> > ><p> >It is also wise to copy over your kernel configuration file to ><path>/boot</path>, just in case :) ></p> > ><pre caption="Backing up your kernel configuration"> ># <i>cp .config /boot/config-2.6.11-gentoo-r3</i> ></pre> > ><p> >Now continue with <uri link="?part=1&chap=8">Configuring your System</uri>. ></p> > ></body> ></subsection> ></section> ><section id="genkernel"> ><title>Alternative: Using genkernel</title> ><body> > ><p> >If you are reading this section, you have chosen to use our <c>genkernel</c> >script to configure your kernel for you. ></p> > ><p> >Now that your kernel source tree is installed, it's now time to compile your >kernel by using our <c>genkernel</c> script to automatically build a kernel for >you. <c>genkernel</c> works by configuring a kernel nearly identically to the >way our Installation CD kernel is configured. This means that when you use ><c>genkernel</c> to build your kernel, your system will generally detect all >your hardware at boot-time, just like our Installation CD does. Because genkernel >doesn't require any manual kernel configuration, it is an ideal solution for >those users who may not be comfortable compiling their own kernels. ></p> > ><p> >Now, let's see how to use genkernel. First, emerge the genkernel ebuild: ></p> > ><pre caption="Emerging genkernel"> ># <i>emerge genkernel</i> ></pre> > ><p> >Next, copy over the kernel configuration used by the Installation CD to the >location where genkernel looks for the default kernel configuration: ></p> > ><pre caption="Copying over the Installation CD kernel config"> ># <i>zcat /proc/config.gz > /usr/share/genkernel/x86/kernel-config-2.6</i> ></pre> > ><p> >Now, compile your kernel sources by running <c>genkernel --udev all</c>. >Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all >hardware, this compilation will take quite a while to finish! ></p> > ><p> >Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you >might need to manually configure your kernel using <c>genkernel --menuconfig >all</c> and add support for your filesystem <e>in</e> the kernel (i.e. ><e>not</e> as a module). Users of EVMS2 or LVM2 will probably want to add ><c>--evms2</c> or <c>--lvm2</c> as argument as well. ></p> > ><pre caption="Running genkernel"> ># <i>genkernel --udev all</i> ></pre> > ><p> >Once <c>genkernel</c> completes, a kernel, full set of modules and ><e>initial root disk</e> (initrd) will be created. We will use the kernel >and initrd when configuring a boot loader later in this document. Write >down the names of the kernel and initrd as you will need it when writing >the bootloader configuration file. The initrd will be started immediately after >booting to perform hardware autodetection (just like on the Installation CD) >before your "real" system starts up. ></p> > ><pre caption="Checking the created kernel image name and initrd"> ># <i>ls /boot/kernel* /boot/initrd*</i> ></pre> ></body> ><subsection> ><title>Configuring the Modules</title> ><body> ><p> >If you want your system to be more like the Installation CD you should, >when your Gentoo installation is over, emerge <c>coldplug</c>. While the >initrd autodetects hardware that is needed to boot your system, ><c>coldplug</c> autodetects everything else. <c>coldplug</c> is available as one >of the packages on the Package CD. ></p> > ><pre caption="Emerging and enabling coldplug"> ><comment>(Do this after the installation, during the GRP installation instructions)</comment> ># <i>emerge -k coldplug</i> ># <i>rc-update add coldplug boot</i> ></pre> > ><p> >If you want your system to react to hotplugging events, you will need to install >and setup <c>hotplug</c> as well: ></p> > ><pre caption="Emerging and enabling hotplug"> ><comment>(Do this after the installation, during the GRP installation instructions)</comment> ># <i>emerge -k hotplug</i> ># <i>rc-update add hotplug default</i> ></pre> > ><p> >There is an alternative to using <c>coldplug</c> or <c>hotplug</c>. To have your kernel modules detected on boot, you must edit <path>/etc/modules.autoload.d/kernel-2.6 (or 2.4)</path> to include the modules you want to have automatically detected at boot. Extra options can be added to the modules as well, if you wish. ></p> > ><p> >To find all the modules installed on your system, you must run the below command. Remember to replace "<kernel version> with the correct kernel version. ></p> > ><pre caption="Viewing all installed modules"> ># <i>find /lib/modules/<kernel version>/ -type f -iname '*.o' -or -iname '*.ko'</i> ></pre> > ><p> >For instance, to automatically load the <c>3c59x.o</c> module, edit the <path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module name in it. ></p> > > ><pre caption="Editing /etc/modules.autoload.d/kernel-2.4"> ><comment>(Example for 2.4 kernels)</comment> ># <i>nano -w /etc/modules.autoload.d/kernel-2.4</i> ></pre> > ><pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6"> >3c59x ></pre> > ><p> >Now run <c>modules-update</c> to commit your changes to the ><path>/etc/modules.conf</path> file: ></p> > ><pre caption="Running modules-update"> ># <i>modules-update</i> ></pre> > > ><p> >Now continue with <uri link="?part=1&chap=8">Configuring your System</uri>. ></p> > ></body> ></subsection> ></section> ></sections>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 91242
:
58305
|
58306
|
58310