LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to mount root fs -- Kernel panic (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-mount-root-fs-kernel-panic-143240/)

tijs 02-07-2004 01:49 AM

Unable to mount root fs -- Kernel panic
 
Hello,

I'm a newbie Mandrake 9.1 user coming from Windows but fascinated with Linux. I think I may be switching completely, were it not for some problems I encounter.

I had a stable system up till recently, but now I'm unable to boot. This is the relevant information, I think:

-----------
RAMDISK : Compressed image found at block 0
crc error <6> Freeing initrd memory: 146k freed
Kernel panic: VFS: Unable to mount root fs on 03:06
-----------


After about a minute I got an IRQ error: "spurious 8259A interrupt: IRQ 7"

Now I know other people had similar problems (I did some searches on this forum and on Google) but I can't find what I could do to solve my problem. I don't have any important data on my Linux partition, so I could easily do a reinstall. However, I want to do it another way, I may learn some things from it.

Finally, it should be said that I had problems with my LILO bootloader before (I could edit it but not run it with /sbin/lilo as he gave an error relating to my Ramdisk).

Anybody any ideas?

Tijs

spurious 02-07-2004 04:45 AM

You said, "I had a stable system up till recently, but now I'm unable to boot." Did you do anything recently to change your system? The initrd ramdisk image is pretty sensitive to changes in filesystem type or recompiled kernels.

tijs 02-07-2004 07:04 AM

Well, I was trying to change my lilo.conf file. All I did was changing the default boot loader. I should add that I use Mandrake 9.1, which has a LILO GUI tool. This program said, *after a fresh install* (Dutch version though, perhaps a bug in it?), that my LILO was "NOT ok" and gave me an error relating to my ramdisk. Things were fine though, I could dual boot MDK 9.1 and WinXP but I got fed up with the layout of the startup Mandrake screen. That's the point when I started looking in the lilo.conf file. As I said, I made some changes (yes I know, I should be posting my lilo.conf but I'm writing from another computer), but apparently they have never been applied because it kept on booting MDK by default.
I suppose the changes were not applied to the boot loader because of some ramdisk error (it said it was fatal). So, this has always been the case in my two months Linux experience. I could live with the fact that I was unable to edit LILO. It's only now that I can't boot MDK at all (kernel panic). I did not do anything to the kernel, let alone compiling the new 2.6. Being a newbie, perhaps I should just do a fresh install again.
Hope my clarification makes sense.

T.

m_yates 02-07-2004 11:58 AM

Did you save the original lilo.conf before you edited it? The "kernel panic" about not being able to mount root fs probably means that support for your filesystem (like reiserfs, ext3, etc.) was not compiled into the kernel, but as a module. If this is the case, you need the initrd to be able to mount the filesystem. The lilo.conf file should point to the location of the initrd to use during boot up. Your lilo entry should look something like this:

image=/boot/vmlinuz-2.4.24
label=Linux
initrd=/boot/initrd.gz
read-only

Of course, you need to use the correct vmlinuz and initrd for your system. If the filesystem support is compiled into the kernel, you don't need an initrd.

spurious 02-07-2004 01:20 PM

I believe that the Mandrake install CD also boots into 'rescue mode'. From the shell, you should be able to mount your Mandrake partition and then edit your lilo.conf file as m_yates suggested. If you don't know how to do this, then yes, you may be better off reinstalling Mandrake.

What probably happened was that when you overwrote your default lilo.conf file, you probably forgot to insert the 'initrd=/boot/initrd.gz' line.

tijs 02-07-2004 03:35 PM

Thanks for the explanations. I'll boot into Knoppix and will try to edit my lilo.conf the way you suggested. If that doesn't work, I'll just go for a new install. I have the 3 recent iso's from MDK 10 beta 2 now, I hope these are good.
As for the filesystem, during MDK install I chose to adopt the Reiserfs system, an option available in MDK itself.
Interesting to hear about this "initrd=/boot/initrd.gz", I never heard of it... Time to read more, I suppose. I may also give GRUB a try.

spurious 02-07-2004 05:55 PM

The purpose of the initrd ramdisk boot image is to load the filesystem modules so that the kernel can read the harddrive partitions. For example, the kernels in distributions such as Red Hat, Mandrake, Knoppix etc. compile ReiserFS support as a loadable module rather than compiling the support into the kernel itself.

Well, if your /boot is on a ReiserFS partition, then how does the bootloader read from /boot before the ReiserFS module is loaded? That's where initrd comes in; the bootloader creates a ramdisk image to load necessary modules so that it can read the kernel in from /boot.

When your bootloader got messed up, the initrd image failed to load and you got the kernel panic. This error also occurs when you recompile the kernel, and fail to create the initrd image correctly.

Slackware, however, does not load an initrd on boot by default. The default Slackware kernel compiles in support for ext3 and ReiserFS rather than loading these filesystems as modules.


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