LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 03-18-2008, 10:06 AM   #1
the_shani
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Rep: Reputation: 0
kernel panic - mkrootdev: label /1 not found - when booting from newly compiled kerne


Hi All,

I have a Dell Precision 390 with a SATA HDD on which RHEL4 WS (kernel 2.6.9) has been installed. I built a new 2.6.9 kernel according to the instructions given here - http://voidmain.is-a-geek.net/redhat...nel_build.html , in short, I executed the following commands:

(I used the configuration of the working kernel)
make oldconfig
(made changes to include Intel SpeedStep drivers)
make menuconfig
make
make modules_install
make install

When I try to boot from this newly built kernel I get the below error messages:

mkrootdev: label /1 not found
mount: error 2 mounting ext3
mount error 2 mounting none
switchroot: mount failed: 22
umount /initrd/dev failed :2
kernel panic - not syncing: Attempted to kill init

I am still able to boot using the old kernel.

After googling I found that many people corrected this by setting "root=/dev/sdax" (x is number of the root partition, in my case it is 5) in grub.conf. I tried the same and only the mkrootdev error disappeared, the other errors remain (setting "root=/dev/sdax" shouldnt be required in my case since I am able to boot using the old kernel and the entry for the old kernel in grub.conf also uses "root=LABEL=/1").

contents of grub.conf:


default=1
timeout=5
splashimage=(hd0,2)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux WS (2.6.9-new)
root (hd0,2)
kernel /vmlinuz-2.6.9-new swiotlb=65536 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-new.img
title Red Hat Enterprise Linux WS (2.6.9-5.ELsmp)
root (hd0,2)
kernel /vmlinuz-2.6.9-5.ELsmp swiotlb=65536 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-5.ELsmp.img
title Red Hat Enterprise Linux WS-up (2.6.9-5.EL)
root (hd0,2)
kernel /vmlinuz-2.6.9-5.EL swiotlb=65536 ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-5.EL.img
title Other


Using e2label I found that the partitions are labeled correctly.

How do I solve this problem?

The error messages could probably be because the newly created initrd image does not include SATA drivers for the HDD. I am unable to find out how to build a new initrd image that includes the SATA drivers.

Any help will be greatly appreciated.

Thanks,
shani
 
Old 03-18-2008, 10:38 AM   #2
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
Where did you get the 2.6.9 kernel source from?? You do realize that Red hat typically backports thing like security and hardware support from the upstream kernel source?

If your going to build a new kernel from the vanilla kernel source then build from at least the 2.6.18 or newer series, mainly for SATA support an other hardware and secuity reason, best to build the latest released kernel source from kernel.org
 
Old 03-18-2008, 01:41 PM   #3
the_shani
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Lenard View Post
Where did you get the 2.6.9 kernel source from?? You do realize that Red hat typically backports thing like security and hardware support from the upstream kernel source?

If your going to build a new kernel from the vanilla kernel source then build from at least the 2.6.18 or newer series, mainly for SATA support an other hardware and secuity reason, best to build the latest released kernel source from kernel.org
Hi,

I got the source (src rpm) from one of the Redhat CDs that came along with the DELL machine.
And I would like to use the same kernel i.e. 2.6.9.

Thanks,
shani

Last edited by the_shani; 03-18-2008 at 01:42 PM. Reason: modified wording
 
Old 03-19-2008, 10:13 AM   #4
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
Try building a test kernel from the source without any changes;

make mrproper
make menuconfig
make
make modules_install
make install

If I remember correctly you may not need to edit the kernel's Makefile, but check and make sure beforehand.
 
Old 03-19-2008, 02:05 PM   #5
the_shani
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Lenard View Post
Try building a test kernel from the source without any changes;

make mrproper
make menuconfig
make
make modules_install
make install

If I remember correctly you may not need to edit the kernel's Makefile, but check and make sure beforehand.

Hi,

I still get the same errors. The only change I made before I executed the above commands was to modify the value of EXTRAVERSION in the makefile.

Thanks,
shani
 
Old 03-19-2008, 05:43 PM   #6
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, I have never had good luck building Red Hat supplied kernels myself, I have heard from a number of others with the same issue. One can build the kernel and everything looks good, but it will not boot correctly, usually with the same errors you see. As a suggestion change from using the partition labels in both the /boot/grub/grub.conf file (just your built kernel) and in the /etc/fstab file as an experiment.

I usually build from the vanilla kernel sources at kernel.org with very good success, even with using partition labels.
 
Old 03-21-2008, 02:14 PM   #7
the_shani
LQ Newbie
 
Registered: Feb 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Lenard View Post
Well, I have never had good luck building Red Hat supplied kernels myself, I have heard from a number of others with the same issue. One can build the kernel and everything looks good, but it will not boot correctly, usually with the same errors you see. As a suggestion change from using the partition labels in both the /boot/grub/grub.conf file (just your built kernel) and in the /etc/fstab file as an experiment.

I usually build from the vanilla kernel sources at kernel.org with very good success, even with using partition labels.

Hi,

I tried recompiling the kernel and booting using the recompiled kernel on a new DELL Precision running RHEL 5 (kernel 2.6.18-8). It worked and I will be using the same machine here onwards.

Many thanks for your help.

-shani
 
Old 05-21-2009, 06:27 AM   #8
jack007
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
hi,

I am new to linux.trying to boot new kernel 2.6.29.3
but have stuck with same error

mkrootdev lable=/1 not found
mount error: 6 mounting ext3

i already have tried all the solution discussed above.

ne help will be highly appriciated..

thanks
 
  


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
mkrootdev: label \1 not found ahmed2008 Linux - Kernel 3 03-05-2008 05:43 AM
kernel panic while booting custom compiled 2.6.24 kernel on RHEL 4 AS samkraju Red Hat 4 02-10-2008 12:55 AM
blackout when booting with newly compiled 2.6 anwar Slackware 2 04-01-2007 01:26 AM
kernel panic on reboot of newly compiled kernel lyceum Linux - Newbie 4 09-09-2003 09:40 AM
Compiled own kernel and got: Kernel panic: No init found. Try passing init= option to fbl Linux - General 12 01-14-2003 03:38 AM


All times are GMT -5. The time now is 02:06 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration