LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   CentOS "mount: could not find filesystem '/dev/root'" (http://www.linuxquestions.org/questions/linux-kernel-70/centos-mount-could-not-find-filesystem-dev-root-927462/)

newDevlp 02-03-2012 02:51 PM

CentOS "mount: could not find filesystem '/dev/root'"
 
Hi all,

I am configuring a 3.2.2+ kernel from 2.6.18.

Error I encountered while booting the 3.2.2 kernel is

Quote:

mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!


My grub.conf is

Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grua 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/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
#splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title CentOS (3.2.2+)
        root (hd0,0)
        kernel /vmlinuz-3.2.2+ ro root=/dev/VolGroup00/LogVol00
        initrd /initrd-3.2.2+.img
title CentOS (2.6.18-274.17.1.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-274.17.1.el5 ro root=/dev/VolGroup00/LogVol00
        initrd /initrd-2.6.18-274.17.1.el5.img
title CentOS (2.6.18-274.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-274.el5 ro root=/dev/VolGroup00/LogVol00
        initrd /initrd-2.6.18-274.el5.img

Please try to help me.
I'm not sure what might be the problem other than this.

T3RM1NVT0R 02-03-2012 03:02 PM

@ Reply
 
Hi newDevlp,

Welcome to LQ!!!

Questions for you:

1. Which version of CentOS you are running on?
2. Are you able to boot into other kernels installed without any issues?
3. How did you install this new kernel?
4. Did you create ramfs image for your new kernel?
5. If you are able to boot into other kernels then paste the output of the following command:

Code:

ls -l /boot

newDevlp 02-03-2012 03:13 PM

Hi,


Version :
CentOS release 5.7 (Final)


Yeah I'm able to boot into other kernels.

The output of the command ls -l /boot

Quote:

# ls -l /boot/
total 25233
-rw-r--r-- 1 root root 70194 Jan 10 17:55 config-2.6.18-274.17.1.el5
-rw-r--r-- 1 root root 70189 Jul 22 2011 config-2.6.18-274.el5
drwxr-xr-x 2 root root 1024 Feb 3 15:53 grub
-rw------- 1 root root 3461257 Jan 20 07:23 initrd-2.6.18-274.17.1.el5.img
-rw------- 1 root root 3457236 Jan 20 06:03 initrd-2.6.18-274.el5.img
-rw------- 1 root root 3122478 Feb 3 15:00 initrd-3.2.2+.img
drwx------ 2 root root 12288 Jan 20 05:54 lost+found
-rw-r--r-- 1 root root 80032 Mar 12 2009 message
-rw-r--r-- 1 root root 114799 Jan 10 17:56 symvers-2.6.18-274.17.1.el5.gz
-rw-r--r-- 1 root root 114697 Jul 22 2011 symvers-2.6.18-274.el5.gz
lrwxrwxrwx 1 root root 23 Feb 3 15:00 System.map -> /boot/System.map-3.2.2+
-rw-r--r-- 1 root root 985586 Jan 10 17:55 System.map-2.6.18-274.17.1.el5
-rw-r--r-- 1 root root 984430 Jul 22 2011 System.map-2.6.18-274.el5
-rw-r--r-- 1 root root 1560025 Feb 3 15:00 System.map-3.2.2+
-rw-r--r-- 1 root root 1558710 Feb 2 06:32 System.map-3.2.2+.old
lrwxrwxrwx 1 root root 20 Feb 3 15:00 vmlinuz -> /boot/vmlinuz-3.2.2+
-rw-r--r-- 1 root root 1896340 Jan 10 17:55 vmlinuz-2.6.18-274.17.1.el5
-rw-r--r-- 1 root root 1894036 Jul 22 2011 vmlinuz-2.6.18-274.el5
-rw-r--r-- 1 root root 3161200 Feb 3 15:00 vmlinuz-3.2.2+
-rw-r--r-- 1 root root 3156368 Feb 2 06:32 vmlinuz-3.2.2+.old



I want to install the new kernel because I want to understand how to configure a kernel.


About ramfs

I have chosen
-*- Kernel->user space relay support (formerly relayfs) │ │
│ │[*] Initial RAM filesystem and RAM disk (initramfs/initrd) suppor│ │
│ │ () Initramfs source file(s) │ │
│ │[*] Optimize for size

and

-*- /proc file system support │ │
│ │[*] /proc/kcore support │ │
│ │[*] /proc/vmcore support │ │
│ │ -*- Tmpfs virtual memory file system support (former shm fs) │ │
│ │[*] Tmpfs POSIX Access Control Lists │ │
│ │ -*- Tmpfs extended attributes │ │
│ │[*] HugeTLB file system support │ │
│ │ <M> Userspace-driven configuration filesystem

I don't have any idea about ramfs..


Thanks

aslan.Z 02-04-2012 04:51 AM

post your device drivers option or your .config


All times are GMT -5. The time now is 04:31 AM.