LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   mkrootdev: label \1 not found (https://www.linuxquestions.org/questions/linux-kernel-70/mkrootdev-label-%5C1-not-found-625678/)

ahmed2008 03-04-2008 01:52 PM

mkrootdev: label \1 not found
 
Hello,

I have a Redhat 4 distro, running 2.6.9. I downloaded 2.6.10, build the image, created an initrd image, and updated the grub.conf file.

The entries my grub.conf looks as follows:

default=1
timeout=5
splashimage=(hd0,2)/boot/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS 4 Update 5 (2.6.9-55.ELsmp)
root (hd0,2)
kernel /boot/vmlinuz-2.6.9-55.ELsmp ro root=LABEL=/1 console=ttyS0,9660 rhgb quiet
initrd /boot/initrd-2.6.9-55.ELsmp.img
title Linux 2.6.10
root (hd0,2)
kernel /boot/vmlinuz-2.6.10 ro root=LABEL=/1 console=ttyS0,9660 rhgb quiet
initrd /boot/initrd-2.6.10.img

When I boot into 2.6.10, I get the error "mkrootdev: label \1 not found" right at the beginging, followed by a kernel panic. Screen output as follows:

Red Hat nash version 4.2.1.10 starting
^[[C^[[Dmkrootdev: labelKernel panic - not syncing: Attempted to kill init!
/1 not found


I checked with "e2label", my partition has the right label. What could be the issue. Is the right driver not getting included in the initrd image? Any help is very appreciated.

Thank you,
A.

Lenard 03-04-2008 02:33 PM

So you built a kernel which is actually older then the suppled Red Hat 2.6.9-55.ELsmp kernel, but you forgot something in the process.


make mrproper
make oldconfig
make menuconfig (if you want to tweak/customize the kernel any)
make
make modules_install
make install

The steps listed above should produce a working kernel, and you should not have to edit the grub.conf file or any other of the steps you listed above.

Please see;
http://www.redhat.com/security/updat...g/?sc_cid=3093

And get yourself this for future reference since it does seem your relying on old information; http://www.kernel.org/pub/linux/kern...a_nutshell.pdf

.

ahmed2008 03-04-2008 03:48 PM

Lenard:

I was running 2.6.9, moving to 2.6.10, to a newer kernel version. Not sure how you deduced I was running an older version.

My reason for posting my original message is to figure out why I am getting the error message / kernel panic in the first place since I should not be. I would like to understand the cause of the failure.

Anyone who is more familiar with Linux boot process could shed some light, would highly appreciate it.

Also, I tried googling for info on "mkrootdev". Any pointers would be appreciated.

-A.

Lenard 03-05-2008 05:43 AM

OK, first going by version numbers alone does not work when dealing with Red Hat, please review the Red Hat link about backporting it is extremly important that you understand this. The 2.6.10 kernel from kernel.org was released on 24-Dec-2004, the 2.6.9-55.ELsmp kernel for RHEL4 update 5 was released on 05-May-2007 so which is newer???

Second the cause of the error and failure is you forgot something (like the make oldconfig step) or you did not take the time create an working kernel configuration, taking or using the defaults from the kernel source will not build a working kernel on a Red Hat based system. As a suggestion have a look at your .config file used to build the kernel and compare it to the /boot/config-2.6.9-55 file.

The steps I provided in my earlier reply actually do work, I have been doing this for years now;
Code:

$ uname -a
Linux Aspire5100 2.6.24.3 #1 Wed Feb 27 10:11:58 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda3
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.24.3)
        root (hd0,0)
        kernel /vmlinuz-2.6.24.3 ro root=LABEL=/ vga=790 notsc quiet iommu=off
        initrd /initrd-2.6.24.3.img
title CentOS (2.6.18-53.1.13.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-53.1.13.el5 ro root=LABEL=/ vga=790 notsc quiet iommu=off
        initrd /initrd-2.6.18-53.1.13.el5.img
title CentOS (2.6.21.6)
        root (hd0,0)
        kernel /vmlinuz-2.6.21.6 ro root=LABEL=/ vga=790 quiet iommu=off
        initrd /initrd-2.6.21.6.img



All times are GMT -5. The time now is 06:14 PM.