David Frager wrote: > When I install from the RH distro. CD, the kernel is built during the > installation process, however, there is not a .config file created. Not quite right. The kernel is never "built" during install, rather a kernel is selected from the avialable packaged kernels and installed. As for how those kernels are actually built ... If anyone's not inerested, stop reading now. I'm going to wander off from the Win4Lin topic here. > I have attempted to build the kernel with the W4L patch, however, without > the original .config file, I keep missing components that were discovered > at initial install time. I there a way to generate this file once > booted?? What you've most likely got installed (under /usr/src/linux-2.4 if you're running 7.1) is the kernel-source RPM. This is not what the kernels are built from. They're built from the kernel "source RPM", not the "kernel source" RPM. With me so far? :) If you look under your source tree in /usr/src/linux-2.4/configs you'll find a whole bunch of files. These are the various .config files that were used by RedHat to generate the kernels. Pull one out of there that matches your system and configure from that. I'm now going to digress even FURTHER into la-la land and explain how kernels are built from source RPMS in case anyone is interested. Bail out now if your ears are already starting to bleed. If you're brave, you can start investigating the wonderful world of the Source RPM. Go you your favorite RedHat mirror site, or pop in the Sources CD if you bought a boxed set (I don't have such things nearby so I apologise if I get a few path and file names wrong here). Somewhere in that lot is an SRPMS directory, and one of the items in it will be something like kernel-2.4.2.src.rpm. Grab that and install it (rpm -i). This will NOT unpack in /usr/src/linux-2.4 like the kernel-source RPM. Instead, stuff will get dumped in various directories under /usr/src/redhat (/usr/src/RPM under Mandrake, otherwise this is all pretty much the same). If you look in /usr/src/redhat/SOURCES at this point, you'll see a smegload of patch files and other junk, as well as a pristine linux-2.4.2.tar.bz file, as available at all fine kernel mirror sites. In /usr/src/redhat/SPECS is a "kernel.spec" file. This contains all the instructions for patching and building the various RedHat kernels. Have a look at it. It's plain text and mostly self-explanatory. If you change directory to /usr/src/redhat and run: rpm -bb SPECS/kernel.spec The kernel source will be unpacked, the various patches applied and kernels built. Then new kernel RPMS will be dropped into /usr/src/redhat/RPMS somewhere, depending on what architecture the kernel was built for. You can swap architectures by using the (for example) --target=athlon parameter with your rpm -bb command to generate an Athlon optimised kernel. See the rpm man page for full details on the build switches. If you want examples, there are a set of RPMS at ftp://discord.maths.monash.edu.au/pub/win4lin which are nothing more than the stock RedHat 7.1 kernel with the Win4Lin patch incorporated. If you download the SRPM you can see the changes made to the kernel.spec file and note the addition of the Win4Lin patch into the /usr/src/redhat/SOURCES directory. I tend to do this because I'm keeping a fair few machines in sync. It's probably not worth the hassle if it's just a personal box you're looking after. Stick with fishing the .config out of the configs directory and doing a normal kernel build. OK, I'm going to get a life now. :) Mike. _______________________________________________ Win4Lin-users mailing list [EMAIL PROTECTED] https://lists.netraverse.com/mailman/listinfo/win4lin-users
