Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
kernel panic: VFS: cannot mount root filesystem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Qweasda
Apprentice
Apprentice


Joined: 04 Feb 2003
Posts: 152

PostPosted: Sat Mar 01, 2003 4:12 am    Post subject: kernel panic: VFS: cannot mount root filesystem Reply with quote

When I compile a new kernel and try to boot to it I always get this error. But, I have recompiled my kernel many different times before w/o ever getting this, though now I do every time. (tried 17 times)

I tried gentoo-sourced 2.4.19 and 2.4.20.

I really really need this updated kernel, please help as I have been battling it for 3 days.

Thanks,
Back to top
View user's profile Send private message
BillyD
Guru
Guru


Joined: 05 May 2002
Posts: 323
Location: Australia

PostPosted: Sat Mar 01, 2003 6:17 am    Post subject: Reply with quote

This is oftern caused by not having the correct filesystem options compiled into your kernel. 17 times is ALOT - maybe you should leave it alone for a day, take a few deep breaths then get back to it a bit later - it might just be some simple option that you are missing that is not allowing the kernel to boot properly.
_________________
We used to have hominid cousins that were vegetarian. The palæontological record suggests that our ancestors killed them and ate them.
Back to top
View user's profile Send private message
Qweasda
Apprentice
Apprentice


Joined: 04 Feb 2003
Posts: 152

PostPosted: Sat Mar 01, 2003 6:32 am    Post subject: Reply with quote

Well, I guessed that since it couldn't mount it but I looked throughout the whole config a few times and through the file systems section many times, all loks good. I use ReiserFS for my root and boot partition. (yes support is compiled in my kernel)

I think the only thing I changed in this kernel was support for a DHCP server: packet socket and packet filtering.
I might have changed one or two other things, I'm not too clear. But if I did it wasn't something I was un-sure of or that was risky, i doubt.
Back to top
View user's profile Send private message
morrian
n00b
n00b


Joined: 19 Jan 2003
Posts: 21

PostPosted: Sat Mar 01, 2003 7:22 am    Post subject: Reply with quote

What else does it say about not being able to mount the root partition? Specifically, does it have some numbers in parentheses, like (08:03) or something? That will tell you what partition it is trying to mount; maybe that is misconfigured somehow?

If you're using grub, make sure the right root partition is in /boot/grub/grub.conf. Same thing goes for lilo (except I think the conf file is /etc/lilo.conf).

If you get really desperate, check out the man page for rdev (although I doubt this is causing problems).


Last edited by morrian on Tue Mar 04, 2003 6:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
Qweasda
Apprentice
Apprentice


Joined: 04 Feb 2003
Posts: 152

PostPosted: Sat Mar 01, 2003 5:19 pm    Post subject: Reply with quote

Alright here's the full error:

Code:
VFS: Cannot open root device "" or 03:41
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 03:41


Now, I have the correct GRUB setting, same as my old kernel (the old working one is now bzImage.old and the new one is bzImage)
And, if it was the wrong root partition GRUB wouldn't boot the kernel at all would it? Or am I wrong?
To get an idea of how far it gets before I get this error, it's about 3-5 seconds after GRUB is loaded. It loads all the stuff like agppart, TCP, NET4, ttys00, etc etc etc.

Thanks for any help.
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Sat Mar 01, 2003 7:38 pm    Post subject: Reply with quote

Qweasda wrote:
I use ReiserFS for my root and boot partition. (yes support is compiled in my kernel)

Install Doc wrote:
Important: If your boot partition (the one holding the kernel) is ReiserFS, be sure to mount it with the -o notail option so GRUB gets properly installed. Make sure that notail ends up in your new /etc/fstab boot partition entry, too. We will get to that in a bit.

Did you do this?
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
Qweasda
Apprentice
Apprentice


Joined: 04 Feb 2003
Posts: 152

PostPosted: Sat Mar 01, 2003 8:00 pm    Post subject: Reply with quote

Well I have that in my /etc/fstab. Where/how else would I put that? I tried adding it to the end of the kernel command, and the end of the boot command, no luck.

But, I completely forgot the biggest thing to the whole problem. A week or so ago I removed my mastered hardrive (/dev/hda) and put it in an older box.
I didn't even think about mentioning that. I just now edited my /etc/fstab to change it all from /dev/hdbx to /dev/hdax since that is what it is now. I still get that error.

I just don't understand why my old kernel that was compiled before I removed the HD works, but anything after doesn't. It seems it would be just the opposite.

I'm going crazy with this. Been messing with it for the past 3 hours straight almost.
I am almost tempted to reinstall Gentoo completely just to get this new kernel, but that would ruin hours of emerges and configureations.

ahhhh :(
Back to top
View user's profile Send private message
Qweasda
Apprentice
Apprentice


Joined: 04 Feb 2003
Posts: 152

PostPosted: Sat Mar 01, 2003 9:01 pm    Post subject: Reply with quote

With the new /etc/fstab 9changing from hdb to hda) I get Unable to mount root fs on 03:01 now, not the same as I previously mentioned, sorry.
Back to top
View user's profile Send private message
noff
Guru
Guru


Joined: 11 Nov 2002
Posts: 388
Location: College Park, Maryland

PostPosted: Sat Mar 01, 2003 9:28 pm    Post subject: Reply with quote

Slave on the Primary IDE is hdb. Grub works in order or boot drives. I have a /hda and /hde but in grub I have (hd0) and (hd1). So you may have a /hdb but grub may now be looking for (hd0)
_________________
What Larry was saying is that if you make it too easy for programmers, then poor programmers will be able to do things best left to good programmers, and will inevitably do them poorly. Everyone will suffer in the long term as a result." - Tom Chance
Back to top
View user's profile Send private message
morrian
n00b
n00b


Joined: 19 Jan 2003
Posts: 21

PostPosted: Tue Mar 04, 2003 7:02 pm    Post subject: Reply with quote

Yes, make sure that you really have the "old" drive jumpered as the master. 03:01 is referring to /dev/hda1, so make sure that this is really what you want to mount:

merry app-editors # ls -l /dev/hda*
lr-xr-xr-x 1 root root 32 Mar 1 20:40 /dev/hda -> ide/host0/bus0/target0/lun0/disc
lr-xr-xr-x 1 root root 33 Mar 1 20:40 /dev/hda1 -> ide/host0/bus0/target0/lun0/part1
lr-xr-xr-x 1 root root 33 Mar 1 20:40 /dev/hda2 -> ide/host0/bus0/target0/lun0/part2
lr-xr-xr-x 1 root root 33 Mar 1 20:40 /dev/hda3 -> ide/host0/bus0/target0/lun0/part3
merry app-editors # ls -l /dev/ide/host0/bus0/target0/lun0/
total 0
brw------- 1 root root 3, 0 Dec 31 1969 disc
brw------- 1 root root 3, 1 Dec 31 1969 part1
brw------- 1 root root 3, 2 Dec 31 1969 part2
brw------- 1 root root 3, 3 Dec 31 1969 part3

See how the device major and minor numbers are listed as 3, 0; 3, 1; etc.? This is what the 03:01 is.

Grub is configured fine to find your kernel; otherwise the kernel wouldn't even load. The only other thing to try is adding a "root=/dev/hda3" (or whatever your root partition is) to the kernel line in grub.

And, once again, make totally sure you have the right /dev/hd?? along with the right jumper settings. Remember that hda=primary master, hdb=primary slave, hdc=secondary master, hdd=secondary slave. Also remember that "1" may not necessarily be your root partition. I belive the gentoo install doc actually has "3" being the root.

The kernel should tell you as it boots (before it tries to mount the root) what drives it sees. Mine says:

hda: ST36421A, ATA DISK drive
hda: 12596850 sectors (6450 MB) w/256KiB Cache, CHS=784/255/63, UDMA(33)

(Yeah, yeah, I know. "What kind of old, small hard drive is that?" :) )

Anyway, I hope some of this information helps.
Back to top
View user's profile Send private message
morrian
n00b
n00b


Joined: 19 Jan 2003
Posts: 21

PostPosted: Tue Mar 04, 2003 7:12 pm    Post subject: Reply with quote

Ok, one more thing to make sure of (although a "root=..." line should override this). Try booting from your gentoo CD or some other linux bootable CD, mount your root and your boot partition (if it is separate) and chroot into your root partition

Now try:
rdev /boot/bzImage

What does that return? It should point to your root partition, but if the kernel was compiled and then the drives were changed, it may not, which may be causing the problem.

If it is wrong, you can use rdev to change the root partition the kernel "knows" about. Check the rdev man page for details.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum