kernel compilation problem

Taking care of your Linux box.

kernel compilation problem

Postby zaeemarshad » Mon Sep 08, 2003 5:54 am

i have tried almost for the 20th time to recompile my linux kernel on both rhl8.0/9.0 but it fails giving the error message
vfs panic
could not mount root device. give correct root=boot labelblah blah

i have followed the procedure given in redhat's sysadminguide and also tried the sequence in a previous post regarding kernel compilation with teh addition that i made the ramdisk. plz guide me or at least someone plz outline the process u follow. my method(standard it is) at least upto 7.3 worked. any help. i am pulling my hears right now :cry:

in need of desparate help
zaeem
zaeemarshad
Lieutenant Colonel
 
Posts: 660
Joined: Sat Jul 06, 2002 12:35 pm
Website: http://zaeem.no-ip.org
WLM: zarshadvirk@hotmail.com
Yahoo Messenger: negativecreep61@yahoo.com
AOL: zarshadvirk
Location: Islamabad

Postby cwackked » Mon Sep 08, 2003 9:12 am

hmm..whats your hard disk setting?
master,slave or cable select?
-umer
cwackked
Lance Naik
 
Posts: 33
Joined: Sat Aug 30, 2003 7:23 am
Website: http://desimart.net
WLM: cwackked@hotmail.com

Postby cwackked » Mon Sep 08, 2003 9:14 am

one more thing...
did you edit the bootloader after making the kernel and modules?
-umer
cwackked
Lance Naik
 
Posts: 33
Joined: Sat Aug 30, 2003 7:23 am
Website: http://desimart.net
WLM: cwackked@hotmail.com

Postby Faraz.Fazil » Mon Sep 08, 2003 5:50 pm

Bingo.
Help is here!!!!

I encountered an exactly same problem after i recompiled my kernel on redhat 9 (which previously had 2.4.20.8) and i solved it successfully.

The problem is caused by a portion that says ro root=LABEL=/ in grub.conf

That string is compatible with the default 2.4.20.8 kernel but is not compatible with the recompiled kernel >2.4.20.8
All u need to do is to remove the ro root=LABEL=/ portion,

By default grub.conf looks something like this:

title Red Hat Linux (2.4.22)
root (hd0,6)
kernel /boot/vmlinuz-2.4.22 ro root=LABEL=/
initrd /boot/initrd-2.4.22-ext2.img

Remove the ro root=LABEL=/ line in grub.conf by editing it with any editor like vim,emacs or joe , so that it looks something like:

title Red Hat Linux (2.4.22)
root (hd0,6)
kernel /boot/vmlinuz-2.4.22
initrd /boot/initrd-2.4.22-ext2.img

Note: Your root and initrd image name and kernel image names can be different so make sure u specify it correctly.BY default, if u did a make install during the kernel recompile, it would have entered the paramaters correctly itself and u would just have to remove the ro root=LABEL=/ part.

I have personally encountered and solved this error, so u can be sure if u follow the steps correctly, ur kernel will run without any problem.

I assume u also did a make install during the kernel install.If u did, then this much is enough.Otherwise u would have to issue a mkinitrd command to make a initrd image which is something like

mkinitrd imagename.img kernelversion

e.g

mkinitrd /boot/faraz.img 2.4.22

Issue that command in terminal and use that initrd image in grub.

Also if u cannot even boot into linux, then even u can solve the problem.In that case, on the main grub screen higlight the linux entry and press e to edit.HIghlight the kernel line and press e to edit.Remove the ro root=LABEL=/ part and press B to boot.Voila it will boot and work!!
Then once linux is started, edit the grub.conf file as explained before to make the change permanent.

I hope its clear enough!!
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe

Postby zaeemarshad » Tue Sep 09, 2003 11:17 pm

many thanks faraz. you brought the right solution. though i would urge others who love to post answers to thoroughly read the problem and then try to answer. it doesnt help except clutter the page and more bits for my slow dialup to download i.e. previous bandwidth wasted. anyways thanks a lot sir. hats off to ya

regards
zaeem 8)
zaeemarshad
Lieutenant Colonel
 
Posts: 660
Joined: Sat Jul 06, 2002 12:35 pm
Website: http://zaeem.no-ip.org
WLM: zarshadvirk@hotmail.com
Yahoo Messenger: negativecreep61@yahoo.com
AOL: zarshadvirk
Location: Islamabad

kernel compilation problem

Postby mahin » Wed Sep 10, 2003 10:30 am

zaeemarshad wrote:many thanks faraz. you brought the right solution. though i would urge others who love to post answers to thoroughly read the problem and then try to answer.<snip>


Agree! :) Faraz is a professinal with lots of experience and you can see the difference that make :)
mahin
Major
 
Posts: 605
Joined: Wed Aug 07, 2002 8:00 pm
Website: http://www.linuxpakistan.net/wiki/index.php/LinuxPakistanKarachi
Location: Karachi

Postby Faraz.Fazil » Wed Sep 10, 2003 11:37 am

You Welcome.
Thanx for the appreciation guyz.
Its a pleasure to be of help to others.

OpenSource ruleZ!
Faraz.Fazil
Major General
 
Posts: 1024
Joined: Thu Jul 04, 2002 5:31 pm
WLM: faraz7476@hotmail.com
Location: Karachi/Pakistan/Earth/Universe


Return to “%s” Administration

Who is online

Users browsing this forum: No registered users and 2 guests

cron