LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-11-2009, 06:46 PM   #1
jemenake
LQ Newbie
 
Registered: Oct 2003
Posts: 15

Rep: Reputation: 0
mount: could not find filesystem '/dev/root'


Here's the backstory: I've got a 1And1 server which was pre-installed with Fedora Core 6, and it's running kernel 2.6.16. We've been experiencing random server hangs (doesn't ssh, doesn't ping, serial console is unresponsive). So, I want to try a new kernel, but only once have I ever been able to build a new kernel for it and have it work (and I don't remember what I did on the one that kinda worked).

The problem I usually run into is the kernel will boot, detect the NVidia SATA controller fine, detect the MD mirrored drives fine, and then I'll get a "mount: could not find filesystem '/dev/root'" and then the kernel panics and restarts the machine.

I have copy/pasted the output from a successful 2.6.16 boot and from the unsuccessful 2.6.31 boot and I've begun comparing them, line-by-line. Except for slight changes in the working of some of the status/debugging messages, the detection of the MD devices is identical. It finds /dev/md1, /dev/md5, /dev/md6, and /dev/md7, so I don't think it's an issue of the kernel not seeing the SATA controller.

The root filesystem is on /dev/md1, and it's ext3. The MD, ext2, and ext3 drivers are compiled into the kernel (not as modules), so even a problem with the initrd shouldn't be a deal-killer at this point.

From the unsuccessful boot:
Code:
...
[    4.883569] md: considering sdb1 ...
[    4.890724] md:  adding sdb1 ...
[    4.897189] md:  adding sda1 ...
[    4.903674] md: created md1
[    4.909268] md: bind<sda1>
[    4.914791] md: bind<sdb1>
[    4.920230] md: running: <sdb1><sda1>
[    4.992837] raid1: raid set md1 active with 2 out of 2 mirrors
[    5.004583] md1: detected capacity change from 0 to 1011548160
[    5.016306] md: ... autorun DONE.
Trying to resume from /dev/sda2
Unable to access resume device (/dev/sda2)
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Meanwhile, the successful-booting 2.6.16 kernel finds the ext3 filesystem just fine:

Code:
...
md: considering sdb1 ...
md:  adding sdb1 ...
md:  adding sda1 ...
md: created md1
md: bind<sda1>
md: bind<sdb1>
md: running: <sdb1><sda1>
raid1: raid set md1 active with 2 out of 2 mirrors
md: ... autorun DONE.
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 256k freed
INIT: version 2.86 booting
                Welcome to Fedora Core
And, just for kicks, /etc/fstab looks like:

Code:
/dev/md1        /               ext3    defaults        1 1
/dev/sda2       none            swap    sw              
/dev/sdb2       none            swap    sw              
/dev/md5    /usr        xfs     defaults        0 2
/dev/md7        /var    xfs     defaults,usrquota       0       2
/dev/md6        /home           xfs     defaults,usrquota       0 2
devpts          /dev/pts        devpts  gid=5,mode=620  0 0
none            /proc           proc    defaults        0 0
none            /tmp    tmpfs   defaults        0 0
Anybody have any clue what I'm missing here?
 
Old 11-11-2009, 08:50 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,286

Rep: Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165
If you're doing your own kernel, have you tried running without the initrd ?. What does your boot stanza look like ?.
 
Old 11-11-2009, 10:02 PM   #3
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
I am thinking your new kernel is missing either the raid stuff or you don't have ext3 file system compiled into the kernel. If you don't want it compiled in then you going to have to include it in your initrd image. Personally I see no point in using initrd images.
 
Old 11-12-2009, 04:33 AM   #4
jemenake
LQ Newbie
 
Registered: Oct 2003
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by exvor View Post
I am thinking your new kernel is missing either the raid stuff or you don't have ext3 file system compiled into the kernel. If you don't want it compiled in then you going to have to include it in your initrd image. Personally I see no point in using initrd images.
Oddly, I have deliberately set the config to have all RAID and ext2/3 compiled in yet, without initrd, I get a different set of errors. Now, I don't get any of the "considering", "adding", "created", "bind" messages from the MD modules, even though the kernel reports registering them.

Code:
...
[    1.918017] md: linear personality registered for level -1
[    1.928980] md: raid0 personality registered for level 0
[    1.939590] md: raid1 personality registered for level 1
[    1.950199] md: raid10 personality registered for level 10
[    1.961154] md: raid6 personality registered for level 6
[    1.971762] md: raid5 personality registered for level 5
[    1.982372] md: raid4 personality registered for level 4
[    1.997431] cpuidle: using governor ladder
[    2.005614] cpuidle: using governor menu
[    2.013467] No iBFT detected.
[    2.019791] TCP cubic registered
[    2.026285] NET: Registered protocol family 10
[    2.035692] lo: Disabled Privacy Extensions
[    2.044421] Mobile IPv6
[    2.049316] NET: Registered protocol family 17
[    2.058292] registered taskstats version 1
[    2.066652] rtc_cmos 00:03: setting system clock to 2009-11-12 09:16:21 UTC (1258017381)
[    2.082887] md: Waiting for all devices to be available before autodetect
[    2.096440] md: If you don't use raid, use raid=noautodetect
[    2.107865] md: Autodetecting RAID arrays.
[    2.116052] md: Scanned 0 and added 0 devices.
[    2.124929] md: autorun ...
[    2.130514] md: ... autorun DONE.
[    2.137323] EXT3-fs: unable to read superblock
[    2.146259] EXT2-fs: unable to read superblock
[    2.155144] List of all partitions:
[    2.162116] No filesystem could mount root, tried:  ext3 ext2
[    2.173686] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(9,1)
I'm just getting more and more confused....
 
Old 11-12-2009, 01:26 PM   #5
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Quote:
[ 2.107865] md: Autodetecting RAID arrays.
[ 2.116052] md: Scanned 0 and added 0 devices.
This is odd. It is loading all of the raid stuff but it seams its not reassembling your raid array. If these were usb drives or something I would say its because the devices are not getting time to load up before the raid detection starts, but I don't think this is your issue.
Did you use raidtools or mdadm to setup your raid?
 
Old 11-12-2009, 01:34 PM   #6
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
Your initrd is new as well, I presume? Or do you only have one version? I'm pretty sure you have to make a new initrd for each kernel.
 
Old 11-12-2009, 02:26 PM   #7
jemenake
LQ Newbie
 
Registered: Oct 2003
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mostlyharmless View Post
Your initrd is new as well, I presume? Or do you only have one version? I'm pretty sure you have to make a new initrd for each kernel.
As per the suggestions of the first replies, I took the initrd out of the boot stanza altogether. That's why I said that it's odd that, even though I've indicated that the raid and ext2/3 drivers should be compiled into the kernel, the ability of the kernel to recognize the raid partitions changes if I remove the initrd from the boot stanza.
 
Old 11-12-2009, 02:33 PM   #8
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,859
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
Yes, well, I read that. But your initrd might be doing more than loading drivers, are you successful with the old kernel and without the initrd?
 
Old 11-12-2009, 02:34 PM   #9
jemenake
LQ Newbie
 
Registered: Oct 2003
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by exvor View Post
This is odd. It is loading all of the raid stuff but it seams its not reassembling your raid array. If these were usb drives or something I would say its because the devices are not getting time to load up before the raid detection starts, but I don't think this is your issue.
Did you use raidtools or mdadm to setup your raid?
They came pre-made from 1And1. When you sign up for a root-server, they just give you one configured like this. I think it's two 160GB SATA's with something like 4 partitions on each, paired to make 4 MD's. So, /dev/sda1 and /dev/sdb1 make up /dev/md1... etc.

What I find *also* strange is that, even when the MD driver failed to set up the md devices, shouldn't the kernel be able to see the *individual* partitions? For example, shouldn't I be able to rip out the whole /dev/sdb drive and have the kernel still be able to use /dev/sda1 instead of /dev/md1? (Maybe it will, and I just need to change the "root=" part of the boot stanza to be root=/dev/sda1 instead of root=/devb/md1).
 
Old 11-12-2009, 02:41 PM   #10
jemenake
LQ Newbie
 
Registered: Oct 2003
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mostlyharmless View Post
Yes, well, I read that. But your initrd might be doing more than loading drivers, are you successful with the old kernel and without the initrd?
Old kernel doesn't use initrd.
 
Old 11-12-2009, 05:42 PM   #11
jemenake
LQ Newbie
 
Registered: Oct 2003
Posts: 15

Original Poster
Rep: Reputation: 0
Here's a related question:

Is there a reliable way to "upgrade" or "update" a .config file from a previous kernel version? I *have* the config file that was used for the working 2.6.16 kernel. However, in the past, I've tried just using a previous .config in a newer kernel and the build would fail. I discovered that, at the least, I'd have to run either "make config" or "make menuconfig" to get any new/changed .config directives into the file... but I still recall having trouble even then.

At present, I'm on the verge of just diff'ing the old config with the current one to make a to-do list of stuff I need to change with menuconfig. Hopefully, there's a slicker way these days.
 
Old 11-13-2009, 11:39 PM   #12
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
@ jemenake I thought it was make oldconfig or something like that to merge the old one into the new one.
 
Old 02-04-2011, 01:24 PM   #13
goossen
Member
 
Registered: May 2006
Location: Bayern, Germany
Distribution: Many
Posts: 224

Rep: Reputation: 41
I know this is old but I took me a lot of research and headache to find the solution:

Enable CONFIG_SYSFS_DEPRECATED_V2 in the kernel source configuration.
If you run “make menuconfig”, browse to:
General Setup —> and enable (Y) the following:
Code:
enable deprecated sysfs features to support old userspace too (...)
and
Code:
enabled deprecated sysfs features by default
—OR—

Edit your .config file with a text editor and add/modify entry:
Code:
CONFIG_SYSFS_DEPRECATED_V2=y
Mods: I'm replying this thread so other people searching in Google (like me) will find it.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC6: "mount: could not find filesystem '/dev/root'" sancho Fedora - Installation 17 09-02-2016 01:42 AM
mount :could not find file system '/dev/root' AjayCelst Linux - Embedded & Single-board computer 2 07-13-2009 01:34 AM
FC6: "mount: could not find filesystem '/dev/root'" cheerful Fedora - Installation 2 07-27-2007 04:36 PM
could not find filesystem /dev/root gazsi Linux - General 1 07-12-2006 08:31 PM
FC5t3 error: mount: could not find filesystem '/dev/root' pathall Fedora 1 03-10-2006 11:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:53 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration