rEFInd: How to make it automatically detect kernels?

I tried to remove systemd-boot and install rEFInd but what it looks like it happened is rEFInd boot screen comes. It presents a “boot rescue” icon (lifebouy and paddles). If I select it another boot menu appears what seems to be “systemd-boot”.

How can I completely remove systemd-boot and make rEFInd work normally as in boot into EOS directly from rEFInd boot screen?


What I did:

Creatd seperate /efi and /boot partitions. Gave them required GUIDs using gdisk.

Remove systemd-boot

# bootctl remove

Install and configure rEFInd:

$ yay -S  refind

# refind-install

$ cat /boot/refind_linux.conf 
"Boot with standard options" "root=PARTUUID=<PARTUUID> rw initrd=\\1df23bce3e1c430f8e2d21fbde2e760e\\6.10.7-arch1-1\\initrd"
"Boot to single-user mode" "root=PARTUUID=<PARTUUID> rw single initrd=\\1df23bce3e1c430f8e2d21fbde2e760e\\6.10.7-arch1-1\\initrd"
"Boot with fallback initramfs" "root=PARTUUID=<PARTUUID> rw initrd=\\1df23bce3e1c430f8e2d21fbde2e760e\\6.10.7-arch1-1\\initrd-fallback"
$ tree /efi
/efi
├── EFI
│   ├── BOOT
│   │   └── BOOTX64.EFI
│   ├── refind
│   │   ├── BOOT.CSV
│   │   ├── drivers_x64
│   │   │   └── ext4_x64.efi
│   │   ├── icons
│   │   │   ├── arrow_left.png
[...]
│   │   │   ├── vol_net.png
│   │   │   └── vol_optical.png
│   │   ├── keys
│   │   ├── refind.conf
│   │   ├── refind_x64.efi
│   │   └── vars
│   │       └── PreviousBoot
│   ├── systemd
│   │   └── systemd-bootx64.efi
│   └── tools
├── loader
│   ├── entries
│   │   ├── edk2-shell.conf
│   │   ├── eos.conf
│   │   └── windows.conf
│   ├── loader.conf
│   └── random-seed
└── System Volume Information

14 directories, 108 files

$ sudo tree /boot
/boot
├── 1df23bce3e1c430f8e2d21fbde2e760e
│   ├── 6.10.7-arch1-1
│   │   ├── initrd
│   │   ├── initrd-fallback
│   │   └── linux
│   └── 6.6.48-1-lts
│       ├── initrd
│       ├── initrd-fallback
│       └── linux
├── EFI
│   └── Linux
├── loader
│   ├── entries
│   │   ├── 1df23bce3e1c430f8e2d21fbde2e760e-6.10.7-arch1-1.conf
│   │   ├── 1df23bce3e1c430f8e2d21fbde2e760e-6.10.7-arch1-1-fallback.conf
│   │   ├── 1df23bce3e1c430f8e2d21fbde2e760e-6.6.48-1-lts.conf
│   │   └── 1df23bce3e1c430f8e2d21fbde2e760e-6.6.48-1-lts-fallback.conf
│   └── entries.srel
├── lost+found
└── refind_linux.conf

Try this suggestion: Switiching to rEFInd from systemd-boot (w/ brtfs) - #28 by Hitman_Agent47

  • Remove kernel-install-for-dracut and install dracut-hook instead.
  • Reinstall whatever kernels you have installed.
  • Check /boot to confirm the kernels and images are in there now.
  • Run refind-install to generate a new refind_linux.conf. Check the file to confirm it is correctly indicating your kernel is now in /boot.

Reboot to test this new configuration is working as expected. Once you are happy with that, you can remove the old systemd boot entries with bootctl remove and delete any kernels and initramfs images left on the EFI partition.

2 Likes

I also had to dracut --regenerate-all otherwise boot failed.

Otherwise worked absolutely.

You don’t know for how many days I am searching the internet and scratching my head. Thank you!

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.