Improve company productivity with a Business Account.Sign Up


Kernel: make xconfig doesn't show all options?

Posted on 2000-04-06
Medium Priority
Last Modified: 2012-05-04
 I'm attempting to compile and upgrade the kernel on a RH 6.1 system from 2.2.12 to 2.2.14 in order to enable IP masquerading. I did manage to get a working config file using 'make config' but I don't think I have all the options set right. Rather than having to run through that really long text config program everytime I want to change an option I'd much rather use xconfig. The problem is that when running 'make xconfig' many options that I need are either not on the various options screens or they're there but grayed out and unselectable. Neither the IP Masquerading or Kernel How To goes into any depth on xconfig. Can someone point me to any How To's or FAQ's that could give me instructions or help on this?

Chris LeFebvre
Question by:CLeFebvre

Expert Comment

ID: 2691543
If something is greyed out, you will have to select some previous option to enable the next ones. If they aren't on the screens, :(.
      Actually, if you have your old config file saved, you might need to just add the ip masq settings to it. Just check which lines in your current config file refer to ipmasq and add them to your old file.

Expert Comment

ID: 2691645
consider a fresh source tree from the original kernel tar-balls in case xconfig is reading something made by previous attempts, which I don't think it would though.enable 'experimental feature prompt' at first one or two submenus.Like DVB said, you need to enable related super option/directives in order to get to sub options.You'll be able to find IP masquerading HOWTO at any LDP mirrors such as:

Expert Comment

ID: 2692543

As an aside, you don't need to recompile zilch to have masquerading work in RH6.1. Just configure ipchains (in /etc/rc.d/rc.local, for instance) and turn on IP forwarding (that's echo 1>/proc/<something>/ipforward...).

Of course, if you *need* 2.2.14 for other stuff, then it's different. But even with that, you should be able to find a functionl RPM - no recompilation needed - on the redhat's site.

These days, recompillation is generally mandatory for really exotic/unusual stuff, like, say, radio HAM or UFS support. Or for kicks.


Is anybody going to do something about the crappy HOWTO habit of sending people on kernel compilation errands as the first task for just about anything?
E.G.: PPP support, /proc filesystem support, IP aliasling,etc.

At the very least, kernel recompilation should figure as the last - not first - thing to look at.



Expert Comment

ID: 2753814
I did the same thing and had to run through the compile setup several times until I got it the way I wanted.  When you use menuconfig or xconfig, I have noticed that all the options are not the same as when you type "make config".  These kernel options are changing all the time so any specific documentation you may find would not be current.  The best way I handle it is to read the file on an alternate terminal and use Alt-F1 and Alt-F2 to switch between them.  Another possible option is to use menuconfig or xconfig and then go back and edit the makefile being sure the options you want are included.  If they are not you may enter them.  I have documented some procedures on recompiling the kernel and will post them below.

Accepted Solution

mzehner earned 800 total points
ID: 2753832
1.  Backup the present kernel which is in "/boot" for most systems. You can tell where it is by looking at "/etc/lilo.conf" . sometimes lilo.conf will point to a link file. Trace the link file and backup the file being pointed to.
2.  Have an alternate way to boot such as another linux system on your computer or an emergency boot disk that you can access your filesystem from in case your new kernel crashes.
3.  Back up your kernel modules in the directory "/modules". There is probably a directory full of modules so you should be able to back it up using "cp –dpr dir1 dir2" where dir1 is the name of the directory where your modules are and dir2 is where you want to put them.
4.  Go to "/usr/src/linux". There is a "/usr/src/linux/.config" file used to do the compile. It is modified by typing "make config" and the values in it are used to determine defaults while doing the "make config". Back this file up to keep your original settings if you want.
5.  Type "make config" and answer the hundreds of questions asked. On another terminal, open the file "/usr/src/linux/Documentation/" to determine what each configuration is. Also you can type "make menuconfig" or from an X session "make xconfig".
6.  Type "make dep"
7.  Type "make clean"
8.  Type "make bzImage" or "make zImage" if the kernel is small.
9.  Type "make modules"
10.  Type "make modules_install"
11.  Copy the file "/usr/src/linux/arch/i386/boot/bzImage" to "/boot/vmlinuz".
12.  Copy the file "" from "/usr/src/linux" to the "/boot" directory. Rename it "" and make sure there is a link file called "" pointing to it. This step will keep you from getting warning messages when you boot. It seems to be a step they forgot to include in the kernel-howto.
  a.  cp /usr/src/ /boot/
  b.  cd /boot
  c.  rm
  d.  ln –s
13.  Run rdev on the new kernel image to verify the root filesystem device. "rdev /boot/vmlinuz /dev/hda2". Please note that this step may be optional dependent on whether you want to use the boot loader, lilo, to point to the root device.
14.  Make sure the /etc/lilo.conf file is correct (image=/boot/vmlinuz)
15.  If your kernel has a feature supported by a module that is required to boot, you will need to make a RAM disk boot image or your system won't boot.
  a.  Type "lsmod" and look to see if the "loop" module is loaded. If it is skip the next step.
  b.  Type "insmod /lib/modules/2.2.14/block/loop.o"
Use this command if the loopback module is not installed. This assumes you compiled the support into your kernel. In my example, I used kernel version 2.2.14, but your kernel version may have a different number. Substitute the appropriate values.
  c.  Type "mkinitrd /boot/initrd-2.2.14.img 2.2.14"
Again, this example is for kernel version 2.2.14. This command will create a RAM image module for your kernel to load into.
  d.  Add an entry similar to "initrd=/boot/initrd-2.2.14.img" to the "/etc/lilo.conf" file for the stanza that is used to boot this kernel. An example of the stanza follows.
Read the lilo and lilo.conf man pages.
Run lilo by typing "lilo". If you didn't set the root device in step 12, you will need a line like "root=/dev/hda2" in /etc/lilo.conf in the group of commands for your kernel. This will tell the kernel where your root filesystem is.

I did have some records of the options I used but I'm not sure where they are.  I will also check to see if I still have a copy of the makefile I generated.  If I find it, I will post a comment and see about sending it to you.  As far as the greyed out options, some are dependent on others so they will be greyed out until you select the correct ones.  To fix the problem go to the earlier selection and select them as someone commented earlier.  I find menuconfig works best for this.

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Fine Tune your automatic Updates for Ubuntu / Debian
Welcome back to our beginners guide of the popular Unix tool, cron. If you missed part one where we introduced this tool, the link is below. We left off learning how to build a simple script to schedule automatic back ups. Now, we’ll learn how to se…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

606 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question