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.
Doomhammer (ugh, like the Orc in WC series ):
You need to do several things:
Find out the motherboard which your friend has
Find out the on-board devices he has (brands, etc), If he has still Windwos around it could be of real help to check the device manager, just to be sure.
Definitively you would need to compile a more recent kernel (2.4.22 or 2.4.23 if it is available, current status is RC1).
While indeed you could use /boot/config-2.4.20-8 file as a guideline for the configuration of the new kernel, first find out if you don't need to apply any patches to the kernel in order for it to work with some devices. My recomendation would be to load the configuration file from /boot but save it in the current directory (by save and exit it will write the .config file).
Bear in mind that you may have to re-compile several times before the system would be 100% working. Don't despair, and explain to your friend this also!
before comiling...
copy your config file located in /boot.
usually the file is /boot/config-[kernel-version]
to the directoty of the kernel source (usually /usr/src/your_kernel_source)
now run the following:
make xconfig (or menuconfig)
press on LOAD CONFIGURATION FROM FILE and write config-[your-kernel-version] then press save.
Next you type
make mrproper
make dep clean
make bzImage
make modules
make modules_install
make install
make clean
it takes usually a good 30-40 minutes to complete the whole process.
Voila!
have a nice day!
Last edited by Doomhammer; 11-19-2003 at 06:28 PM.
When attempting to configure, compile and install the latest stable linux kernel, I received a kernel panic at boot time that reports my system's inablity to mount the root file system. I was wondering if anyone would have any suggestions as to how I may proceed to fix this problem? What follows is a description of the steps I employed to install the new kernel:
I downloaded the latest stable linux kernel, linux-2.4.22, in bz2 format, i.e. linux-2.4.22.tar.bz2, decompressed the bz2 file to get the linux-2.4.22.tar tarball and then extracted the directories and files contained therein using the tar command as tar -xvf linux-2.4.22.tar. I then proceeded to configure and install this new kernel source using the following steps:
1) I executed make mrproper utility to prepare the kernel source tree, cleaning out any old files or binaries.
2) I executed make xconfig utility to bring up a GUI configuration tool to use in configuring the new kernel, then proceeded to configure it.
3) I executed make dep utility to create the code dependencies needed for the install.
4) I executed the make clean utility to prepare the sources for the actual compilation of the kernel.
5) I executed the make bzImage utility to compile the source code to a binary image.
6) I executed the make modules utility to compile any modules identified in the configuration step that the kernal needs.
7) I executed the make modules_install utility to install the compiled modules into the kernel binary.
Finally,
8) I executed the make install utility to automatically copy the kernel binary to /boot, create any other files the kernel needs, and modify the bootloader (grub) to boot the new kernel as the default.
How did you configure the kernel? Not the utility but the actual modules and drivers built into the kernel? it sounds to me that you left out the modules corresponding to the root filesystem. In the case of Red Hat it is the ext3 filesystem. You may also compile ext3 support into the kernel, to avoid this kind of problems.
does it have something to do with it using the config-2.4.20-8 file? I'm using GNOME by the way. Here are some sample unresolved symbols errors I get while running make install_modules:
depmod: *** Unresolved symbols in /lib/modules/2.6.0-test10/kernel/fs/nfsd/nfsd.ko
...
depmod: *** Unresolved symbols in /lib/modules/2.6.0-test10/kernel/fs/vfat/vfat.ko
...
depmod: *** Unresolved symbols in /lib/modules/2.6.0-test10/kernel/net/ipv4/netfilter/ip_nat_ftp.ko
...
depmod: *** Unresolved symbols in /lib/modules/2.6.0-test10/kernel/net/ipv4/netfilter/ipt_state.ko
...
depmod: *** Unresolved symbols in /lib/modules/2.6.0-test10/kernel/net/ipx/ipx.ko
...
depmod: *** Unresolved symbols in /lib/modules/2.6.0-test10/kernel/sound/core/oss/snd-mixer-oss.ko
...
depmod: *** Unresolved symbols in /lib/modules/2.6.0-test10/kernel/sound/pci/snd-ens1371.ko
<--- how will I get my Ensoniq 1371 PCI card to work now???
I would most likely be sure about that. They both (2.4 & 2.6) manage things QUITE differently. I'd suggest you to open an xconfig session for bor both kernels (each in different virtual desktops) and just configure the 2.6 taking information from the 2.4. Before trying to configure the 2.6 kernel though, I'd do make mrproper.
I meant that because of deep differences between the two kernel versions (2.4 against 2.6) you should not use the same config file u use for a 2.4.x kernel into a 2.6.x kernel. That is why I suggested to :
Open two consoles in separate virutal desktops.
Suppose you will open the 2.6 xconfig in the desktop 1 and in the desktop 2 the xconfig for the 2.4, just navigate to where the sources are located in either console and type 'make xconfig' (or make gconfig for GNOME config with the 2.6).
Compare the two configuration utilities and configure by hand the 2.6 based on what your current 2.4 has selected.
You only need to install the sources (from CD 1) and yes, start the xconfig after copying the /boot/config-<version> file. In any case, if what you want is to make a smaller kernel, then the help entries in the confiugration tool! They're self explainatory in most cases. You still have questions/trouble understanding some concept or need for a driver? no problem! head towards /where/you/have/the/sources/Documentation/ and read the various documents in there, they're the most helpful in understanding what options you need (require) and want or don't want to compile into your kernel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.