Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rEFInd not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
RinCat
n00b
n00b


Joined: 09 Mar 2016
Posts: 9

PostPosted: Wed Mar 09, 2016 9:17 am    Post subject: rEFInd not working Reply with quote

Hi all,

I just move to Gentoo and found I cannot boot up my system.

I was using UEFI + GPT + rEFInd with Arch for long time, and it works fine. So first it should not has compatibility issues.

Disk reformatted.

Code:

/dev/sda1  vfat  /boot/efi
/dev/sda2  ext4  /boot
/dev/sda3  btrfs  /


rEFInd built with all USE flag (ext4 btrfs etc...)

Issue:
UEFI able to load rEFInd and its images and refind.conf, but it cannot find/load any drivers and extra configuration files.

First I tried copy all drivers .efi files to (/boot/efi)/EFI/boot/drivers(_x64), (/boot/efi)/EFI/refind/drivers(_x64), and (/boot/efi)/EFI/drivers(_x64).
But it still cannot recognize any filesystem/kernel. I got a empty list. :roll:

Then I copied kernel and initramfs to EFI partition.
rEFInd could find the kernel but it still ignore refind_linux.conf and passing empty option to kernel, then kernel cannot find root filesystem. 8O

I had tried change refind.conf, enabled deep scan, set drivers dir, etc.. But useless. :(

I need help, spend hours on this issue but cannot finger out where is problem. :?:

Thanks.


Last edited by RinCat on Wed Mar 09, 2016 7:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
Tatsh
Apprentice
Apprentice


Joined: 22 Jul 2007
Posts: 179

PostPosted: Wed Mar 09, 2016 10:58 am    Post subject: Reply with quote

Need more config. Pretty sure you need to run efibootmgr to get those executables to be recongised by UEFI, but not necessarily by rEFInd as it tends to be much smarter.

Any reason you need to use rEFInd? I would recommend sticking with GRUB and then eventually going with EFI stub.
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1374

PostPosted: Wed Mar 09, 2016 11:06 am    Post subject: Reply with quote

Mounted the EFI partition at "/boot/efi"
(the "/boot" a normal directory on the "/" root partition)
I have all drivers at "/boot/efi/EFI/refind/drivers" without any of "x64"
If not sure howto use "refind" you can use the efi from systemd:
"/usr/lib/systemd/boot/efi/systemd-bootx64.efi"
and copy it as: "/boot/efi/EFI/BOOT/BOOTX64.EFI"
which is the efi default starting place. if already hampered that using efibootmgr
you can live with any place, like /boot/efi/EFI/SDBoot/systemd-bootx64.efi"
Nevertheless this systemd efi boot would need a simple config file
on the efi partition at a special place:
Code:
#this file when mounted is at
#/boot/efi/loader/entries/Gentoo.conf
title  Gentoo                                                                                 
options root=/dev/sda4 rootfstype=ext4
linux  /Gentoo/vmlinuz
initrd /Gentoo/initrd.gz
#when efi is mounted the files must be copied: /boot/efi/Gentoo/vmlinuz

Using grub it has the drivers for reaching out to any ext4 partition. But not so this systemd efi boot. You must copy the kernel and initrd files to the vfat efi partition at a place mentioned in the loader/entries/*.conf. I do so by ever using the same place.
_________________
fun2gen2
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Mar 09, 2016 12:40 pm    Post subject: Re: rEFInd not working Reply with quote

RinCat wrote:
First I tried copy all drivers .efi files to /EFI/boot/drivers(_x64), /EFI/refind/drivers(_x64), and /EFI/drivers(_x64). But it still cannot recognize any filesystem/kernel. I got a empty list. :roll:

RinCat ... note that the ESP (EFI System Partition) contains 'efi', so on the filesystem that path would be {mountpoint}/efi/refind/drivers_x64 ... and so not 'slash efi'. So, in my case the ESP is mounted as /boot and the path looks like the following:

Code:
# mount /boot
# print -rl /boot/efi/**/*(/)
/boot/efi/linux
/boot/efi/refind
/boot/efi/refind/drivers_ia32
/boot/efi/refind/icons
/boot/efi/shell

Besides that, what does 'efibootmgr -v' show as the path to rEFInd?

Tatsh wrote:
Any reason you need to use rEFInd? I would recommend sticking with GRUB and then eventually going with EFI stub.

I disagree ... grub2 is horrid ;)

ulenrich wrote:
[...]

... and what makes you think the OP is using systemd? You're just confusing the issue.

best ... khay
Back to top
View user's profile Send private message
saellaven
Guru
Guru


Joined: 23 Jul 2006
Posts: 502

PostPosted: Wed Mar 09, 2016 1:57 pm    Post subject: Reply with quote

Try putting your kernel options in your kernel config

from my own .config:
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="root=PARTUUID=a9cb9a9f-cfc6-410e-946b-1ec9e468452a dolvm rootfstype=ext4"


oh, and EFI stub only is a bad idea since it makes it harder to have multiple kernels in case the current one fails.
Back to top
View user's profile Send private message
RinCat
n00b
n00b


Joined: 09 Mar 2016
Posts: 9

PostPosted: Wed Mar 09, 2016 7:01 pm    Post subject: Reply with quote

ulenrich wrote:
Mounted the EFI partition at "/boot/efi"
(the "/boot" a normal directory on the "/" root partition)
I have all drivers at "/boot/efi/EFI/refind/drivers" without any of "x64"


khayyam wrote:

RinCat ... note that the ESP (EFI System Partition) contains 'efi', so on the filesystem that path would be {mountpoint}/efi/refind/drivers_x64 ... and so not 'slash efi'. So, in my case the ESP is mounted as /boot and the path looks like the following:

Code:
# mount /boot
# print -rl /boot/efi/**/*(/)
/boot/efi/linux
/boot/efi/refind
/boot/efi/refind/drivers_ia32
/boot/efi/refind/icons
/boot/efi/shell



Sorry, I did not say clearly, that is EFI partition filesystem, and actually location is /boot/efi/* .
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Mar 09, 2016 7:07 pm    Post subject: Reply with quote

RinCat wrote:
Sorry, I did not say clearly, that is EFI partition filesystem, and actually location is /boot/efi/* .

RinCat ... and the output of 'efibootmgr -v'?

best ... khay
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1374

PostPosted: Wed Mar 09, 2016 10:15 pm    Post subject: Reply with quote

RinCat wrote:
khayyam wrote:

RinCat ... note that the ESP (EFI System Partition) contains 'efi', so on the filesystem that path would be {mountpoint}/efi/refind/drivers_x64 ... and so not 'slash efi'. So, in my case the ESP is mounted as /boot and the path looks like the following:

Code:
# mount /boot
# print -rl /boot/efi/**/*(/)
/boot/efi/linux
/boot/efi/refind
/boot/efi/refind/drivers_ia32
/boot/efi/refind/icons
/boot/efi/shell


Sorry, I did not say clearly, that is EFI partition filesystem, and actually location is /boot/efi/* .

Now the ESP partition proper mounted at standard /boot/efi
that means you have - mounted - this directory: /boot/efi/boot/efi/refind/
instead of what we normally have: /boot/efi/EFI/refind/
?
khayyam wrote:
.. and what makes you think the OP is using systemd? You're just confusing the issue.
I just wanted to show the most simple system I know of, because I already thought of the OP having a very ordinary problem with directories.
_________________
fun2gen2
Back to top
View user's profile Send private message
RinCat
n00b
n00b


Joined: 09 Mar 2016
Posts: 9

PostPosted: Wed Mar 09, 2016 10:53 pm    Post subject: Reply with quote

khayyam wrote:
RinCat wrote:
Sorry, I did not say clearly, that is EFI partition filesystem, and actually location is /boot/efi/* .

RinCat ... and the output of 'efibootmgr -v'?

best ... khay


Code:

BootCurrent: 0007
Timeout: 0 seconds
BootOrder: 0007,0004,0005,0006
Boot0004* UEFI OS   HD(1,GPT,7639ab7e-f86f-4a44-91eb-a38d9a0s7e21,0x800,0x80000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0005  UEFI: IP4 Qualcomm Atheros PCIe Network Controller   PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(=MASK=,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0006  UEFI: IP6 Qualcomm Atheros PCIe Network Controller   PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(=MASK=,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0007* UEFI: ADATA USB Flash Drive 1100   PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(2,0)/HD(1,MBR,0x4294620362,0x800,0x39cf800)..BO
Back to top
View user's profile Send private message
RinCat
n00b
n00b


Joined: 09 Mar 2016
Posts: 9

PostPosted: Wed Mar 09, 2016 10:55 pm    Post subject: Reply with quote

ulenrich wrote:
RinCat wrote:
khayyam wrote:

RinCat ... note that the ESP (EFI System Partition) contains 'efi', so on the filesystem that path would be {mountpoint}/efi/refind/drivers_x64 ... and so not 'slash efi'. So, in my case the ESP is mounted as /boot and the path looks like the following:

Code:
# mount /boot
# print -rl /boot/efi/**/*(/)
/boot/efi/linux
/boot/efi/refind
/boot/efi/refind/drivers_ia32
/boot/efi/refind/icons
/boot/efi/shell


Sorry, I did not say clearly, that is EFI partition filesystem, and actually location is /boot/efi/* .

Now the ESP partition proper mounted at standard /boot/efi
that means you have - mounted - this directory: /boot/efi/boot/efi/refind/
instead of what we normally have: /boot/efi/EFI/refind/
?


No, it is at /boot/efi/EFI/refind/ .
In ESP is at EFI/refind.
Back to top
View user's profile Send private message
RinCat
n00b
n00b


Joined: 09 Mar 2016
Posts: 9

PostPosted: Wed Mar 09, 2016 11:09 pm    Post subject: Reply with quote

I just used refind-install to modify EFI boot list, but still same issue without any error during install. 8O

Code:

BootCurrent: 0007
Timeout: 0 seconds
BootOrder: 0000,0007,0004,0005,0006
Boot0000* rEFInd Boot Manager   HD(1,GPT,7639ab7e-f86f-4a44-91eb-a38d9a0s7e21,0x800,0x80000)/File(\EFI\refind\refind_x64.efi)
Boot0004* UEFI OS   HD(1,GPT,7639ab7e-f86f-4a44-91eb-a38d9a0s7e21,0x800,0x80000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0005  UEFI: IP4 Qualcomm Atheros PCIe Network Controller   PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(=MASK=,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0006  UEFI: IP6 Qualcomm Atheros PCIe Network Controller   PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(=MASK=,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0007* UEFI: ADATA USB Flash Drive 1100   PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(2,0)/HD(1,MBR,0x4294620362,0x800,0x39cf800)..BO


Last edited by RinCat on Wed Mar 09, 2016 11:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1374

PostPosted: Wed Mar 09, 2016 11:14 pm    Post subject: Reply with quote

RinCat wrote:
Code:
BootCurrent: 0007
Timeout: 0 seconds
BootOrder: 0007,0004,0005,0006
Boot0004* UEFI OS   HD(1,GPT,7639ab7e-f86f-4a44-91eb-a38d9a0s7e21,0x800,0x80000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0005  UEFI: IP4 Qualcomm Atheros PCIe Network Controller   PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(=MASK=,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0006  UEFI: IP6 Qualcomm Atheros PCIe Network Controller   PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(=MASK=,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0007* UEFI: ADATA USB Flash Drive 1100   PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(2,0)/HD(1,MBR,0x4294620362,0x800,0x39cf800)..BO
What kind of efi program would start with your standard entry BOOTX64.EFI at the begin?
If you plug off all of usb drives, then Boot0007 cannot disturb your Boot0004, as it comes second.
_________________
fun2gen2
Back to top
View user's profile Send private message
RinCat
n00b
n00b


Joined: 09 Mar 2016
Posts: 9

PostPosted: Wed Mar 09, 2016 11:25 pm    Post subject: Reply with quote

ulenrich wrote:
RinCat wrote:
Code:
BootCurrent: 0007
Timeout: 0 seconds
BootOrder: 0007,0004,0005,0006
Boot0004* UEFI OS   HD(1,GPT,7639ab7e-f86f-4a44-91eb-a38d9a0s7e21,0x800,0x80000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0005  UEFI: IP4 Qualcomm Atheros PCIe Network Controller   PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(=MASK=,0)/IPv4(0.0.0.0:0<->0.0.0.0:0,0,0)..BO
Boot0006  UEFI: IP6 Qualcomm Atheros PCIe Network Controller   PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(=MASK=,0)/IPv6([::]:<->[::]:,0,0)..BO
Boot0007* UEFI: ADATA USB Flash Drive 1100   PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(2,0)/HD(1,MBR,0x4294620362,0x800,0x39cf800)..BO
What kind of efi program would start with your standard entry BOOTX64.EFI at the begin?
If you plug off all of usb drives, then Boot0007 cannot disturb your Boot0004, as it comes second.

BOOTX64.EFI is a copy of refind_x64.efi.

Default boot from HD and I did not have usb plug in when booting that boot loader.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Mar 10, 2016 12:35 am    Post subject: Reply with quote

ulenrich wrote:
khayyam wrote:
.. and what makes you think the OP is using systemd? You're just confusing the issue.

I just wanted to show the most simple system I know of, because I already thought of the OP having a very ordinary problem with directories.

ulenrich ... not that your connecting these together makes any sense, but no, all you are doing is throwing in bogus suggestions, comments, etc, and otherwise confusing the issue.

@RinCat ... please just ignore ulenrich. Your efibootmgr output look fine, do you get the same output after reboot? If so is efivarfs enabled in the kernel?

best ... khay
Back to top
View user's profile Send private message
RinCat
n00b
n00b


Joined: 09 Mar 2016
Posts: 9

PostPosted: Thu Mar 10, 2016 1:39 am    Post subject: Reply with quote

khayyam wrote:
ulenrich wrote:
khayyam wrote:
.. and what makes you think the OP is using systemd? You're just confusing the issue.

I just wanted to show the most simple system I know of, because I already thought of the OP having a very ordinary problem with directories.

ulenrich ... not that your connecting these together makes any sense, but no, all you are doing is throwing in bogus suggestions, comments, etc, and otherwise confusing the issue.

@RinCat ... please just ignore ulenrich. Your efibootmgr output look fine, do you get the same output after reboot? If so is efivarfs enabled in the kernel?

best ... khay


I had installed an EFI shell and found something interesting.

All file system drivers actually loaded, and I can see and access all my files.

But EFI system said kernel file is invalid, however, I have already enabled EFI stub in kernel. 8O
Back to top
View user's profile Send private message
RinCat
n00b
n00b


Joined: 09 Mar 2016
Posts: 9

PostPosted: Thu Mar 10, 2016 3:44 am    Post subject: Reply with quote

Finally, I found the error, rEFInd require partition GUID, not UUID.... :?

But it still not load refind_linux.conf 8O
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Mar 10, 2016 4:29 am    Post subject: Reply with quote

RinCat wrote:
But it still not load refind_linux.conf

RinCat ... I assume you've checked it for syntax errors, and that its located in the same directory as the kernel?

Code:
# print -rl /boot/efi/linux/*(.)
/boot/efi/linux/refind_linux.conf
/boot/efi/linux/vmlinuz-3.13.11-ck.efi
/boot/efi/linux/vmlinuz-4.3.6-ck.efi
# file /boot/efi/linux/refind_linux.conf
/boot/efi/linux/refind_linux.conf: ASCII text
# cat /boot/efi/linux/refind_linux.conf
"Default"  "quiet ro nopat threadirqs elevator=bfq video.use_native_backlight=1 rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-root swsusp resume=/dev/mapper/vg-swap"
"Emergency"  "quiet ro nopat threadirqs elevator=bfq video.use_native_backlight=1 rootfstype=ext4 luks enc_root=/dev/sda2 lvm root=/dev/mapper/vg-root swsusp resume=/dev/mapper/vg-swap 1"

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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