Unix Technical Forum

Rebuilding Fedora Core 2 kernel question!

This is a discussion on Rebuilding Fedora Core 2 kernel question! within the Linux Operating System forums, part of the Unix Operating Systems category; --> I am rebuilding the kernel on Fedora Core 2 on my PC. I used the following steps: make menuconfig ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-18-2008, 05:32 AM
Dennis C
 
Posts: n/a
Default Rebuilding Fedora Core 2 kernel question!

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

make menuconfig
make
make 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.

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

default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.6.5-1.358)
root (hd0,0)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358.img

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

When I rebooted the box, when I selected to boot from my newly built
image 'Dennis Fedora Core', it gave me errors like:

jbd version magic '2.6.5-1.358 686 REGPARM 4KSTACKS gcc-3.3' should be
'2.6.5-1.358custom 686 REGPARM 4KSTACKS gcc-3.3'
insmod: error inserting '/lib/jbd.ko': -1 invalid module format

Can someone help me to explain why this is happening?

Thanks a million!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-18-2008, 05: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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-18-2008, 05:32 AM
Michael Heiming
 
Posts: n/a
Default Re: Rebuilding Fedora Core 2 kernel question!

In comp.os.linux.setup Dennis C <dchou4u@hotmail.com>:
> I am rebuilding the kernel on Fedora Core 2 on my PC.

[..]

> default=0
> timeout=10
> splashimage=(hd0,0)/grub/splash.xpm.gz
> title Fedora Core (2.6.5-1.358)
> root (hd0,0)
> kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
> initrd /initrd-2.6.5-1.358.img

^^^^^^^^^^^^^^^^^^^^^^
> 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

^^^^^^^^^^^^^^^^^^^^^^

> When I rebooted the box, when I selected to boot from my newly built
> image 'Dennis Fedora Core', it gave me errors like:


> jbd version magic '2.6.5-1.358 686 REGPARM 4KSTACKS gcc-3.3' should be
> '2.6.5-1.358custom 686 REGPARM 4KSTACKS gcc-3.3'
> insmod: error inserting '/lib/jbd.ko': -1 invalid module format


> Can someone help me to explain why this is happening?


As the error message says, you need to rebuild initrd, with your
new kernel modules. Try 'man mkinitrd' create a new, edit your
grub.conf and reboot.

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 87: Password is too complex to decrypt
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:16 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com