#rEFInd "Invalid loader file!"

112 messages · Page 1 of 1 (latest)

compact goblet
#

I’m trying to set up rEFInd to act as a boot manager for an Arch/Windows 11 dual-boot (haven’t gotten to the dual-booting part yet, still stuck on making rEFInd work with only arch).
I’ve gotten to the point where Arch shows up as an option In rEFInd, but attempting to boot it results in

Invalid loader file!
Error: Not Found while loading vmlinuz-linux
``` (see attached)

I have also attached pictures of the Arch rEFInd stanza, my partitions layout, and my `/boot` directory. Note that the UUID is that of the `lv_root` partition.

Any help would be greatly appreciated.
compact goblet
#

Not sure how important this is but here’s /boot/refind_linux.conf as well

#

auto-generated by refind-install

#

Though I can’t figure out which partition the resume uuid belongs to

compact goblet
#

removed the resume arguments, still getting the same error

compact goblet
#

removing the microcode initrd didn’t help either

compact goblet
#

Removed the submenuentries and added a volume label, same error

compact goblet
#

My current stanza is

menuentry "Arch Linux" {
    icon     /EFI/refind/icons/os_arch.png
    volume   "Arch Linux Root"
    loader   /boot/vmlinuz-linux
    initrd   /boot/initramfs-linux.img
    options  "root=UUID=2c1f972f-b6ba-4384-8232-ed6f802eb01e rw add_efi_memmap"
}
compact goblet
#

Trying a full system upgrade from within arch-chroot, hopefully it helps

compact goblet
#

Doesn’t look like it fixed anything

spice helm
#

ah

#

is /boot in root or your boot partition

#

@compact goblet

compact goblet
#

In my root partition

#

lv_root

spice helm
#

rEFInd (and all other boot loaders) are confined to your boot partition, and therefore, the / directory is the root of your boot partition, not your root partition.

#

this means that you need to remove the /boot prefix from all of your file inputs

compact goblet
#

Are the loader and initrd arguments not relative to the specified volume?

spice helm
#

No, they are not.

#

the "specified volume" is just a kernel perameter

#

it's not even taken into consideration until the kernel is started

compact goblet
#

Oh

#

Here’s my /boot directory and the output of lsblk -f btw

spice helm
#

I just misunderstood what you meant

compact goblet
#

Ah

compact goblet
spice helm
#

I'll let you figure that out. I will simply reiterate that the boot loader, rEFInd, is confined to your boot partition. This means that / is the root of your boot partition, not your lv_root partition.

#

(just realized that your boot partition doesn't have a label lol)

compact goblet
#

The wiki seems to say that / is the root of the partition specified by volume, which should be my lv_root partition, though

#

And since /boot is just a directory on the lv_root partition, shouldn’t /boot/vmlinuz-linux work fine?

#

Not really sure how else I could access vmlinuz-linux

#

I have the correct ext4 driver in esp/RFI/refind/drivers_x64

compact goblet
#

Should that change anything?

spice helm
#

uhm

#

no

spice helm
#

volume is your boot partition

#

do you know what ESP stands for?

compact goblet
#

EFI something partition I assume

#

system partition

spice helm
#

yeah

#

it's a descriptive term

#

the label of your partition doesn't really affect much

compact goblet
#

Yeah that’s what I assumed

spice helm
#

your boot partition contains your efi

compact goblet
#

When you say boot partition is that just the ESP?

spice helm
#

and therefore is your ESP

compact goblet
#

ok

spice helm
compact goblet
#

It isn’t

#

it’s mounted at /efi

#

/boot is just a directory on my root partition

spice helm
#

uh

#

that's weird

#

that's not going to work properly

#

can you show me the contents of /efi with tree -d

compact goblet
spice helm
#

okay

#

so

compact goblet
#

Should I copy over the contents of /boot to it

spice helm
#

you should really start mounting your ESP on /boot and move your EFI directory to be a subdirectory of /boot

compact goblet
#

And then change its mount point to /boot?

#

I see

spice helm
#

that way you have a place to put files that aren't necessarily a part of the EFI while still being on the same partition.

#

note that this is going to require editing your fstab - here be dragons!

compact goblet
#

Is just adding it to fstab enough?

spice helm
compact goblet
#

It’s not mounted by default as of right now

spice helm
compact goblet
#

correct

spice helm
#

you really didn't follow the install guide

#

lmao

compact goblet
#

Does this seem correct?

#

changed my boot stanza to this

#

Gonna reboot and see if it works now

#

I seem to have 3 options in refind now?

#

The Arch symbol works!

spice helm
#

sorry I had to go for a second

#

is booting working for you?

compact goblet
#

Yes! Thank you so much for your help

spice helm
#

np

compact goblet
#

Oh is one of them auto-detected and then the other comes from the stanza?

spice helm
#

if you want to get rid of the auto detected one add dont_scan_dirs / anywhere in your config

compact goblet
#

Ok thanks

#

gonna try to install windows 11 now, hopefully it doesn’t break my efi again

#

Making an ESP backup just in case

spice helm
#

@compact goblet

#

if you ever decide to theme rEFInd you're probably going to run into some issues

#

I recommend using that fork for now

#

I can help you with compilation if you end up needing it

spice helm
#

all you have to do is grab the Microsoft directory from the ESP it fucks up and move it to your backup

compact goblet
#

and then move the modified backup back onto the partition?

spice helm
#

the Microsoft directory should be located in /boot/EFI

compact goblet
#

I see

spice helm
#

rEFInd does all the hard work for you if you can set it up properly

compact goblet
#

Will windows then be auto-detected by refind?

spice helm
#

yes

spice helm
#

I'm 99% sure that isn't recursive, and even if it is, rEFInd checks regardless.

compact goblet
#

the dual-boot seems to be working without issues

#

didn't even have to change anything about the efi after installing windows

#

thanks again for your help