LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-22-2003, 04:18 AM   #1
cellist
Member
 
Registered: Oct 2003
Location: Cincinnati, OH
Distribution: Ubuntu 12.04
Posts: 145

Rep: Reputation: 16
Kernel panic on rebuild; can't mount fs 303


Ok. I've spent a week researching this one both on this site and on Google, and nothing I've tried has worked. I'm trying to compile kernel version 2.6.0test9 (yes, I'm aware it's only a test version), to see if the ALSA drivers there would be more compatible with my sound card (a Crystal 4232 on my Thinkpad 600). Following the install instructions included with the source, I first did make menuconfig, saved, then "make", then "make modules" (I tried to say "make install_modules" as per the instructions on the kernel package, but got a missing target error message, so I tried the regular sequence from this point), then "make modules_install", then "make install" which builds bzImage and then tries to run Lilo. From here I copy bzImage to /boot, followed by the new System.map file, but I'm not sure if I did this part correctly. From here I added a new header in LILO that says,

image = bzImage
root = /dev/hda3 (which is where my root partition is in my working Kernel entry)
label = Linux-2.6.0
read-only

I run Lilo without a hitch, I reboot, and I get the famous kernel panic. I've seen this discussed lots of places and I think I've tried everything. I've checked the config file for the kernel a thousand times and I have ext3 support (my drive is an ext3 drive), ext3 extended support, RAM disk support, ROM support, JFS support, ext2 support, ext2 extended support. They are built directly into the kernel, not modularized as so many have mistakenly done. I've recompiled the kernel five times each time I add a new thing the kernel might need to mount the root partition.

From here I've done the following: I added an append="linux mem=128M" line into LILO, I've run rdev /boot/vmlinuz to check where my working kernel boots to (here I noticed something very odd. When I run this command the box tells me /dev/hba3, which is very strange considering I only have one drive attached to the chain. Naturally I tried this setting in LILO and I still get the panic, saying that the unknown partition cannot be mounted because it's nonexistent - DUH!). I've tried modifying the root= entry various ways, hda1, hda2, hda3... nothin'. I've even tried commenting out the root= line altogether, with the same result.

I should say at this point that my system is dual boot WinXPPro/Slack, with LILO installed in the boot record of the Root partition. This works great because I ran fdisk and toggled the boot flag for the Win partition off, and the Slack partition on. My hard drive is partitioned into four sections in this order: Swap (hda1), WinXP (FAT32; hda2), Slack (ext3; hda3), FAT extended (I think this one is hda4 but I'm not sure b/c it's just data and I'm not paying any attn. to it.)

Help please! I'd love to be able to successfully compile a new kernel (this isn't the first time I've failed at this endeavor, and I know I'm not the only one).
 
Old 11-22-2003, 06:14 AM   #2
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
- ok, maybe you failed to CONFIG in some IDE interface or whatever ?
- You did run lilo after installing, didn't you ?
- Why you say "I copied bzImage to /boot......". make install is supposed to do that for you.

I found a problem myself with kernel 2.6, which when asked "make install", fails to recreate the initrd file if the directory where the modules live (/lib/modules/2.6.0-test9/ ) does not exist. So I created /lib/modules/2.6.0-test9/ and rerun make install and make install_modules.
Then executed lilo by hand.
 
Old 11-22-2003, 08:04 AM   #3
TheOneKEA
Member
 
Registered: Oct 2003
Distribution: Debian GNU/Linux 11 (amd64) w/kernel 6.0.15
Posts: 299

Rep: Reputation: 30
"make install" is easy to trip up in the Linux 2.6 Makefiles. I use the following group of commands to install new 2.6 kernels:

sudo cp /opt/src/linux-2.6.X-X/arch/i386/boot/bzImage /boot/vmlinuz-2.6.X-X
sudo cp /opt/src/linux-2.6.X-X/vmlinux /boot/vmlinux-2.6.X-X
sudo cp /opt/src/linux-2.6.X-X/System.map /boot/System.map-2.6.X-X
sudo cp /opt/src/linux-2.6.X-X/.config /boot/config-2.6.X-X

I use GRUB, so this is what I add to my /boot/grub/grub.conf (this is what I have right now):

title Shrike (2.6.0-test9-bk22)
root (hd0,5)
kernel /boot/vmlinuz-2.6.0-test9-bk22 ro root=/dev/hda6 nogui

Are you absolutely certain that you have all of the necessary things compiled into your kernel? At the very least, if you boot from an IDE disk you MUST have IDE support compiled into your kernel. You MUST compile your root filesystem's kernel driver into your kernel as well, or else it will not be able to mount /.

Can you try to physically write down the kernel panic message you receive and post it here?
 
Old 11-22-2003, 09:00 AM   #4
cellist
Member
 
Registered: Oct 2003
Location: Cincinnati, OH
Distribution: Ubuntu 12.04
Posts: 145

Original Poster
Rep: Reputation: 16
I will post the literal message as soon as I get a chance. As for the IDE drivers, my filesystem is ext3, and as I've said, according to my .config file it is compiled right into the kernel. I can't imagine what else I would need to have compiled in. I've been over the .config file countless times and I've run out of Filesystems to compile into the kernel. I haven't tried compiling ReiserFS because I'm not using ReiserFS, but maybe I will just to cover my bases. However, I really don't think that's the problem. I've seen enough posts that warn about compiling all necessary IDE drivers right into the kernel. I'll look again but believe me, I tried. I'm tempted to just build literally everything into the kernel, which in theory should work though I'm not so sure at this point. Once it works I guess I can try stripping things off I'm not using (like ReiserFS and the like) one by one, making sure the system will boot each time, but I'm really not so fond of the brute force method. Anyway, thanks for the suggestions thus far, keep the ideas coming! I'm growing very very fond of this community...

Last edited by cellist; 11-22-2003 at 09:01 AM.
 
Old 11-22-2003, 09:38 AM   #5
cellist
Member
 
Registered: Oct 2003
Location: Cincinnati, OH
Distribution: Ubuntu 12.04
Posts: 145

Original Poster
Rep: Reputation: 16
The kernel error I get is

VFS: Cannot open root device "303" or hda3
Please append a correct "root=" boot option
Kernel Panic: VFS: Unable to mount root fs on hda3

I just noticed this, but earlier in the boot screen I see,

hda: unknown partition table

This doesn't sound like a good thing. I should point out that my old kernel image boots just fine though so it sounds like whatever it is it's kernel specific.
 
Old 11-22-2003, 09:51 AM   #6
cellist
Member
 
Registered: Oct 2003
Location: Cincinnati, OH
Distribution: Ubuntu 12.04
Posts: 145

Original Poster
Rep: Reputation: 16
pablob, thanks for the message. Yes, I did run LILO after the install. I ran LILO every time I modified anything in the lilo.conf file. Also, after make install I did an ls /root, and bzImage wasn't there. Nor was System.map there. In short, it didn't copy any of those files to the /boot dir. I was pretty sure it was supposed to do that too but it didn't. I guess I'll just skip make install and just type make bzImage and the rest by hand modifying lilo by hand as I have been.
 
Old 11-24-2003, 12:37 PM   #7
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
>"VFS: Cannot open root device "303" or hda3
>Please append a correct "root=" boot option
>Kernel Panic: VFS: Unable to mount root fs on hda3"

If you can boot with an old kernel, then issue a "mount" command and write down which is your root partition, then check in your lilo.conf that the lines with "root=/dev/......" are equal for your old kernel and the new one.
 
Old 11-24-2003, 06:39 PM   #8
krtek
LQ Newbie
 
Registered: Nov 2003
Posts: 1

Rep: Reputation: 0
I've have quite the same problem with compiling the 2.6-test9 kernel... is it buggy ??

My error msg : Kernal Panic : No init food

I haven't time to read other boot log, but I think the problem is that linux can't mount my harddrive...

Does someone have information about a bug in this kernel version?
 
Old 11-24-2003, 07:42 PM   #9
cellist
Member
 
Registered: Oct 2003
Location: Cincinnati, OH
Distribution: Ubuntu 12.04
Posts: 145

Original Poster
Rep: Reputation: 16
mount gives /dev/hda3, which is the same thing as is in lilo.conf. I've reinstalled Slack and formatted my parititon ext2. I'm wondering if 2.6.0 can't handle ext3 for some reason. I haven't tried to recompile yet, but will keep you posted. (A reminder to latecomers: yes, I've compiled support for every imaginable filesystem right into the kernel, not modularized as some might be thinking I did).
 
Old 11-25-2003, 03:25 AM   #10
TheOneKEA
Member
 
Registered: Oct 2003
Distribution: Debian GNU/Linux 11 (amd64) w/kernel 6.0.15
Posts: 299

Rep: Reputation: 30
2.6 handles ext3 fine. Try 2.6.0-test10; it may have fixes for whatever strange problem you're experiencing.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel panic - Unable to mount fs dave`2005 Slackware 12 04-14-2006 08:00 AM
Kernel Panic! could not mount root fs. Please help me out. TruongAn Linux - Software 1 10-20-2005 08:45 AM
Kernel Panic: won't mount root filesystem Neorio Linux - Software 4 02-05-2004 06:32 PM
Kernel Panic: can't mount root fs gtanghookup Linux - Software 10 12-03-2003 05:14 PM
VFS Kernel Panic can't mount 03:03 Sammy2ooo Linux - General 8 04-24-2003 09:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

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