LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kernel panic on rebuild; can't mount fs 303 (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-panic-on-rebuild%3B-cant-mount-fs-303-a-118786/)

cellist 11-22-2003 04:18 AM

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).

pablob 11-22-2003 06:14 AM

- 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.

TheOneKEA 11-22-2003 08:04 AM

"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?

cellist 11-22-2003 09:00 AM

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... :)

cellist 11-22-2003 09:38 AM

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.

cellist 11-22-2003 09:51 AM

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.

pablob 11-24-2003 12:37 PM

>"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.

krtek 11-24-2003 06:39 PM

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?

cellist 11-24-2003 07:42 PM

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).

TheOneKEA 11-25-2003 03:25 AM

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


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