View Single Post

   
  #2 (permalink)  
Old 01-18-2008, 06:32 AM
Lenard
 
Posts: n/a
Default Re: Rebuilding Fedora Core 2 kernel question!

On Thu, 04 Nov 2004 16:17:37 -0800, Dennis C wrote:

> I am rebuilding the kernel on Fedora Core 2 on my PC. I used the
> following steps:
>
> make menuconfig
> make
> make modules


Skip the 'make modules' step here, it's not needed. The 'make' command
above this step creates the bzImage and the modules.

> make modules_install
> make install
>
> It created a bzImage file in /usr/src/linux-2.6.5-1.358/arch/i386/boot
>
> It also created a new directory /lib/modules/2.6.5-1.358custom with all
> the modules. The EXTRAVERSION flag in the Makefile is '-1.358custom'.
>
> I then copied the bzImage file to /boot/vmlinuz2. I left the original
> image intact so that if the new image bombs, I can recover by booting
> off the original image.


No need to copy anything that's what the 'make install' command does for
you.

> I am using GRUB, so I edited /etc/grub.conf to add my newly built image:


No need to edit /boot/grub/grub.conf (this is the actual file) this should
be done for you along with the copying of the vmlinuz-XXXX image and other
files to the /boot directory.

> title Dennis Fedora Core (2.6.5-1.358)
> root (hd0,0)
> kernel /vmlinuz2 ro root=LABEL=/ rhgb quiet initrd
> /initrd-2.6.5-1.358.img


This part is not right, take a look at your /boot directory you should see
some files that have 2.6.5-1.358custom in their names. It should something
read like;

title Dennis (my custom FC2 kernel)
root (hd0,0)
kernel /vmlinuz-2.6.5-1.358custom ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358custom.img

After getting everything back to normal, you can go back to your source
directory for the custom kernel and run 'make rpm' to create your own
custom kernel rpm packages both source and binary you will find them in
the /usr/src/redhat/RPMS/i386 and /usr/src/redhat/SRPMS locations.


--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety." -- B. Franklin, 1759

Reply With Quote