You are not logged in.

#1 2022-05-23 18:44:55

TheKingElessar
Member
Registered: 2022-05-19
Posts: 6

[SOLVED] rEFInd starting kernal: "Program has returned 14"

Hello! I'm trying to set up rEFInd with an entry for my Arch Linux installation.

My EFI partition is /dev/sdb2 with the label "EFIPart". My root partition is /dev/sdb6 with the label "ArchRootPart".

Here are my config entries:

refind.conf Arch entry (located at /boot/EFI/refind):

menuentry "Arch Linux" {
	icon	/EFI/refind/icons/os_arch.png
	volume	"EFIPart"
	loader	/vmlinuz-linux
	initrd	/initramfs-linux.img
	options	"root=LABEL=ArchRootPart rw add_efi_memmap initrd=\boot\intel-ucode.img"
	submenuentry "Boot using fallback initramfs" {
		initrd /boot/initramfs-linux-fallback.img
	}
	submenuentry "Boot to terminal" {
		add_options "systemd.unit=multi-user.target"
	}
}

refind_linux.conf contents (located at /boot/refind_linux.conf, same level as vmlinuz-linux):

"Boot using default options" "root=LABEL=ArchRootPart rw rootfstype=ext4 add_efi_memmap initrd=\boot\intel-ucode.img initrd=\boot\initramfs-linux.img"

When I boot into rEFInd, and select either the kernal or Arch entries, the screen flashes, but it returns to the rEFInd menu. SecureBoot is disabled. Here are the rEFInd logs:

Booting kernal through rEFInd:

==========Launching 'Boot vmlinuz-linux from EFIPART'==========
Getting EFI variable 'PreviousBoot' from disk
Loading file 'PreviousBoot'
Saving EFI variable 'PreviousBoot' to disk
Starting vmlinuz-linux
Using load options 'root=LABEL=ArchRootPart rw add_efi_memmap initrd=\boot\intel-ucode.img initrd=\initramfs-linux.img'
'\vmlinuz-linux' is a valid loader
Getting EFI variable 'SecureBoot' from NVRAM
Launching 'vmlinuz-linux'
Program has returned 14
Setting screen resolution and mode

Booting Arch through rEFInd:

==========Launching 'Boot Arch Linux from EFIPART'==========
Getting EFI variable 'PreviousBoot' from disk
Loading file 'PreviousBoot'
Saving EFI variable 'PreviousBoot' to disk
Starting vmlinuz-linux
Using load options 'root=LABEL=ArchRootPart rw add_efi_memmap initrd=\boot\intel-ucode.img initrd=\initramfs-linux.img'
'\vmlinuz-linux' is a valid loader
Getting EFI variable 'SecureBoot' from NVRAM
Launching 'vmlinuz-linux'
Program has returned 14
Setting screen resolution and mode

I can't find anything online about the returned code 14. Does anybody know how I can get the kernal to start correctly using rEFInd? What am I doing wrong here?

Last edited by TheKingElessar (2022-05-23 23:17:52)

Offline

#2 2022-05-23 19:02:05

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,665

Re: [SOLVED] rEFInd starting kernal: "Program has returned 14"

You should in general not rely on /dev/sdb and similar as they can and will change between boots, use persistent identifiers: https://wiki.archlinux.org/title/Persis … ice_naming

Offline

#3 2022-05-23 23:10:33

TheKingElessar
Member
Registered: 2022-05-19
Posts: 6

Re: [SOLVED] rEFInd starting kernal: "Program has returned 14"

Alright, I've updated it to use the LABEL= device naming. I've updating my original post with the new naming, but it didn't help anything—I'm still not able to boot Arch Linux from rEFInd. I imagine my config files have some error, but I can't figure out what it would be.

Offline

#4 2022-05-23 23:16:12

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] rEFInd starting kernal: "Program has returned 14"

What's the output of...

blkid

No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2022-05-23 23:17:38

TheKingElessar
Member
Registered: 2022-05-19
Posts: 6

Re: [SOLVED] rEFInd starting kernal: "Program has returned 14"

Oop, looks like I got it working!

It was a problem with my config files; the paths weren't correct.

"Boot using default options" "root=LABEL=ArchRootPart rw rootfstype=ext4 add_efi_memmap initrd=\boot\intel-ucode.img initrd=\boot\initramfs-linux.img"

should be

"Boot using default options" "root=LABEL=ArchRootPart rw rootfstype=ext4 add_efi_memmap initrd=\intel-ucode.img initrd=\initramfs-linux.img"

And

menuentry "Arch Linux" {
	icon	/EFI/refind/icons/os_arch.png
	volume	"EFIPart"
	loader	/vmlinuz-linux
	initrd	/initramfs-linux.img
	options	"root=LABEL=ArchRootPart rw add_efi_memmap initrd=\boot\intel-ucode.img"
	submenuentry "Boot using fallback initramfs" {
		initrd /boot/initramfs-linux-fallback.img
	}
	submenuentry "Boot to terminal" {
		add_options "systemd.unit=multi-user.target"
	}
}

should be

menuentry "Arch Linux" {
	icon	/EFI/refind/icons/os_arch.png
	volume	"EFIPart"
	loader	/vmlinuz-linux
	initrd	/initramfs-linux.img
	options	"root=LABEL=ArchRootPart rw add_efi_memmap initrd=\intel-ucode.img initrd=\initramfs-linux.img"
	submenuentry "Boot using fallback initramfs" {
		initrd /initramfs-linux-fallback.img
	}
	submenuentry "Boot to terminal" {
		add_options "systemd.unit=multi-user.target"
	}
}

The changes are pretty much removing the unecessary /boot/ in the paths. There's a paragraph on the Wiki saying:

initrd path is relative to the root of the file system on which the kernel resides. This could be initrd=\boot\initramfs-%v.img or, if /boot is a separate partition (e.g. the ESP), initrd=initramfs-%v.img.

And I realized I hadn't done that properly.

Offline

Board footer

Powered by FluxBB