It took a few days to compile the successful kernel2.6.7, the process is really hard. The ancient language has clouds: "Work hard!" Now you can finally be a buoy. Because many friends are in the order of operations and some important configurations It is unknown. It is often sick. In addition, the online information is more and more annoying, making the compilation and internal core power is not high, and even the original system collapse is not a small number. I am one of them :-) In fact, compile the kernel is not one Difficulties. If you can operate according to the correct way, you can get it for an hour and a half. Is it very encouraged! Tony said, now we start now. My original system is redhat9.0, core 2.4. 20-8, compiled kernel 2.6.7, for reference only. A total of four parts: Preparation before compilation -> Compilation Configuration -> Compilation Process -> FAQ Pre-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 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 / kernel/people/rusty/modules/module-init-tools-3.0.tar.gz http://www.kernel.org/pub/linux/kernel/people/rusty/modules/modutils-2.4.21-23. SRC.RPM 3) Install module-init-tools. It replaces DEPMOD [/ Sbin / DEPMOD] and other tools. TAR -ZXVF Module-init-tools-3.0.tar.gz cd module-init-tools-3.0 ./ Configure --prefix = / sbin make make install ./generate-modprobe.conf /etc/modprobe.conf 4) Install MODUTILS-2.4.21-23.Src.rpm. You may see "User Rusty and Group Rusty Not EXISTING "warning. It doesn't matter, you just need to force the installation. If you don't do this for RedHat 9 and Redhat 8 Step, you will have problems when "make MODULES_INSTALL". Rpm -i models-2.4.21-23.src.rpm rpmbuild -bb /usr/src/redhat/specs/modutils.SPEC rpm -fi / usr /src/redhat/rpms/i386/modutils-2.4.21-23.i386.rpm 5) Unzip kernel source code. Place the downloaded source code to the directory / usr / src, then CD / USR / SRC TAR XVfj Linux-2.6.7.tar.bz2 CD Linux-2.6.7 Two Compilation Configuration In this part involves the configuration of several important modules, special attention. General attention. Generally, use the "Make MenuConfig" command to configure the kernel. Enter the above command to appear A menu interface, the user can make a module required. Here, a few important configurations 1) File system is necessary to select an EXT3 file system, file systems ---> [*] ext3 journaling file system support [*] ext3 security Labels [*] JBD (EXT3) Debugging Support The above three must be selected, and to build (即标 *). This is very important, you must check it out after configuration. Config_ext3_fs = y " This item. 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 support Advanced 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 Support PCI DEVICES ---> <*> Intel i8x0 / mx440, sis 7012; ali 5455; nforce audio; amd768 / 8111 open sound system ---> <> Open Sound System (Deprecated) The above three configurations are related to whether the new kernel can run normally. Please pay attention to it. If you don't understand it, you can press the default selection. The three compilation process compiles as follows, probably needs one Many hours, you can relax :-) make bzimage make MODULES MAKE MAKE BZIMAGE MAKE INSTALL Run the new kernel, please check the content of /boot/grub/grub.conf, under Face Configuration Reference # GRUB.CONF generated by Anaconda # # Note That You do not rerun grub after makeking changes to this file # NOTE: you have a / boot partition. This means That # all kernel and initrd Paths Are Relative to / boot /, eg. # root (HD0, 0) # kernel / vmlinuz-version ro root = / dev / hdc3 # initrd /initrd-version.img # Boot = / dev / hdc default = 1 timeout = 10 SplashImage = (HD0, 0) /grub/splash.xpm.gz Title Red Hat Linux (2.6.7) root (HD0, 0) kernel /Vmlinuz-2.6.7 Ro root = label = / initrd /initrd-2.6.7. IMG Title Red Hat Linux (2.4.20 - root (HD0, 0) kernel /Vmlinuz-2.4.20-8 RO root = label =
/ initrd /initrd-2.4.20-8. FAQ 1) FAQ 1) After the RPM problem enters the compiled kernel, the command related to rpm cannot be used, and the following error appears: rpmdb: unable to join the environment error: db4 error (11) from dbenv-> open: Resource temporarily unavailable error: can not open Packages index using db3 - Resource temporarily unavailable (11) error: can not open Packages database in / var / lib / rpm no packages workaround is to perform The "export ld_assume_kernel = 2.2.25" command can also write it to / etc / bashrc. 2) The module name of the Sound problem has changed. My notebook original sound card driver is I810_AUDIO, and now it has been changed to SND-Intel8x0. So you need to add the following to /etc/modprobe.conf: alias char-major-14 Soundcore Alias Sound Snd-Intel8x0 Alias Sound-Slot-0 Snd-Intel8x0 Alias SND-CARD-0 SND-Intel8x0 Alias Sound-Service -0-0 SND-MIXER-OSS Alias Sound-Service-0-1 SND-SEQ-OSS Alias Sound-Service-0-3 SND-PCM-OSS Alias Sound-Service-0-8 SND-SEQ-OSS ALIAS SOUND -Service-0-12 SND-PCM-OSS Install Snd-Intel8x0 / Sbin / ModProbe - ITORE-ITALL SOUND-SLOT-0 && {/ bin / amix-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-REMOVE SOUND-SLOT-0 then executes "ModProbe Sound" loads sound module and uses the following command to check the sound card driver: #cat / proc / asound / cards display results as follows: 0 [Si7012]: ICH - SIS Si7012 SIS SI7012 AT 0XDC00, IRQ 11 3) VMware problem solution is: ◆ Replace all "/ proc / ksyms" in /usr/bin/vmware-config.pl is "/ 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 use the vmnet.tar unpack: #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 again to VMMon.tar: #TAR CVF VMMon.tar vmnet-only. If the above operation is still failed, another solution is to download VMware-Any-Updatexx.tar.gz to http://ftp.cvut.cz/vmware/, unzip it into any directory, execute it Runme.pl. 4) USB issues New 2.6.0 core used USB modules 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.sysinit, do the following modification: needusbstorage = if [$ usb = "1"]; the needusbstorage = `lc_all = c grep -e" ^ i. * CLS = 08 "/ SYS / BUS / USB / Devices 2> / dev / null` Action $" Initializing USB 1.1 Host Controller: "Modprobe OHCI-HCD 2> / dev / null action $" Initializing USB HID Interface: "Modprobe Hid 2> / dev / null action $ "Initializing USB Keyboard:" ModProbe USBKBD 2> / dev / null action $ "Initializing USB Mouse:" Modprobe USBMouse 2> / dev / null Fi If the USB bus is 2.0, "OHCI- HCD "is changed to" EHCI-HCD ". 5) SYSFS problem solution is: ◆ Establish directory / sys: #mkdir / sys ◆ Find "mount -f / proc" in the /etc/rc.d/rc.sinit file, join "mount -f / sys. ◆ 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 kernel's hot-swap function support is related to the KMOD kernel thread.