Hello dear rEFInd support.
I have a problem - i can't boot my gentoo.
Firstly, my system is configured to supports UEFI only:
UEFI/Legacy Boot: UEFI only
CSM Support: No
So, i gave only GPT partitions.
I compiled my gentoo kernel and move in to my EFI system partition:
cp arch/x86_64/boot/bzImage /boot/kernel-3.10.25-gentoo (to my /dev/sda2 (EFI system partition))
Then i change refind.conf to boot my kernel:
menuentry Linux {
icon EFI/refind/icons/os_linux.icns
volume KERNELS
loader kernel-3.10.25-gentoo
options "root=/dev/sda6 ro rootfstype=ext4"}
As you see, my kernel kernel-3.10.25-gentoo haven't got an extension and it located in main EFI folder in my EFI system partition. My linux (tar xvjpf stage3-amd64.tar.bz2) located in /dev/sda6. And, as you can see, i didn't create initramfs (i think i don't need it).
WHEN I TRYING TO BOOT MY GENTOO, I HAVE AN ERROR:
Starting kernel-3.10.25-gentoo
Using load options 'root=/dev/sda6 ro rootfstype=ext4'
Invalid loader file!
Error: Not found while loading kernel-3.10.25-gentoo
* Hit any key to continue *
So, what i need to do?
Thanks!
Last edit: Nicklan 2014-03-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The "invalid loader file" error is most likely caused by a failure to set the CONFIG_EFI_STUB kernel compile option. Please check the settings (via make menuconfig, make xconfig, or by browsing the kernel directory's .config file), correct it as necessary, rebuild the kernel, and try again.
Another possibility is that the kernel is for the wrong architecture. Most modern computers use 64-bit EFIs, and these can boot only 64-bit kernels. If you're trying to boot a 32-bit kernel on a 64-bit computer with a 64-bit EFI, it just won't work. (Likewise for a 64-bit kernel on a 32-bit EFI, but AFAIK only a handful of Macs use 32-bit EFIs with 64-bit CPUs.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have recompiled gentoo kernel (with correct options), but i have same problem...
cp arch/x86_64/boot/bzImage /boot/kernel-3.10.25-gentoo (my kernel in folder x86_64)
How can i check my kernel-3.10.25-gentoo?
How can i get to know what problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All I can say is to review what you did for errors:
Double-check that the CONFIG_EFI_STUB option is set in the .config file for the kernel you've compiled.
Do a make clean followed by a fresh make on the kernel, just to be sure you're really recompiling with that option. (This is probably overkill, but it's better to be 100% sure on this point.)
Verify that the kernel file has copied successfully by using diff.
Verify that you've set the kernel to compile as a 64-bit kernel (assuming you've got a 64-bit EFI). In particular, the CONFIG_64BIT option must be set.
Double-check that you've specified the correct kernel file in your manual boot stanza.
As a side note, manual boot stanzas can be tricky to configure -- they're susceptible to typos and to simple errors relating to partition identification and path names. You're much more likely to get things working correctly and easily if you give your kernel a filename that rEFInd can auto-scan (with a .efi extension or a name that begins with vmlinuz or bzImage) and rely on the auto-scanning. Note that a kernel that lacks an EFI stub or that's the wrong bit depth for your EFI won't show up in the menu when you do it this way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello dear rEFInd support.
I have a problem - i can't boot my gentoo.
Firstly, my system is configured to supports UEFI only:
UEFI/Legacy Boot: UEFI only
CSM Support: No
So, i gave only GPT partitions.
I compiled my gentoo kernel and move in to my EFI system partition:
cp arch/x86_64/boot/bzImage /boot/kernel-3.10.25-gentoo (to my /dev/sda2 (EFI system partition))
Then i change refind.conf to boot my kernel:
menuentry Linux {
icon EFI/refind/icons/os_linux.icns
volume KERNELS
loader kernel-3.10.25-gentoo
options "root=/dev/sda6 ro rootfstype=ext4"}
As you see, my kernel kernel-3.10.25-gentoo haven't got an extension and it located in main EFI folder in my EFI system partition. My linux (tar xvjpf stage3-amd64.tar.bz2) located in /dev/sda6. And, as you can see, i didn't create initramfs (i think i don't need it).
WHEN I TRYING TO BOOT MY GENTOO, I HAVE AN ERROR:
Starting kernel-3.10.25-gentoo
Using load options 'root=/dev/sda6 ro rootfstype=ext4'
Invalid loader file!
Error: Not found while loading kernel-3.10.25-gentoo
* Hit any key to continue *
So, what i need to do?
Thanks!
Last edit: Nicklan 2014-03-03
The "invalid loader file" error is most likely caused by a failure to set the
CONFIG_EFI_STUB
kernel compile option. Please check the settings (viamake menuconfig
,make xconfig
, or by browsing the kernel directory's.config
file), correct it as necessary, rebuild the kernel, and try again.Another possibility is that the kernel is for the wrong architecture. Most modern computers use 64-bit EFIs, and these can boot only 64-bit kernels. If you're trying to boot a 32-bit kernel on a 64-bit computer with a 64-bit EFI, it just won't work. (Likewise for a 64-bit kernel on a 32-bit EFI, but AFAIK only a handful of Macs use 32-bit EFIs with 64-bit CPUs.)
I have recompiled gentoo kernel (with correct options), but i have same problem...
cp arch/x86_64/boot/bzImage /boot/kernel-3.10.25-gentoo (my kernel in folder x86_64)
How can i check my kernel-3.10.25-gentoo?
How can i get to know what problem?
All I can say is to review what you did for errors:
CONFIG_EFI_STUB
option is set in the.config
file for the kernel you've compiled.make clean
followed by a freshmake
on the kernel, just to be sure you're really recompiling with that option. (This is probably overkill, but it's better to be 100% sure on this point.)diff
.CONFIG_64BIT
option must be set.As a side note, manual boot stanzas can be tricky to configure -- they're susceptible to typos and to simple errors relating to partition identification and path names. You're much more likely to get things working correctly and easily if you give your kernel a filename that rEFInd can auto-scan (with a
.efi
extension or a name that begins withvmlinuz
orbzImage
) and rely on the auto-scanning. Note that a kernel that lacks an EFI stub or that's the wrong bit depth for your EFI won't show up in the menu when you do it this way.