LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   kernel panic - mkrootdev: label /1 not found - when booting from newly compiled kerne (http://www.linuxquestions.org/questions/red-hat-31/kernel-panic-mkrootdev-label-1-not-found-when-booting-from-newly-compiled-kerne-628936/)

the_shani 03-18-2008 10:06 AM

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

Lenard 03-18-2008 10:38 AM

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

the_shani 03-18-2008 01:41 PM

Quote:

Originally Posted by Lenard (Post 3092718)
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

Lenard 03-19-2008 10:13 AM

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.

the_shani 03-19-2008 02:05 PM

Quote:

Originally Posted by Lenard (Post 3093876)
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

Lenard 03-19-2008 05:43 PM

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.

the_shani 03-21-2008 02:14 PM

Quote:

Originally Posted by Lenard (Post 3094308)
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

jack007 05-21-2009 06:27 AM

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


All times are GMT -5. The time now is 01:15 PM.