GentooThis forum is for the discussion of Gentoo Linux.
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.
Question:
When I do the genkernel all route, a initrd file gets copied to /boot, but I notice that when I compile a custom kernel, I don't see that same file to copy. The genkernel boots fine, the custom kernel fails as "VFS: can not open root device". I suspect it is because there is no initrd file??
1. Should there be a initrd file for custom compile?
2. If so, what config is required to generate it?
I do know that the modules to mount the root fs do need to be installed built in vs modules.
My config:
MBP
VirtualBox
Host OS: os x
guest os: gentoo x86_64
You do not only need the drivers for the file system built into the kernel, but also the drivers for the storage controllers. In Virtualbox you need AHCI drivers for the virtual SATA controller, IIRC, and Intel PATA drivers for the IDE controller (you can choose the type of controller here, it can be PIIX3, PIIX4 and ICH6).
If you have all those drivers built in you shouldn't need an initrd.
You shouldn't need anything extra to boot a custom kernel. The more likely cause is maybe you forgot to add support for the SATA controller for your hard drive in your kernel config. It can be easy to overlook something. Another thing you might want to double-check for is ext4 support. It's not enabled by default when you do the custom config route.
It also could be your grub.conf file needs altered. Genkernel uses a different setup than a custom kernel does. A quick look at the manual here might help you out:
I have built-in about everything related to SATA, PATA, SCSI and my two filesystems (ext2,3) available, and I still get the exact same VFS error.
Can someone clarify if I need to configure any modules as per the Handbook? Seems like if my hardware interfaces and file system configuration is built-in, then this would not seem like a cause of my problems.
If you have the real_root setting for the self compiled kernel, it will not boot. Use root=
Ion, you were spot on! After changing it and re-installing grub, it booted. (I had used both "root=" forms, since I was not sure why it was not booting.)
At this point, I am not really sure which "exact" kernel stuff needs to be built in and which can be modularized. That is for another day.
Compiling your own kernel is very rewarding once you get past all the failures.
As for compiling in vs. modules..Things that are critical at boot such as a SATA controller, or file system support, I find it more benificial to compile in. Otherwise, audio, video, and network drivers I think are better compiled as modules. For one, you can pass on modifications to drivers if they are built as modules.
As for the SATA example, if it's compiled as a module, you may have to add delays in booting. Otherwise you will get the error you got above because the kernel is trying to load before the module is loaded.
Compiling your own kernel is very rewarding once you get past all the failures.
As for compiling in vs. modules..Things that are critical at boot such as a SATA controller, or file system support, I find it more benificial to compile in. Otherwise, audio, video, and network drivers I think are better compiled as modules. For one, you can pass on modifications to drivers if they are built as modules.
As for the SATA example, if it's compiled as a module, you may have to add delays in booting. Otherwise you will get the error you got above because the kernel is trying to load before the module is loaded.
Ion, appreciate your great help.
AFAIK, all SATA is built-in for me.
It was not til I returned to Gentoo that I realized how much I had forgotten about Linux.
Its pretty obvious how effective the exercise of reading the doc, then editing config files, untiring, emerge-ing, to get a working Linux install, really helps in the education process!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.