LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-01-2008, 12:08 PM   #1
jeel
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Rep: Reputation: 0
problem in creating dual image of redhat9 linux kernel2.4.20-8


hello ,
I'm making my project on redhat9 linux kernel2.4.20-8
I'm able to boot from it .theres no problem with that.My project involves making some changes in the kernel file(TCP files)and then recompiling the kernel to make the changes permanent and then analyze the performance of the new tcp code.

So before doing any changes i'm trying to create an image of the same kernel and try to find out if its working or not ...........because i need to have 2 images of kernel in my system --the original one and the changed one for the project.

When i try to compile the kernel following the required steps::

make mrproper
make xconfig
make dep
make clean
make bzImage
make modules
cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.20.-8
mkinitrd -v /boot/initrd-2.4.20-8.img 2.4.20-8

and then making changes in the grub by copying the first entry and pasting as second entry

title linux-2.4.20-8
root(hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=label=/
initrd /initrd-2.4.20-8.img

title linux
root(hd0,0)
kernel /vmlinuz-2.4.20 ro root=label=/
initrd /initrd-2.4.20.img


however when i'm creating a second image of the same kernel i change names of vmlinuz and initrd

but when i try to boot from the second option it gives me the following errors::

VFS:cannot open root device "Label=/" or 00:00
Please append a correct "root=" boot option
Kernel panic:VFS:Unable to mount root fs on 00:00


i dont have nay idea how to compile file ext2 or ext3 as i saw as a solution on other sites
 
Old 03-01-2008, 12:17 PM   #2
xaos5
Member
 
Registered: Dec 2004
Distribution: debian and slackware
Posts: 217

Rep: Reputation: 31
First solution: see if you can get /proc/kconfig.gz (I believe thats the name) and modify that config file and compile.

Second solution: make sure under file systems ext2 or ext3 ISN'T compiled as a module (i.e * instead of M)

Third solution: find out why your initrd isn't including your file system modules (I don't have much experience with initrd images)
 
Old 03-01-2008, 12:28 PM   #3
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Well you have a number of problems, the first is why??? RHL9 is long in the dead pool (no support by anyone).

The second is you forgot to rename the new modifed kernel to something other then 2.4.20.-8, check the make file and add something to the EXTRAVERSION line to make this a different kernel by name.

Next is you forgot a step and after make mrproper, namely make oldconfig this will give you a good configuration file to begin with. Make sure you do make your changes with the make xconfig option.

Lastly it is far better (and easier) to just the proper steps in the proper order;

make mrproper
make oldconfig
make menuconfig (or xconfig or gconfig)
make
make modules_install
make install
 
Old 03-03-2008, 10:04 AM   #4
jeel
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Original Poster
Rep: Reputation: 0
thanks but thers still some problem

Thanks for ur reply i had earlier tried with fedora kernel2.6 i dont remember the exact number i couldnt find the tcp code which i need to modify for my project.....if u know d path cud u plz let me know

And the problem is we want to make changes in system file and then compile the kernel to make the changes permament so they are reflected when i execute those files .............is this d right way to make changes in the system file or there are some specific commands to make changes.

And when I compile my present kernel with the changes and compile it but boot from the original kernel the changes are reflected in it also which i dont want...
 
Old 03-03-2008, 10:48 AM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
OK, please note

You cannot have two kernels with the exact same version numbering, one has to be different. For example;

kernel-2.4.20-8
kernel-2.4.20-8custom

The kernel source for RHL9 is preset to be 2.6.20-8 so your changes to the /boot/grub/grub file are not right. Please do the proper make modules_install and make install steps;

http://www.centos.org/docs/3/html/rh...om-kernel.html

Yes I know this is for RHEL3 but it does apply for RHl9 also. You should also review 'The Linux kernel in a nutshell';

http://www.kernel.org/pub/linux/kern...a_nutshell.pdf

As far as you making changes to the TCP code/configuration, you have provided zero information about this so nobody can offer any assistance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with creating floppy image for Linux install on legacy machines. archeryguru2000 Linux - Newbie 3 09-30-2007 05:21 PM
LXer: Creating a dd/dcfldd Image Using Automated Image & Restore (AIR) LXer Syndicated Linux News 0 03-07-2007 06:16 PM
Error while creating image of linux server by GHOST for linux sw manish_meet_in Linux - Software 3 05-08-2006 10:39 AM
creating a dual boot for ubuntu linux nathj72 Linux - Software 3 01-17-2005 12:42 PM
image creating apps for linux schatoor Linux - General 3 03-14-2003 08:35 AM


All times are GMT -5. The time now is 08:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration