Solved

Kernel: make xconfig doesn't show all options?

Posted on 2000-04-06
5
643 Views
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?

Thanks,
Chris LeFebvre
0
Comment
Question by:CLeFebvre
5 Comments
 
LVL 3

Expert Comment

by:DVB
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.
0
 
LVL 3

Expert Comment

by:jyu_88
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: http://www.redhat.com/mirrors/LDP
0
 
LVL 3

Expert Comment

by:alien_life_form
ID: 2692543
Greetings.

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.

<gripe>

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.

</gripe>

Cheers,
   alf
0
 
LVL 2

Expert Comment

by:mzehner
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 Configure.help 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.
0
 
LVL 2

Accepted Solution

by:
mzehner earned 200 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/Configure.help" 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 "System.map" from "/usr/src/linux" to the "/boot" directory. Rename it "System.map=w.x.y" and make sure there is a link file called "System.map" 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/System.map /boot/System.map-2.2.14
  b.  cd /boot
  c.  rm System.map
  d.  ln –s System.map-2.2.14 System.map
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.
      image=/boot/vmlinuz
            label=rhl
            initrd=/boot/initrd-2.2.14.img
            read-only
            root=/dev/hda2
            
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.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now