Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
EFI Stub and initrd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
JumboAg
Apprentice
Apprentice


Joined: 03 Mar 2007
Posts: 186
Location: Dallas, TX

PostPosted: Fri Feb 08, 2013 12:54 am    Post subject: EFI Stub and initrd Reply with quote

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
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 311

PostPosted: Fri Feb 08, 2013 2:39 am    Post subject: Reply with quote

from kernel Documentation/x86/efi-stub.txt
Quote:

fs0:\Kernels> bzImage.efi initrd=\Kernels\initrd-large.img
Back to top
View user's profile Send private message
stevenylai
n00b
n00b


Joined: 30 Dec 2012
Posts: 16

PostPosted: Fri Feb 08, 2013 2:51 am    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Fri Feb 08, 2013 3:05 am    Post subject: Reply with quote

Why not just embed the initramfs into the kernel? That would make it available without any tinkering with the bootloader.
Back to top
View user's profile Send private message
WorBlux
n00b
n00b


Joined: 07 May 2011
Posts: 39

PostPosted: Fri Feb 08, 2013 3:08 pm    Post subject: Reply with quote

https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/x86/efi-stub.txt;hb=HEAD



use backslashes, and the path should be the absolute path from the root of the efi partition.
Back to top
View user's profile Send private message
srs5694
Guru
Guru


Joined: 08 Mar 2004
Posts: 434
Location: Woonsocket, RI

PostPosted: Fri Feb 08, 2013 3:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum