Help building a new kernel...

Jerry Feldman {75562} gzf at gbr.msd.ray.com
Fri Oct 8 09:20:41 EDT 1999


Christoph wrote:
> 
> I'm trying to build a new kernel for my system and not having much luck.
> 
> System: Intel DK440LX MB with single PII 266 (kernel I'm building includes SMP)
>     OS: RedHat 6.0
> 
> I don't understand a few key points and can't seem to find adequate
> documentation.  Here are my questions...
> 
>         1) How do I build a kernel with a new version identifier, such that
>            when it is working, uname -r will report the new version?
>            And more importantly, it'll find it's modules in
>            /lib/modules/[new-version]
> 
>            * Note : I just looked at /etc/rc.d/rc.sysinit and believe the
>            module path it actually set in there with depmod
> 
>         2) What is the function of /boot/initrd-xxxxxxxxx?
>            There exists such a file for the supplied and installed kernel,
>            but not for my newly built kernel.  Where does it come from?
I'm not 100% sure of what the problem is, but I'll attempt to answer a
couple of these.
There should be 2 files in your /boot directory:
vmlinuz and . These go together. I have been re-building my 2.2.7 kernel. I
use the following procedures:
make dep clean bzlilo
This not only builds the kernel but also copies the kernel and system.map to
the /boot
directory, backing up the existing vmlinuz.

The second procedure is make modules then make modules_install. 
These can be done on a single line, but I like to view the results. 
The results of a kernel build is in /usr/src/linux/arch/<arch>/boot.
Where <arch> is the architecture, eg. i386 for an Intel kernel. 

There are several shortcuts one can take, but I have found that I normally
get careless, and forget something, so I use the full procedure. Another
thing I do to prevent me painting myself in the corner is that I keep a boot
(rescue) diskette, and I keep a golden kernel in /boot. So, my /boot has in
addition to vmlinuz and system.map, I have vmlinuz.bak and system.map.bak as
well as vmlinuz.ok and system.map.ok, since the bzlilo target backs up the
current kernel. The version number is compiled into the kernel in
/usr/src/include/linux/version.h

That is what is returned by the uname_r system call. 
-- 
Jerry Feldman (HP On-Site Consultant) http://gbrweb.msd.ray.com/~gzf/
+-------------------------------------------------------+-----Note: ------+
| Raytheon Electronic Systems  (W) (781)999-1837/1-1837 | My views may not|
| Mail Stop:  S3SG10           (F) (781)999-4030/1-4030 | reflect the     |
| 180 Hartwell Road            (W) gzf at gbr.msd.ray.com  | views of my     |
| Bedford, MA 01730-2498      (FWD:H+W) gaf at blu.org     | employer.       |
+-------------------------------------------------------+-----------------+
-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list