View previous topic :: View next topic |
Author |
Message |
JumboAg Apprentice


Joined: 03 Mar 2007 Posts: 214 Location: Dallas, TX
|
Posted: Fri Feb 08, 2013 12:54 am Post subject: EFI Stub and initrd |
|
|
I'm booting Gentoo in an EFI environment using the EFI Stub option in my kernel.
It works great, but there's one thing I have never been able to figure out how to make work. I'd like to load an initrd image to fire off my fbcondecor decorations earlier in the boot process. (I know I can just enable the decorations by putting fbcondecor in runlevel default, but I'm a bit OCD. I REALLY want to figure this one out.)
My normal built-in kernel command line entry is very basic: "ro root/dev/sda3"
Works great, lasts long time.
I want to call an initrd on the same line and just cant get the syntax right so it launches the console decorations.
I know for a start its going to be the same as before, so:
ro root=/dev/sda3
Add in "splash=verbose,theme=Linux console=tty1" (The generic entry for the decoration I want to use)
I called my initramfs file that contains the image initrd.img and put it in /boot/efi/EFI/gentoo.
I've tried backslashes, no absolute directories, forward slashes, basically every combo I can think of, but none execute the initrd file.
Any suggestions would be greatly appreciated.
BTW, my EFi boot manager is "refind" [a fantastic refit fork that another poster on these boards maintains. Its creator is the person that more than anyone got EFI boot working for me originally.] so its not a limitation of my EFI mgr. |
|
Back to top |
|
 |
s4e8 Guru

Joined: 29 Jul 2006 Posts: 311
|
Posted: Fri Feb 08, 2013 2:39 am Post subject: |
|
|
from kernel Documentation/x86/efi-stub.txt Quote: |
fs0:\Kernels> bzImage.efi initrd=\Kernels\initrd-large.img
|
|
|
Back to top |
|
 |
stevenylai n00b

Joined: 30 Dec 2012 Posts: 16
|
Posted: Fri Feb 08, 2013 2:51 am Post subject: |
|
|
According to the refind.conf on my computer, a sample linux entry with initramfs should look like:
menuentry Linux {
icon EFI/refind/icons/os_linux.icns
volume KERNELS
loader bzImage-3.3.0-rc7
initrd initrd-3.3.0.img
options "ro root=UUID=5f96cafa-e0a7-4057-b18f-fa709db5b837"
}
So I suppose you can try adding the line below?
initrd initrd.img |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23322
|
Posted: Fri Feb 08, 2013 3:05 am Post subject: |
|
|
Why not just embed the initramfs into the kernel? That would make it available without any tinkering with the bootloader. |
|
Back to top |
|
 |
WorBlux n00b

Joined: 07 May 2011 Posts: 39
|
|
Back to top |
|
 |
srs5694 Guru

Joined: 08 Mar 2004 Posts: 434 Location: Woonsocket, RI
|
Posted: Fri Feb 08, 2013 3:58 pm Post subject: |
|
|
As others have said, you need to use backslashes and an absolute path relative to the root of whatever filesystem holds the kernel (it looks like the ESP in your case).
That said, if you're using rEFInd, and if you're using its auto-detection to find your kernel, this shouldn't be necessary. Place the initrd file in the same directory as the kernel, be sure it has a name that begins with "init", and be sure its filename contains the same version string as the kernel, and rEFInd should auto-detect the initrd file and pass it as an option. In my own use, this fails only if I make a mistake, such as using the wrong version string on one file or the other. (Note that rEFInd defines the "version string" as the part of the filename from the first digit to the last digit, so if your kernel is called "bzImage-x86_64-3.7.4", the version string is "86_64-3.7.4", and the initrd filename must contain that string and no other digits.) |
|
Back to top |
|
 |
|