Kernel Panic Unable To Mount root fs

To say that SATA on Linux is a pain in the ass is a bit of an understatement. The 2.4 kernel has limited support for SATA which is why I was very careful with what motherboard I bought. Paul Nasrat checked with some of the Fedora guys which chip sets where supported and the Promise PDC20378 and VIA VT8237 on the MSI and Asus motherboards are supported.
I spent quite a while trying to get a 2.6.4 kernel working on my machine. Lucky for me the netinst CD is also a recovery CD.
Anyway to save some poor person like me spending a long time wondering why their 2.6.4 kernel wont work here is a pointer on a problem that stumped me for a wee while.
I am no guru with the Linux kernel so some of this might very well be nonsense.
If you have compiled a kernel and are getting an error as follows
VFS: Cannot open root device “342” or unknown-block(3,66)
Please append a correct “root=” boot option
Kernel Panic VFS: Unable to mount root fs on unknown-block(3,2)
here are a few things to try.
First make sure that the file system that you are trying to use ie ext2, ext3, reiserfs or whatever is NOT being compiled as a module. To do this you need to locate the “.config” file that is created when you compile your kernel. The normal place for this is
or something like that. An example kernel config ????
In this file there are lots of options to determine whether the kernel will have the driver built in or as a loadable module. If you think about it some drivers need to be in the kernel in order for the kernel to boot and read off the filesystem ie your filesystem drivers in my case EXT2. Make sure these are configured so that they are built in to the kernel.
Another problem that I had was to do with using make-kpkg to build my kernel.
Normally most people finish creating their kernel when using make-kpkg using
make-kpkg kernel_image
when I did this I got the same error above. To fix this you can do the following
make-kpkg –initrd kernel_image
this will create an initrd image in the /boot/ partition which you can then need to link like
/initrd.img > boot/initrd.img-2.6.4
the command to create soft links is
cd /
ln -s /boot/initrd-kernelversion initrd.img
or something similar. This solved the above problem for me.

5 Replies to “Kernel Panic Unable To Mount root fs”

  1. Hi, Im a bit of a newbie to Linux–
    Have a HP Omnibook 4150–given to me
    When I try to boot, I get the following message:
    Ext2-fs:unable to read superblock
    attempt to access beyond end of device
    03:02: “””””””””bread failed
    kernel panic: VFS:
    Unable to mount root fs on 3:02
    Can you help?
    Can I just install another OS?
    What are my options…
    I’d be forever indebted if you could help, Thanks

  2. This is such a common problem I would be hard pushed to guess the cause of it.
    Normally the root causes of this sort of thing are.
    1. Bad lilo.conf setup.
    2. Partition table that you created are incorrect.
    3. Bad install.
    Where you given the omni book and have just tried to boot it. If so then the person who owned it before you has probably wiped it clean. This is normal and a good precaution, you will need to re-install your OS of choice.
    You can reinstall anything you want on it. Redhat, Debian, Windows, Any of the Linux dists should go onto it, just insert the CD and away you go.

  3. Thanks much for responding–
    Yes, problem happens when booting
    I will install an OS–only problem is that
    I dont have a CD Drive–its floppy–can I get a CD drive for HP omnibook 4150?
    Is it even worth the $$$?
    Thanks again,
    by the way-u rock

  4. You can definitely get a CD drive for an Omnibok 4150. The best place to check out for this sort of stuff is ebay.
    Or if you are in the UK there are normally computer fairs all over the country at the weekends and some sell second hand stuff. Take it along and try it.
    Unfortunately getting a single part is harder than finding the whole thing so you are in for a bit of searching.
    Alternatively if you are willing to put the work in and learn Debian then I would recommend installing a base Debian install using the floppies (there are about 15 of them). From there you can connect to the internet and download everything else using
    apt-get install “package-name”
    or use aptitude and install lots of packages at once. There is a learning curve with Debian but once you have it installed and working it works like a dream and handles upgrades etc flawlessly, so no more re-installing.
    To install Debian on it have a look at.
    Where they have used the CD you will need to use floppies.

Leave a Reply

Your email address will not be published. Required fields are marked *