[wplug] redhat kernel woes

Keir Josephson kjoseph at stargate.net
Tue Jun 17 23:47:44 EDT 2003


>
> Finally, a related question- if I wanted to build a vanilla kernel but
> keep the options from my redhat configuration, I fear there may be
> inconsistencies between the configuration files.  Is there an established
> procedure for salvaging as much as one can from an existing config file
> and only asking about options that are not already set?

Here's what I normally do when I want to cut some fat out of a Red Hat
kernel.

1) cd to the kernel source dir

2) edit the Makefile and add a version to the kernel rev

3) # make mrproper

4) # uname -a (check the kernel rev currently running)

5) # cp configs/<kernelrev>.config .config (this way your sure to have the
right config for you current kernel)

6) # make oldconfig

7) # make xconfig (this will load up and show you what is available in the
kernel. Here's where you can take out or put in any module that you want
to be able to run. Xconfig has nice descriptions of what modules are
available with that particular kernel. This is also good, if you have alot
of machines with similar hardware, you can save the config to a file and
use it across all the machines without having to go back and set the
options each time.)

8) # make dep clean bzImage modules modules_install install (this is just
doing all the make commands at once. Nice if you have to leave the machine
for awhile, but not too good for checking for errors. I've had problems
every now and then with the modules_install part as well. I don't know if
it's just a problem with Red Hat or what, but when I would load the config
onto another machine, sometimes it would install without errors and other
times it wouldn't. The weird part is that the fix is to go back into
xconfig, load the file, and change one or two items and resave the config.
Then run make modules, modules_install, etc., and it would work. Maybe
it's just a thing with xconfig. At any rate, with that kind of fix, all
I can say is good luck.)

9) # mkinitrd -f -v /boot/initrd-[kernel rev].img [kernel rev]

10) If you use lilo, edit /etc/lilo.conf & add the new kernel as another
entry. This is a big help if you have problems booting into the new
kernel, you can boot back into the old one and go back to the drawing
board. NOTE: I haven't done this with GRUB yet, but I'm betting it's not
much different.

11) # lilo -t -v (tests the .conf file)

12) # lilo -v (loads the updated file)

13) reboot (lilo should show the new listings)

14) # uname -a (your new kernel with it's new rev should come up)

-Keir

>
> Bryguy
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>



More information about the wplug mailing list