initramfs genkernel vs custom kernel
Hi to everyone!
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 any info appreciated steve. |
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: http://www.gentoo.org/doc/en/handboo...part=1&chap=10 |
Thanks to each responder.
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. Thanks Steve. |
What is the output of your grub.conf file? A difference between compiling your own and genkernel is the root appendage. Example:
Genkernel: kernel /boot/kernel-genkernel-x86-2.6.34-gentoo-r1 real_root=/dev/sda3 Self compiled: kernel /boot/kernel-2.6.34-gentoo-r1 root=/dev/sda3 If you have the real_root setting for the self compiled kernel, it will not boot. Use root= |
[Solved] initramfs genkernel vs custom kernel
Quote:
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. Thanks to all. |
To clarify the environment:
Macbook Pro late 2011. Host OS X 10.7.2 virtual environment: VirtualBox 4.1.8 Guest OS: gentoo x86_64 linux-3.1.6 this post will be updated after more confirmation. |
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. |
Quote:
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! Thanks again. Steve. |
All times are GMT -5. The time now is 11:10 AM. |