LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem in creating dual image of redhat9 linux kernel2.4.20-8 (https://www.linuxquestions.org/questions/linux-newbie-8/problem-in-creating-dual-image-of-redhat9-linux-kernel2-4-20-8-a-624957/)

jeel 03-01-2008 11:08 AM

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

xaos5 03-01-2008 11:17 AM

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)

Lenard 03-01-2008 11:28 AM

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

jeel 03-03-2008 09:04 AM

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

Lenard 03-03-2008 09:48 AM

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.


All times are GMT -5. The time now is 03:30 PM.