Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have some pretty good experience with building custom kernels and the like and I haven't had any problems in the past with doing so but I am really about to go crazy on this one. I'm trying to get 2.6.16.19 working and I cannot for the life of me figure out why I am getting "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,2)" whenever I try to boot with it. I know that my grub file is correct:
I know for a fact that /dev/hda2 is where the root of the drive is because the kernel I am using now (2.6.8.2) sees it. Initially I had just built file system support for only reiserfs, which is what I use as I don't have a need for JFS, XFS, ext, ext2, ext3, or minix. This gave me "Kernel panic - not syncing: VFS: Unable to mount root fs on unkwnon-block(0,0)" so I decided to go back and include all file system support. As a result, I now get what I posted above. I have all the file systems built into the kernel and I'm pretty sure I made the initrd file right (mkinitrd -o initrd.img-2.6.16.19 2.6.16.19). Anyone know what the deal is? Could this problem extend to another section of the kernel configuration?
^ Sadly, that was the second thing I checked for. I have all ATAPI/IDE stuff built in because I had the same problem in the past and this fixed it. Guess this is a different issue
Hm. The only other thing I can think of (and I'm not sure this is required) is RAM disk support and Initial RAM filesystem support. Both are in Device Drivers > Block Devices. On my kernel, I've just used the defaults for RAM disk support and both that and the Initial RAM Filesystem are built into the kernel.
Yes, I made sure those were both built in as well. In fact, right before I get the kernel panic it will say that the RAM disk has been mounted. I'm thinking I'm just going to wipe the configuration data and start over from scratch. Thanks for your help though.
I'm going to admit to being stumped. Nothing glaringly obvious is jumping out from your config file. About the only suggestion I've got is to run a make clean, and then start with the config from your 2.6.8.2 kernel.
HA! Got it. I was on a rampage and dug around in the miscellaneous file systems section and found CRAMFS hiding away. Built it in, and that was exactly the problem. Everything works like a charm now...minus the 4 or 5 FATAL errors I saw during start up :| I suppose I'll be working on that tonight.
HA! Got it. I was on a rampage and dug around in the miscellaneous file systems section and found CRAMFS hiding away. Built it in, and that was exactly the problem.
This seemed odd to me. So, I did a Google search and found the following information on Wikipedia:
Quote:
For this reason, some Linux distributions also appear to use cramfs as a file system for initial ramdisks (initrd) (recent versions of Debian in particular) and installation images (SuSE in particular), where there are onerous constraints on memory and image size.
So that's one to watch out for on recent Debian releases.
One question: With a custom kernel, are there any advantages to running an initrd? I can understand why packagers would use this functionality, but can the home hobbyist with a fully customised kernel benefit from an initrd in any way?
Just wanted to drop a "thanks" to all of you as this thread. It helped me fix my own 2.6.16.19 compile woes. Although I don't use initrd, I had forgotten to include my IDE controller (it was a module) and so I got the dreaded kernel panic. Now everything works great and so does my laptop's battery monitor!
OK, now I've managed to become the seriously confused one. I've never included cramfs in any of my custom kernels, and I've never had this problem. I do include RAM disk support and initial RAM filesystem support. Are these different from initrd? Or, as suggested by rkelsen, is this a Debian-specific issue?
OK, now I've managed to become the seriously confused one. I've never included cramfs in any of my custom kernels, and I've never had this problem. I do include RAM disk support and initial RAM filesystem support. Are these different from initrd? Or, as suggested by rkelsen, is this a Debian-specific issue?
I get the impression that recent Debian kernel packages include an initrd with all of the "essential, but not built in" kernel modules. It is possible to build your own initrd, but I don't understand why anyone would want to do this with a custom kernel. Packagers obviously need to provide the widest support in the smallest package, so I can see why they'd need to do it.
Suse and Fedora are two other distros which use an initrd by default. Although I'd hazard a guess that not many Suse and Fedora users ever compile a custom kernel (or anything else for that matter)...
It is possible to build your own initrd, but I don't understand why anyone would want to do this with a custom kernel. Packagers obviously need to provide the widest support in the smallest package, so I can see why they'd need to do it.
In the normal run of things, I don't think anyone would need an initrd. If you need to support alot of different setups, such as in distros, then you would, but not for a custom kernel. My kernel even with most everything built in is still small:
1241688 /boot/bzImage-2.6.16.18-nfmod
That's with all pci cards other than the ethernet card, cd, floppy, sound, framebuffer, filesystems (root and msdos/w32), and netfilter (base only). The only major thing I load later is USB support w/printer and ethernet card support.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.