Compiled internal nuclear process (kernel2.6.7) Waley spent a few days to compile the successful kernel2.6.7, the process is really hard. The ancient language has clouds: "Work hard!" Now I can finally be happy. Due to many friends And some important configurations are unknown or known, often in the case of medical treatment. Plus online information is more and more annoying, making the compilation and internal core power is not high, and even cause the original system collapse. I am one of them. :-) In fact, the compilation kernel is not a difficult thing. If you can operate according to the correct way, you can get it in a half an hour. Is it very encouraged! Tony said less, now we start now. I turned out The system is REDHAT9.0, kernel 2.4.20-8, compiled core 2.6.7, for reference only: Compute with four parts: Preparation before compilation -> Compilation Configuration -> Compile Process -> FAQ for the kernel Prepare before compilation 1) Download a kernel source code, I am Linux-2.6.7.tar.bz2, you can download it or update it in the following address. Http://kernel.org/pub/linux / kernel/v2.6/2) Download the latest version of Module-Init-Tools ("Module-Init-Tools-3.0.tar.gz" and "MODUTILS-2.4.21-23.SRC.RPM") http: / / www.kernel.org/pub/linux/ker...ools-3.0.tar.gz http://www.kernel.org/pub/linux/ker...4.21-23.src.rpm 3) Installation Module-init-Tools. It replaces depmod [/ sbin / depmod] and other tools .tar -zxvf module-init-tools-3.0.tar.gzcd module-init-tools-3.0./configure --prefix = / sbin Makerate-modprobe.conf4) Install MODUTILS-2.4.21-23.Src.rpm. You may see the "User Rusty and Group Rusty Not Existing" warning. It doesn't matter, you only It is necessary to force the installation. If you don't do this for RedHat 9 and RedHat 8, you will have problems when "make MODULES_INSTALL". RPM -i ModuTils -2.4.21-23.Src.rpmrpmbuild -bb /usr/src/redhat/specs/modutils.specrpm -fi /usr/src/redhat/rpms/i386/modutils-2.4.21-23.i386.rpm5) Compressed kernel source code. Place the downloaded source code to the directory / usr / src, then CD / USR / SRC TAR XVFJ Linux-2.6.7.7.bz2 CD Linux-2.6.7 Two Compilation Configuration In this part involved Several important modules configuration, special attention. General attention. Generally, use the "Make MenuConfig" command to configure the kernel. When you enter the above command, a menu interface appears, the user can make a module required. Here, a few important configuration 1) file system Please be sure to select the EXT3 file system, file systems ---> [*] ext3 journaling file system support [*] ext3 security labels [*] jbd (ext3) Debugging Support The above three items must be selected, and to be built ( That is, this is very important. Be sure to check if the configuration will be checked. Theconfig file has "config_ext3_fs = y". If it is not "config_ext3_fs = y" but "config_ext3_fs = m"
When you run the kernel, you will meet the following error: pivotroot: pivot_root (/ sysroot, / sysroot / initrd) Failed 2) NIC driver Be sure to compile the drive to the kernel, more popular network cards are Realtek 8139, The following is the configuration of this network card for reference for refer to device drivers ---> networking support ---> Ethernet (10 or 100Mbit) ---> <*> Realtek RTL-8139 C PCI Fast Ethernet Adapter Support (Experimental) < *> Realtek RTL-8139 PCI Fast Ethernet Adapter Support 3) Sound Card Driver Also selects the drive compile into the kernel. Compare the universal sound card is I810_AUDIO, the following is the configuration of this sound card for reference device drivers --- > Sound ---> <*> Sound card supportAdvanced Linux Sound Architecture ---> <*> Advanced Linux Sound Architecture <*> Sequencer support <> Sequencer dummy client <*> OSS Mixer API <*> OSS PCM (digital audio ) API [*] OSS sequencer api <*> RTC Timer Supportpci Devices ---> <*> Intel i8X0 / MX440, SIS 7012; ALI 5455; NFORCE AUDIO; AMD768 / 8111TOPEN SOUND System ---> <> Open Sound System (Deprecated) The above three configurations are related to whether the new kernel is running normally. Please pay attention to it. If you don't understand it, you can compile by the default selection. The three compilation process is compiled as follows, about more than an hour. Big can relax :-) make bzimage make MODULES MAKE MAKE BZIMAGE Make Install before running the new kernel, check the content of /boot/grub/grub.conf, the following configuration can be used # GRUB.CONF Generat Ed by Anaconda ## Note That You Do Not Have To Run Grub After Making Changes to this File # NOTITEN: You Have A / Boot Partition. This Means That # all kernel and ositrd paths are relative to / boot /, eg. # root (HD0, 0) # kernel / vmlinuz-version ro root = / dev / hdc3 # initrd /initrd-version.img#boot=/dev/hdcdefault=1timeout=10splashImage=(HD0, 0 )/grub/splash.xpm. GZTITLE Red Hat Linux (2.6.7) root (HD0, 0) kernel /Vmlinuz-2.6.7 ROOT = label = / initrd /initrd-2.6.7.imgtitle Red Hat Linux (2.4.20-8) root (HD0 , 0) kernel /Vmlinuz-2.4.20-8 ro root = label = / initrd /initrd-2.4.20-8 FAQ IMG four-run kernel FAQ 1) RPM problem
After entering the compiled kernel, the command related to rpm cannot be used, and the following error appears: rpmdb: unable to join the EnvironmentError: DB4 Error (11) from dbenv-> Open: Resource Temporarily UnavailableError: Cannot Open package index Using DB3 - Resource Temporarily Unavailable (11) Error: Cannot Open Packages Database In / VAR / LIB / RPMNO Packages
The solution is to execute the "Export LD_Assume_kernel = 2.2.25" command or write it to / etc / bashrc. 2) Sound problem
The module name of the sound portion also changed. My notebook original sound card driver is I810_AUDIO, and now it has been changed to SND-Intel8x0. Therefore, you need to add the following to /etc/modprobe.conf:
Alias Airias Sound Snd-Intel8x0alias Sound-SLOT-0 SND-Intel8x0alias SND-CARD-0 SND-Intel8x0alias Sound-Service-0-0 SND-MIXER-OSALIAS SOUND-Service-0-1 SND-SEQ- OsSalias Sound-Service-0-3 SND-PCM-OSALIAS SOUND-Service-0-8 SND-SEQ-OSALIAS SOUND-Service-0-12 SND-PCM-OSSINSTALL SND-Intel8x0 / Sbin / Modprobe - IGNORE-INSTALL SOUND -Slot-0 && {/ BIN / AUMIX-minimal -f /etc/.aumixrc -l> / dev / null 2> & 1; / bin / true;} Remove Snd-Intel8x0 {/ bin / amix-minimal -f / Etc / .aumixrc -s> / dev / null 2> & 1; / bin / true;}; / sbin / modprobe -r --ignore-transove snoud-slot-0
Then perform the "ModProbe Sound" load module and use the following command to check the sound card driver:
#cat / proc / asseOound / Cards
The results show are as follows:
0 [Si7012]: ICH - SIS Si7012Sis Si7012 AT 0xDC00, IRQ 11
3) VMware problem
The solution is:
◆ Replace all "/ proc / ksyms" in /usr/bin/vmware-config.pl to "/ Proc / Kallsyms". Use the "SED" command to achieve this.
◆ Re-run the script, compile new kernel modules using the kernel header file. If an error occurs during the compilation process, you should enter / usr / lib / vmware / modules / source, use the following command to subcontain the vmnet.tar:
#TAR XVF VMNet.tar
◆ Enter the VMNet-Only directory to modify the bridge.c file. "Atomic_ADD (SKB-> TRUESIZE, & SK-> WMEM_ALLOC);" Modified to "Atomic_ADD (SKB-> TRUESIZE, & SK-> SK_WMEM_ALLOC);" and change "protinfo" to "SK_PROTINFO" with a similar manner.
◆ Repack the VMNet-Only directory with the following command to vmmon.tar:
#TAR CVF VMMON.TAR VMNET-ONLY. If the above operation is still failed, another solution is to http://ftp.cvut.cz/vmware/ download VMwar ... Rendering 膔 Unme.pl.
4) USB problem
Most of the USB modules used in the new 2.6.0 kernel have been renamed, so you need to modify the code initialized to the USB subsystem in /etc/rc.system. Change all "keybdev" in this file to "USBKBD", "MouseDev" is changed to "USBMouse", "/ proc / bus / usb" change to "/ sys / bus / usb", and in / etc / init. The same modifications are made in D / Halt. In addition, you have to find "NeedusBStorage" in /etc/rc.system, do the following modifications:
NEEDUSBSTORAGE = IF [$ USB = "1"]; theneedusbstorage = `lc_all = c grep -e" ^ i.1 * CLS = 08 "/ sys / bus / usb / defices 2> / dev / null`action $" Initializing USB 1.1 host controller: "modprobe ohci-hcd 2> / dev / nullaction $" Initializing USB HID interface: "modprobe hid 2> / dev / nullaction $" Initializing USB keyboard: "modprobe usbkbd 2> / dev / nullaction $" Initializing USB Mouse: "Modprobe USBMOUSE 2> / dev / nullfi
If the USB bus is 2.0, "OHCI-HCD" is also required to "EHCI-HCD".
5) SYSFS problem
The solution is:
◆ Establish a directory / sys: #mkdir / sys
◆ Find "mount -f / proc" in the /etc/rc.d/rc.sinit file, add "mount -f / sys" next line.
◆ Similarly in the /etc/rc.d/rc.sinit file, "Action $" Mounting Proc FileSystem: "Mount -n -t Proc / Proc / Proc" is added to "ACTION $" Mounting Sysfs FileSystem: "mount -n -t sysfs / sys / sys".
◆ Add "None / Sys System DEFAULTS 0 0" in the / etc / fstab file.
◆ Found "awk '$ 2 ~ / ^ // $ | ^ // proc | ^ // dev / {next}", changed to "awk' $ 2 ~ / ^" in the Halt_Get_remaining function // $ | ^ // proc | ^ // sys | ^ // dev / {next}.
6) HotPlug (hot plug) problem
The kernel's support for hot swaps is related to the KMOD kernel thread.
The solution is to replace all / proc.sysinit in / PROC / KSYMS in /tc/rc.system. Perform the following command:
#mv /etc/rc.d/rc.system /etc/rc.d/rc.system.bak#sed -e 's /// proc // ksyms /// proc // kallsyms / g' / etc / Rc.d / rc.system.bak> /etc/rc.d/rc.system
7) GLIBC problem
Users can upgrade the software package for the GLIBC standard library to solve this problem. Because of some distribution, such as Red Hat 9.0, the default installed GLIBC may be modified by the Red Hat core group. The download address of the package is: ftp://ftp.rpmfind.net/linux/redhat/...27.9.i386.rpm.
You can upgrade together with the following packages:
FTP: //ftp.rpmfind.net/linux/redhat/...2-27.9.i386.rpm
FTP: //ftp.rpmfind.net/linux/redhat/...2-27.9.i386.rpm
FTP: //ftp.rpmfind.net/linux/redhat/...2-27.9.i386.rpm
If you use "rpm-fer glibc *" to fail, use the command "rpm -e" first delete the old GLIBC, then use the command "rpm -up --force glibc *" to force installation.
other questions
Everyone may also meet other problems, but no matter what problem, you can try to resolve follows:
1. The kernel assembly is compiled as a module as much as possible. Perform the following command to quickly rebuild the kernel:
#make all modules_install install
2. Most of the cases of software failure are caused by the module names have been changed, and the scripts under /etc/rc.d/rc.system and /etc/rcx.d/* are not modified. Therefore, modifying related entries can be improved, but this also requires considerable background knowledge. If you feel trouble, you can focus all load modules in /etc/rc.d/rc.local. E.g:
Modprobe Eth0Modprobe Isofsmodprobe LoopModprobe Vfat
Modify the /etc/modoribe.conf file at the same time. See "Man MoDoribe.conf" to get more help information.
3. If you want to know the name after a module, you can first find this option when "make metronfig", select Help to find its configuration name (config_ *), then find config_ * in the Makefile under the source code related directory. You can usually find an OBJ-$ (config_ *), and its value is the name of the module.
Attachment: This article Reference article: http://tech.ccidnet.com/pub/Article...a103129_p1.html