Skip to content

My rEFInd config is a mess, please advice

1 / 2
Not downloaded yet
Not downloaded yet

I have both linux and linux-lts installed on my system. I'm currently using rEFInd as bootloader which was installed by running:

refind-install

/boot/EFI/refind/refind.conf:

timeout 10
hideui arrows hints
extra_kernel_version_strings linux-lts,linux
include refind-theme-regular/theme.conf

/boot/refind/refind_linux.conf:

"Arch Linux" "zfs=bootfs resume=/dev/nvme0n1p2 quiet rw initrd=initramfs-linux.img"
"Arch Linux LTS" "zfs=bootfs resume=/dev/nvme0n1p2 quiet rw initrd=initramfs-linux-lts.img"

ls /boot:

initramfs-linux-fallback.img
initramfs-linux-lts-fallback.img
initramfs-linux-lts.img
initramfs-linux.img
refind_linux.conf
vmlinuz-linux
vmlinuz-linux-lts
vmlinuz-linux.png

At boot, the default entry is vmlinuz-linux-lts. See screenshot 1. Why isn't it vmlinuz-linux? I last booted with regular kernel if that matters. Plus, its boot parameters are those from Arch Linux (first line in /boot/refind/refind_linux.conf) and as a result, the system won't boot (kernel panic) since it uses initrd=initramfs-linux.img. Using initrd=initramfs-linux-lts.img instead works.

When I open boot options for vmlinuz-linux-lts by pressing TAB or F2, here's what I get: screenshot 2

  1. First entry (Arch Linux) doesn't boot (kernel panic)
  2. Second entry (Arch Linux LTS) works fine, boots with linux-lts
  3. Third entry (vmlinuz-linux) works fine, boots with linux
  4. Fourth entry (vmlinuz-linux-lts) doesn't boot (kernel panic)

First/third and second/fourth entries have the exact same boot parameters. Why does one allow me to boot and the other doesn't?

In a nutshell, it's a mess.

I'd like to start clean and achieve the following:

  • Remove duplicates (only Arch Linux and Arch Linux LTS entries)
  • Default set to linux kernel
  • Being able to press TAB or F2 to alternatively boot with linux-lts

I tried to create manual entries for both linux and linux-lts instead, but I probably made a mistake since no entries are properly detected.

/boot/EFI/refind/refind.conf:

timeout 10
hideui arrows hints
extra_kernel_version_strings linux-lts,linux
scanfor internal,external,optical,manual
include refind-theme-regular/theme.conf

Entries:

menuentry "Arch Linux" {
    icon     /boot/EFI/refind/refind-theme-regular/icons/128-48/os_arch.png
    loader   vmlinuz-linux
    initrd   /boot/initramfs-linux.img
    options  "zfs=bootfs resume=/dev/nvme0n1p2 quiet rw"
    submenuentry "Boot fallback initramfs" {
        initrd /boot/initramfs-linux-fallback.img
    }
}
menuentry "Arch Linux LTS" {
    icon     /boot/EFI/refind/refind-theme-regular/icons/128-48/os_arch.png
    loader   vmlinuz-linux-lts
    initrd   /boot/initramfs-linux-lts.img
    options  "zfs=bootfs resume=/dev/nvme0n1p2 quiet rw"
    submenuentry "Boot fallback initramfs" {
        initrd /boot/initramfs-linux-lts-fallback.img
    }
}

Any idea? Thanks.

1 points3 comments
Open on Reddit
About this post
Posted
Archived
Score
1 · 100% up
Kind
Gallery · 2 files
ID
fuzzyl

Author

19
posts
126
comments
8
media
View profile

4 comments

With extra_kernel_version strings you have to use %v as a placeholder for your kernel version string. Every line then applies to both linux and linux-lts.

"Arch Linux" "zfs=bootfs resume=/dev/nvme0n1p2 quiet rw initrd=initramfs-%v.img"

Manual entries should work, too. Refind has a fairly comprehensive manual https://www.rodsbooks.com/refind/configfile.html where you can see all the options. I suspect either you are missing a volume key or your paths are wrong (without /boot).

3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.