Red Hat custom Kernel compilation mini-How-To for Red Hat 8-9
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ahh... For xconfig, (as I wrote somewhere in the tutorial for 2.6.x) you need to have the QT-devel packages. Run make menuconfig, you should have already everything required to use that (ncurses)
I have installed EVERY development tool I could find during the install. I maed a few aborted attempts at an install before and kept missing htis package or that so I did a re-install and just installed all development packages But typing 'make menuconfig' does the same thing
make menuconfig
make: *** No rule to make target `menuconfig'. Stop.
Somehow I feel that some basic things have been moved around in Fedor3. I have tried installing quite a few programs that wont compile becasue they cant find GTK libraries, and I know they are installed on my system as well ...
Thanx for bearing with me Under /usr/src there are three subdirectories
/redhat
/Linux
/ATI
I have changed to the redhat sources folder
cd /usr/src/redhat/sources but the same thing happans, I am pretty sure I have the sources in /usr/src/redhat/sources I can see a bunch of files along with some config LINUX.xxxxxx and Kernel.xxxxxxx files there which I assume to be the sources. EIther way I still get
make menuconfig
make: *** No rule to make target `menuconfig'. Stop.
Of special interest there is the build entry of the output, since that should point to the source tree... Unless the kenrel modules are distributed with the kernel headers (usually found in /lib/modules/`uname -r`/build/include )
Edit: If build is not a symlink but a regular directory, you may need to compile a new kernel altogether or get the sources from the kernel-<version>.src.rpm, install that (which would go then to /usr/src/redhat/SOURCES/) and then extract the .tar.bz2 from that directory to /usr/src/:
Code:
cd /usr/src/redhat/SOURCES
tar jxf linux-2.6.11.tar.bz2 -C /usr/src/
This will create the /usr/src/linux-2.6.11 directory. Then you can apply the patches from that directory to the actual kernel in /usr/src/linux-2.6.11 by:
Code:
cd /usr/src/linux-2.6.11
patch -p1 -i /usr/src/redhat/SOURCES/<file1>.patch
The order to patch the kernel to have a Fedora patched kernel is outlined in the file kernel.spec found in /usr/src/redhat/SPECS
The file is easy to read and follow, just pay attention to what patches go first than which and apply them. Once done, copy the configuration for your architecture from the /usr/src/redhat/SOURCES/kernel/configs/<your_arch>.confg to /usr/src/linux-2.6.11/ as .config, then:
Code:
cd /usr/src/linux-2.6.11
make menuconfig
That seems like a lot, I know, but once you're in menuconfig's interface, you'll be able to modify the kernel configuration to meet your needs.
Ok, build is a regular directory... So no much luck there...
If you'd ask me, I'd suggest you to compile a vanilla 2.6.12 or 2.6.11 kernel rather than trying to re-compile a Fedora kernel. You can always use your kernel's configuration, since it lives in /boot/config-<kernel>, and you'd only have to enable/disable things from there. As for any special patches, as long as you stick to the Alan Cox' patch, you'll pretty much have a native Fedora kernel... Or very close.
Wow this is all to much information for me, I need to digest it all. Is it really that big of an issue to re-compile a Fedora Kernel? It almost sounds like I would be better off putting the original Geforce2 card in and waiting a week or two for a paycheck and then buy an NVIDIA card, the drivers are just SO much easier to install, there is no comparision. It just gets me upset becasue ATI has great hardware and IMO superior graphic quality.....
Well, yeah. Indeed, ATi has better hardware overall, but their support for Linux is laughable at best. Even performance wise, a GeForce Ti 4600 beats the heck out of a Radeon 9500 which in theory is superior due to SM 2.0 support in hardware, not to mention that some features makes it more efficient (and has a superior T&L engine too). When softmoded to a Pro card, a 9500 should beat the heck out of Ti 4600 simply because they both would have the same amount of texture units available... At least in Windows. In Linux, however, the 9500 card just doesn't cut it. Its performance is way too slow to what it should be (again in Windows).
Anyway, enough of rants, which are off topic anyway. Regarding your problem at hand, knowing how build (or re-build) a kernel will be beneficial to you even with an nVidia card, which would mean tweaking the AGP to use NVAGP which some say is faster than AGPGART, though I've only seen that increase with nForce chipsets, which I have, for others, there's no much difference. Also to trim down a bit a kernel, and in the process you may learn a lot of how Linux works at the bare bones. Though I use Fedora mainly, my kernels are based off some (some say) quite experimental patches, which makes my PC to yield the best performance off it. Sure I've crashed my system when trying to get all working the way I want, but I think it's been worth it. At least for me. I would not advise anyone to attempt these kind of stuff as a regular basis, simply because 99.9% of the users won't need to. This kind of stuff is more for enthusiasts and those who want to learn the system inside-out.
All that exposed earlier, indeed seems like a lot, but in the end it is not that difficult... Just laborous.
From where can i get the RPM for kernel 2.6 stable?? For RH8.0 and 9.0. I need the link because I have made a lot search but found nothing excepr tar files.. But i need the RPM.
I'm not sure there are even 2.6 kernel packages for those distributions, as they require some hacks to get them to properly boot (for instance some regarding the USB keyboard and mouse devices). Your best bet would be to install a native 2.6 distribution. You can always test your luck and attempt to build a 2.6 kernel on them, be ware, you will require a lot of packages to be updated (binutils, modutils, etc)
this is my first try at kernel compilation and so far it has not been going well (5:00 am )
May be my issue more related to the grub config (kernel compilation went OK, no error - I have copied the vmlinux file to /boot). but when I am trying to boot to new kernel i am getting an error message,
Error 13: invalid or unsupported executable format
Is there any thing i need to do for the initrd option in grub.conf file? My understanding & I read some where that since i am putting every thing in the main kernel file or as a module i dont need a ram disk, so i delete the initrd line. does it sound ok? or is that the problem?
here is the grub.conf file, i am trying to load the 3rd one red hat test linux
default=1
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.9-22.ELsmp)
root (hd1,0)
kernel /vmlinuz-2.6.9-22.ELsmp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-22.ELsmp.img
title Red Hat Enterprise Linux ES-up (2.6.9-22.EL)
root (hd1,0)
kernel /vmlinuz-2.6.9-22.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-22.EL.img
title Red Hat Test LINUX (2.6.9-22.ELsmp)
root (hd1,0)
kernel /vmlinux-test ro root=LABEL=/ rhgb quiet
title Other
rootnoverify (hd0,1)
chainloader +1
here is the list of file from /boot
drwxr-xr-x 4 root root 1024 Dec 18 03:50 .
drwxr-xr-x 25 root root 4096 Dec 18 04:50 ..
-rw-r--r-- 1 root root 5824 Nov 15 2004 boot.b
-rw-r--r-- 1 root root 612 Nov 15 2004 chain.b
-rw-r--r-- 1 root root 48509 Sep 19 2005 config-2.6.9-22.EL
-rw-r--r-- 1 root root 48017 Sep 19 2005 config-2.6.9-22.ELsmp
drwxr-xr-x 2 root root 1024 Dec 18 04:47 grub
-rw-r--r-- 1 root root 490334 Dec 5 02:41 initrd-2.6.9-22.EL.img
-rw-r--r-- 1 root root 481902 Dec 5 02:41 initrd-2.6.9-22.ELsmp.img
drwx------ 2 root root 12288 Dec 4 19:56 lost+found
-rw-r--r-- 1 root root 81860 Sep 29 2004 memtest86+-1.26
-rw-r--r-- 1 root root 23108 Aug 3 2005 message
-rw-r--r-- 1 root root 21282 Aug 3 2005 message.ja
-rw-r--r-- 1 root root 640 Nov 15 2004 os2_d.b
-rw-r--r-- 1 root root 731262 Sep 19 2005 System.map-2.6.9-22.EL
-rw-r--r-- 1 root root 758606 Sep 19 2005 System.map-2.6.9-22.ELsmp
-rwxr-xr-x 1 root root 43038615 Dec 18 03:50 vmlinux-test
-rw-r--r-- 1 root root 1465064 Sep 19 2005 vmlinuz-2.6.9-22.EL
-rw-r--r-- 1 root root 1426721 Sep 19 2005 vmlinuz-2.6.9-22.ELsmp
You do not need to update grub manually. By issuing "make install" this will automatically update your grub entry, as the routine is part of the kernel scripts, so no need to do anything but issuing the following command (assuming everyting else is correct):
Code:
make bzImage modules modules_install install
This line will have the effect of building and installing everything, the kenrel image, the modules and then install them. That's the way I have been doing this since... seems like forever now. In any case, make install will take care of that for you.
hi, I recompiled Redhat9.0 with kernel-2.4.20-8,the original kernel source in Redhat9.0,the command like this:
make mrproper
make clean
make oldconfig
make dep bzImage modules modules_install install
after rebooted the computer, I chose new kernel which is 2.4.20-8custome, and it was normal until the login screen was on, the keyboard didn't work! then I can't input username and password!
also I use /boot/config-2.4.20-8 to make again, the problem is still on.my keyboard is usb interfaced.
can you tell me why?
BTW: I did nothing in make oldconfig.
thanks
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.