[SOLVED] Custom kernel on Dell Optiplex panics: cannot mount root partition (null)
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
Custom kernel on Dell Optiplex panics: cannot mount root partition (null)
Compiled a custom 3.15.5. kernel for an Optiplex 745, running Debian Wheezy:
make proper
make allmodconfig
make localyesconfig
Checked it for any obvious missing/incorrect stuff and compiled, then copied the kernel etc. to /boot, installed modules (such as existed), and updated GRUB2.
It does not boot. Complains that it cannot mount the root filesystem "null" or unknown-block(0,0) and panics, no matter what I specify for root partition. This suggests to me that it is not seeing the partitions at all; however, the necessary ATA drivers are all definitely compiled into the kernel, and the required partition type is enabled in the config. So I have no idea what's going on.
Likewise, the necessary filesystem drivers are compiled in, and the SATA, PATA, and SCSI hard disk drivers.
Did support for this computer's ATA controller get dropped from the kernel, or something? What is happening here? I've never seen a kernel panic like this when all necessary drivers are configured.
Edit: to add insult to injury, the kernel does in fact see the partitions - it prints a list of them when it panics. It appears to be just ignoring the root= directive. How can I make it not ignore that?
Last edited by Gullible Jones; 07-15-2014 at 02:12 PM.
Yup. Root is ext4, ext4 drivers are compiled into the kernel.
I also just tried recompiling without initrd support, having read in one thread on one forum somewhere that enabling initrd makes the kernel ignore the root directive. No go. It continues to ignore it.
I think maybe the issue was the "internal kernel command line" option being enabled, set to defaults, and overriding the specified parameters... Tried recompiling with that disabled, but wound up with all debug options disabled, and a kernel that traces itself more and more slowly until it panics.
My bad. It looks like allmodconfig does not produce a usable kernel, and stripping it down with localyesconfig does nothing to change that; I will try oldconfig instead.
Maybe we'll be able to help you better if you state your aim in compiling a custom kernel.
Nevertheless, I'd recommend that you take as a basis your running kernel's config file (or one provided by your distribution), do a "make oldconfig" then possibly "make menuconfig" (replace "menu" with "n", "x" or "g" if you prefer), to tweak the configuration to your liking.
I have done that any times. I was hoping that the new 'localyesconfig' option would allow me to automatically generate stripped-down GrSecurity kernels from a base config.
But it clearly is not adequate on its own. This time I got a kernel that booted... And did not include keyboard and mouse drivers. Yay.
I'm marking this as [solved] for now, since what I was trying to do is clearly not supported at all.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.