Default Kernel .config file

Rick Stevens rstevens at vitalstream.com
Thu Jun 15 20:50:54 UTC 2006


On Thu, 2006-06-15 at 15:08 -0500, Harrington, Todd wrote:
> Hello,
> 
> I am installing RHEL4 ES on a "client" computer. I do a fresh load to a local hard drive on the "client" with the goal of eventually making this node a "diskless client" that will boot via PXE.. 
> I use the Netboot GUI on my Linux "server" (another machine) that comes with RedHat and it pulls the image and kernel from my hard drive on my "client" and I can now PXE boot my client from the server. I am actually now booting the default kernel that was installed on the hard drive of my "client". Life is good. 
> 
> My problem is that I want to reconfigure the kernel on my client and when I do, the default .config files (in the "configs" directory or the Config-xxx file in the /boot directory) do not contain the same settings as are in my original kernel and my new kernel does not boot across the network. I have been pulling my hair out trying to get my new kernel to boot. How can I get the default .config settings for the kernel that was initially installed to my local hard drive? I read about "extract_ikconfig" and /proc/config that allow you to pull the .config info from a kernel but you have to have that support in the kernel in the first place. It does not appear the initial RedHat install included this in the kernel.

In the future, please format your messages as plain text, 72 characters
per line.  Not all mail readers deal with long lines well.

Now, to your problem...

When RHEL installs, the config file that matches the kernel that was
installed is the "/boot/config-`uname -r`" file.  The only difference
between that config file and the actual kernel is that the kernel was
built with the "CONFIG_DEBUG_INFO" option (in the "Kernel->Hacking"
section) turned off, which creates modules that don't have full debug
info in them and are therefore smaller in size.

Also note that the default kernels put all of the network, SCSI and
non-ext2 filesystem drivers in the initrd image file.  If you
reconfigure the kernel, you have to rebuild the initrd image.  That's
done by:

	# cd /boot
	# mkinitrd -f -v initrd-whatever.img whatever

replacing "whatever" with the kernel version number you're working with.
Note that both the kernel AND the initrd image must be on your boot
server or the kernel won't be able to find the drivers it needs.

Now, you CAN reconfigure the kernel and build the necessary network
and filesystem drivers into the kernel and remove the need for an initrd
image completely, but if you change the hardware (say, swap out an
Intel e1000 card for an Intel e100 card), you won't be able to boot from
the network again since the driver for the card won't be present.

My quicky document on building kernels and such can be found here:

	http://www.rhil.net/docs/kernelbuild-26.html

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-               The Theory of Rapitivity: E=MC Hammer                -
-                                  -- Glenn Marcus (via TopFive.com) -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list