LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-24-2012, 12:17 PM   #1
steve_pa
LQ Newbie
 
Registered: Jan 2012
Location: Houston Tx USA
Distribution: Debian/SuSE/Gentoo/Arch
Posts: 16

Rep: Reputation: Disabled
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.
 
Old 01-24-2012, 02:47 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo, Slackware
Posts: 14,896
Blog Entries: 2

Rep: Reputation: 3810Reputation: 3810Reputation: 3810Reputation: 3810Reputation: 3810Reputation: 3810Reputation: 3810Reputation: 3810Reputation: 3810Reputation: 3810Reputation: 3810
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.
 
1 members found this post helpful.
Old 01-24-2012, 02:54 PM   #3
Ion Silverbolt
Member
 
Registered: Sep 2004
Distribution: Gentoo/Xfce, Manjaro/Xfce, SolydXK
Posts: 194

Rep: Reputation: 36
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
 
1 members found this post helpful.
Old 01-24-2012, 10:26 PM   #4
steve_pa
LQ Newbie
 
Registered: Jan 2012
Location: Houston Tx USA
Distribution: Debian/SuSE/Gentoo/Arch
Posts: 16

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-24-2012, 11:16 PM   #5
Ion Silverbolt
Member
 
Registered: Sep 2004
Distribution: Gentoo/Xfce, Manjaro/Xfce, SolydXK
Posts: 194

Rep: Reputation: 36
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=

Last edited by Ion Silverbolt; 01-24-2012 at 11:21 PM.
 
1 members found this post helpful.
Old 01-25-2012, 08:24 AM   #6
steve_pa
LQ Newbie
 
Registered: Jan 2012
Location: Houston Tx USA
Distribution: Debian/SuSE/Gentoo/Arch
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thumbs up [Solved] initramfs genkernel vs custom kernel

Quote:
Originally Posted by Ion Silverbolt View Post
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=
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.

Thanks to all.

Last edited by steve_pa; 01-25-2012 at 08:30 AM.
 
Old 01-25-2012, 01:38 PM   #7
steve_pa
LQ Newbie
 
Registered: Jan 2012
Location: Houston Tx USA
Distribution: Debian/SuSE/Gentoo/Arch
Posts: 16

Original Poster
Rep: Reputation: Disabled
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.

Last edited by steve_pa; 01-27-2012 at 07:52 PM.
 
Old 01-25-2012, 07:17 PM   #8
Ion Silverbolt
Member
 
Registered: Sep 2004
Distribution: Gentoo/Xfce, Manjaro/Xfce, SolydXK
Posts: 194

Rep: Reputation: 36
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.
 
1 members found this post helpful.
Old 01-25-2012, 07:58 PM   #9
steve_pa
LQ Newbie
 
Registered: Jan 2012
Location: Houston Tx USA
Distribution: Debian/SuSE/Gentoo/Arch
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ion Silverbolt View Post
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!

Thanks again.
Steve.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error when compiling Xen kernel with Genkernel shadowers Linux - Kernel 0 01-08-2010 06:46 PM
initramfs on 2.4 kernel sailwind Linux - General 0 02-06-2009 04:44 PM
Error while building initramfs image for custom kernel TDMBG Linux - Software 2 08-01-2008 05:14 PM
Kernel Booting Slow - initramfs - Ubuntu 7.04 Kernel 2.6.20 bench Linux - Kernel 3 09-11-2007 05:14 AM
kernel 2.6 initramfs ashlesha Linux - Newbie 10 07-27-2006 09:07 PM


All times are GMT -5. The time now is 01:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration