You are not logged in.

#1 2022-12-13 10:36:46

mjbswift
Member
Registered: 2022-12-13
Posts: 6

System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

I'm having problems with booting a fresh installation. This is on a recent Thinkpad X31 at first I thought it was a problem with the security key in the bios, but after working out the kinks in that I'm able to boot the live-USB, just not the system on the hard drive.

When I start the machine it just goes back to the bios boot menu so I'm leaning to this being an issue with the boot manager setup. Not sure what the problem is so I'm hoping someone here is able to help me figure that out...

I went with rEFInd as it looks quite straight forward. The disk is partitioned so:
/dev/nvme0n1p1 512M EFI System (fat32)
/dev/nvme0n1p2 20G Linux swap
/dev/nvme0n1p3 456.4G Linux filesystem (ext4)

On the ESP I have:

  • initramfs-linux.img

  • initramfs-linux-fallback.img

  • vmlinuz-linux

as well as the Intel microcode:

  • intel-ucode.img

the rEFInd configuration file:

  • refind_linux.conf

and the EFI directory:

  • EFI

I modified the refind_linux.conf file based on the example given on the wiki:

/boot/refind_linux.conf wrote:

"Boot with standard options (initramfs-linux)" "root=PARTUUID=22B6-F8EF  rw add_efi_memmap initrd=intel-ucode.img initrd=initramfs-linux.img"
"Boot with standard options (initramfs-%v   )" "root=PARTUUID=22B6-F8EF  rw add_efi_memmap initrd=intel-ucode.img initrd=initramfs-%v.img"
"Boot with standard options (both              )" "root=PARTUUID=22B6-F8EF  rw add_efi_memmap initrd=intel-ucode.img initrd=initramfs-%v.img initrd=initramfs-linux.img"
"Boot to insgle user mode" "root=PARTUUID=22B6-F8EF rw add_efi_memmap initrd=intel-ucode.img initrd=initramfs-%v.img single"
"Boot with minimal options" "ro root=/dev/nvme0n1p3"

where 22B6-F8EF is the partition id for the ESP. At first I had PARTUUID set to the id for the root partition (/dev/nvme0n1p3) because of the settings in the default generated config file.

Can anyone give me the definitive answer where PARTUUID should point to? The ESP, the partition to which / mounts, or even the disk identifier?

In /boot/EFI there are two further directories, refind and tools. The latter is empty but refind/ contains:

  • BOOT.CSV

  • bootx64.efi

  • refind_x64.efi

the config file:

  • refind.conf

and a number of directories:

  • drivers_x64 (contains ext4_x64.efi)

  • icons

  • keys (empty)

A few questions related to those files:
A. Are refind_64.efi and bootx64.efi likely the same file, just with different names for autodetection?

B. Are these .efi files the actual boot manager?

C. Do I need to rename BOOT.CSV to match this beeing /boot/EFI/refind/ as opposed to /boot/EFI/BOOT/?

D. What, exactly, is the scope for the two config files (/boot/EFI/refind_linux.conf and /boot/EFI/refind/refind.conf)?

Hoping someone can clarify this for me so that I can fix the remainig issues.

Thanks,
Martin

Offline

#2 2022-12-13 11:18:23

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

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

Your root=PARTUUID= should be pointing to your root (/) partition's PARTUUID  and not your /boot partition which is the thing that sticks out the most here. Did you also add the "extra kernel version strings" as specified earlier in the section? i.e. adjusted refind.conf with

extra_kernel_version_strings linux-hardened,linux-zen,linux-lts,linux

(... on a standard setup the last linux is the most relevant here if you only intend to boot the linux kernel, but including the others should not relevantly hurt)

For the other questions:

  1. Yes, bootx64.efi is the fallback name that a given UEFI must boot even if no NVRAM entries exist. 

  2. Yes. They are executables that your mainboard's UEFI implementation can boot before anything else

  3. Not sure where that's from, but most likely you don't need to touch that

  4. refind.conf is the general configuration file of the boot loader itself, refind_linux.conf is the special additional file specifically for linux entries, refind is a general purpose boot loader, it doesn't boot just linux, refind_linux.conf is only relevant for linux kernels (and  not e.g. for a Windows or Mac boot loader).

Last edited by V1del (2022-12-13 11:21:34)

Offline

#3 2022-12-13 12:46:45

mjbswift
Member
Registered: 2022-12-13
Posts: 6

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

V1del wrote:

Your root=PARTUUID= should be pointing to your root (/) partition's PARTUUID  and not your /boot partition which is the thing that sticks out the most here.

Thanks!

V1del wrote:

Did you also add the "extra kernel version strings" as specified earlier in the section? i.e. adjusted refind.conf with

extra_kernel_version_strings linux-hardened,linux-zen,linux-lts,linux

(... on a standard setup the last linux is the most relevant here if you only intend to boot the linux kernel, but including the others should not relevantly hurt)

No, I'd misunderstood the guide and interpreted it as optional whether to place the parameters in /boot/EFI/refind_linux.conf or /boot/EFI/refind/refind.conf.

I've now uncommented the extra kernel version strings line in the latter and added the linux-hardened and linux-zen options (though I'll just be running fairly plain kernels with minimal configs).

Still, with those changes, the bios doesn't seem to be able to find the boot manager on the hard drive...

Other questions:

V1del wrote:

A. Yes, bootx64.efi is the fallback name that a given UEFI must boot even if no NVRAM entries exist.

Thanks.

V1del wrote:

B. Yes. They are executables that your mainboard's UEFI implementation can boot before anything else

OK, so the problem seems to be that those aren't being detected or run (correctly). Should the UEFI implementation (this is part of the bios, right?) just know to look in esp/EFI/ for something like refind_x64.efi, or is there something needed to point it to the right direction?

V1del wrote:

C. Not sure where that's from, but most likely you don't need to touch that

OK, cheers.

V1del wrote:

D. refind.conf is the general configuration file of the boot loader itself, refind_linux.conf is the special additional file specifically for linux entries, refind is a general purpose boot loader, it doesn't boot just linux, refind_linux.conf is only relevant for linux kernels (and  not e.g. for a Windows or Mac boot loader).

OK, I figured as much, but since there were some stanzas in the refind.conf I wasn't sure what the overlap was and whether one was overriding the other.

I'm struggling quite a bit with the lack of error messages (and my unfamiliarity with the boot process). Reading through refind.conf I found the log_level option and set it to 4, in the hope that rEFInd was just failing early on. But, alas, no logs in /boot/, /boot/EFI, or /boot/EFI/refind. Any idea where to look next?

-- Martin

PS. When shutting the live-USB down I noticed it complains that:

[FAILED] Failed unmounting /run/archiso/copytoram

I just assumed that this was irrelevant as it refers to the live-USB and it starts up without problems, but I'm so lost that I'm looking at every slightest hint of something being off...

Offline

#4 2022-12-13 14:04:56

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

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

IF you don't get to the loader at all, what's your output of

efibootmgr -uv

can be from the live disk? Which entry from the UEFI's own bootloader are you booting?

Offline

#5 2022-12-13 15:09:33

mjbswift
Member
Registered: 2022-12-13
Posts: 6

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

V1del wrote:

IF you don't get to the loader at all, what's your output of

efibootmgr -uv

can be from the live disk? Which entry from the UEFI's own bootloader are you booting?

Below are the outputs for efibootmgr with and without the flags (for legibility). I'm booting (or, trying to) from Boot001E* NVMe0.

I've disabled all entries in the bios so that now only 001F (USB HD) and 001E (NVMe0) show up (in that order) when selecting the boot menu in bios.

EDIT: Just went back into bios, enabled all options, ordered 001F and 001E to be at the top and then disabled the rest again, and now the boot order is: 001F,001E,001C,001D,0020,0021,0022,0001,0023,0024. The asterisks are unchanged.

BootCurrent: 001F
Timeout: 0 seconds
BootOrder: 001C,001D,001F,001E,0020,0021,0022,0001,0023,0024
Boot0001  Windows Boot Manager	HD(1,GPT,83afd6ed-78b8-432d-85ba-251f770fe147,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000069000100000010000000040000007fff0400
Boot0010  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu	FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen	FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics	FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Asset Information	FvFile(da465b87-a26f-4c12-b78a-0361428fa026)
Boot0015  Regulatory Information	FvFile(478c92a0-2622-42b7-a65d-5894169e4d24)
Boot0016  ThinkShield secure wipe	FvFile(3593a0d5-bd52-43a0-808e-cbff5ece2477)
Boot0017  ThinkShield Passwordless Power-On Device Manager	FvFile(08448b41-7f83-49be-82a7-0e84790ab133)
Boot0018  Wi-Fi Configuration	FvFile(d3aaff0f-cb22-4792-896c-802c2e9383ba)2d004100700070000000
Boot0019  Intel(R) MEBx	FvFile(29a70110-7762-4211-ae88-fab19b7665be)
Boot001A  Startup Interrupt Menu	FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot001B  Rescue and Recovery	FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot001C  USB CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot001D  USB FDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot001E* NVMe0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot001F* USB HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot0020  PXE BOOT	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot0021  LENOVO CLOUD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri(https://download.lenovo.com/pccbbs/cdeploy/efi/boot.efi)
Boot0022  ON-PREMISE	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri()
Boot0023  Other CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35400)
Boot0024  Other HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ca88c2349e7ae947beeb43038a5aeae700)
Boot0025* IDER BOOT CDROM	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,1)
Boot0026* IDER BOOT Floppy	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,0)
Boot0027* ATA HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0028* ATAPI CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
BootCurrent: 001F
Timeout: 0 seconds
BootOrder: 001C,001D,001F,001E,0020,0021,0022,0001,0023,0024
Boot0001  Windows Boot Manager	HD(1,GPT,83afd6ed-78b8-432d-85ba-251f770fe147,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)䥗䑎坏S
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 20 08 00 00 00 00 00 ed d6 af 83 b8 78 2d 43 85 ba 25 1f 77 0f e1 47 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 69 00 63 00 72 00 6f 00 73 00 6f 00 66 00 74 00 5c 00 42 00 6f 00 6f 00 74 00 5c 00 62 00 6f 00 6f 00 74 00 6d 00 67 00 66 00 77 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
    data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 69 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00
Boot0010  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
      dp: 04 06 14 00 66 8b 1c 72 6c 42 86 4e 8e 99 34 57 c4 6a b0 b9 / 7f ff 04 00
Boot0011  Boot Menu	FvFile(126a762d-5758-4fca-8531-201a7f57f850)
      dp: 04 06 14 00 2d 76 6a 12 58 57 ca 4f 85 31 20 1a 7f 57 f8 50 / 7f ff 04 00
Boot0012  Diagnostic Splash Screen	FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
      dp: 04 06 14 00 a6 d9 d8 a7 b0 6a eb 4a ad 9d 16 3e 59 a7 a3 80 / 7f ff 04 00
Boot0013  Lenovo Diagnostics	FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
      dp: 04 06 14 00 5b 61 7e 3f 45 0d 80 4f 88 dc 26 b2 34 95 85 60 / 7f ff 04 00
Boot0014  Asset Information	FvFile(da465b87-a26f-4c12-b78a-0361428fa026)
      dp: 04 06 14 00 87 5b 46 da 6f a2 12 4c b7 8a 03 61 42 8f a0 26 / 7f ff 04 00
Boot0015  Regulatory Information	FvFile(478c92a0-2622-42b7-a65d-5894169e4d24)
      dp: 04 06 14 00 a0 92 8c 47 22 26 b7 42 a6 5d 58 94 16 9e 4d 24 / 7f ff 04 00
Boot0016  ThinkShield secure wipe	FvFile(3593a0d5-bd52-43a0-808e-cbff5ece2477)
      dp: 04 06 14 00 d5 a0 93 35 52 bd a0 43 80 8e cb ff 5e ce 24 77 / 7f ff 04 00
Boot0017  ThinkShield Passwordless Power-On Device Manager	FvFile(08448b41-7f83-49be-82a7-0e84790ab133)
      dp: 04 06 14 00 41 8b 44 08 83 7f be 49 82 a7 0e 84 79 0a b1 33 / 7f ff 04 00
Boot0018  Wi-Fi Configuration	FvFile(d3aaff0f-cb22-4792-896c-802c2e9383ba)-App
      dp: 04 06 14 00 0f ff aa d3 22 cb 92 47 89 6c 80 2c 2e 93 83 ba / 7f ff 04 00
    data: 2d 00 41 00 70 00 70 00 00 00
Boot0019  Intel(R) MEBx	FvFile(29a70110-7762-4211-ae88-fab19b7665be)
      dp: 04 06 14 00 10 01 a7 29 62 77 11 42 ae 88 fa b1 9b 76 65 be / 7f ff 04 00
Boot001A  Startup Interrupt Menu	FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
      dp: 04 06 14 00 f4 e6 6e f4 85 47 a3 43 92 3d 7f 78 6c 3c 84 79 / 7f ff 04 00
Boot001B  Rescue and Recovery	FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
      dp: 04 06 14 00 60 3f 5d 66 3e ad ad 4c 8e 26 db 46 ee e9 f1 b5 / 7f ff 04 00
Boot001C  USB CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
      dp: 03 0a 24 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b 86 70 12 96 aa 5a 78 48 b6 6c d4 9d d3 ba 6a 55 / 7f ff 04 00
Boot001D  USB FDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
      dp: 03 0a 24 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b 6f f0 15 a2 88 30 b5 43 a8 b8 64 10 09 46 1e 49 / 7f ff 04 00
Boot001E* NVMe0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
      dp: 03 0a 25 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b 00 1c 19 99 32 d9 4c 4e ae 9a a0 b6 e9 8e b8 a4 00 / 7f ff 04 00
Boot001F* USB HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
      dp: 03 0a 24 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b 33 e8 21 aa af 33 bc 47 89 bd 41 9f 88 c5 08 03 / 7f ff 04 00
Boot0020  PXE BOOT	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
      dp: 03 0a 24 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b 78 a8 4a af 2b 2a fc 4e a7 9c f5 cc 8f 3d 38 03 / 7f ff 04 00
Boot0021  LENOVO CLOUD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri(https://download.lenovo.com/pccbbs/cdeploy/efi/boot.efi)
      dp: 03 0a 24 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b ad 38 cc bb f7 ed f0 4d 95 9c f4 2a a7 4d 36 50 / 03 18 3b 00 68 74 74 70 73 3a 2f 2f 64 6f 77 6e 6c 6f 61 64 2e 6c 65 6e 6f 76 6f 2e 63 6f 6d 2f 70 63 63 62 62 73 2f 63 64 65 70 6c 6f 79 2f 65 66 69 2f 62 6f 6f 74 2e 65 66 69 / 7f ff 04 00
Boot0022  ON-PREMISE	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri()
      dp: 03 0a 24 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b ad 38 cc bb f7 ed f0 4d 95 9c f4 2a a7 4d 36 50 / 03 18 04 00 / 7f ff 04 00
Boot0023  Other CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35400)
      dp: 03 0a 25 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b ae a2 09 0a df de 21 4e 8b 3a 5e 47 18 56 a3 54 00 / 7f ff 04 00
Boot0024  Other HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ca88c2349e7ae947beeb43038a5aeae700)
      dp: 03 0a 25 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b ca 88 c2 34 9e 7a e9 47 be eb 43 03 8a 5a ea e7 00 / 7f ff 04 00
Boot0025* IDER BOOT CDROM	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,1)
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 14 / 03 05 06 00 0b 01 / 7f ff 04 00
Boot0026* IDER BOOT Floppy	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,0)
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 14 / 03 05 06 00 0b 00 / 7f ff 04 00
Boot0027* ATA HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
      dp: 03 0a 24 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b 91 af 62 59 56 44 9f 41 a7 b9 1f 4f 89 2a b0 f6 / 7f ff 04 00
Boot0028* ATAPI CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
      dp: 03 0a 24 00 d2 38 78 bc 82 0f 60 4d 83 16 c0 68 ee 79 d2 5b ae a2 09 0a df de 21 4e 8b 3a 5e 47 18 56 a3 54 / 7f ff 04 00

Last edited by mjbswift (2022-12-13 15:18:56)

Offline

#6 2022-12-13 15:14:59

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,559

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

Unless you installed refind to the fallback path, Boot001E isn't going to work. How did you install refind?

Offline

#7 2022-12-13 15:35:50

mjbswift
Member
Registered: 2022-12-13
Posts: 6

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

Scimmia wrote:

Unless you installed refind to the fallback path, Boot001E isn't going to work. How did you install refind?

First with refind-install, then when that didn't work, I reformatted, installed with --usedefault (as per "This is helpful for bootable USB flash drives"). Then I went through the manual install to make sure all files were in the right place. Reading some more about the file locations and naming (refind vs BOOT, etc.) I figured that "for bootable USB flash drives" meant that this for making flash drives, not booting from them.

So I ran refind-install again and tried to make sure I had the files mentioned in the post at the top.

When you say that Boot001E isn't going to work unless I install rEFInd to the fallback path, do you mean that I need to replace esp/EFI/refind/ with esp/EFI/BOOT/?

Offline

#8 2022-12-14 01:54:33

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

mjbswift wrote:

I figured that "for bootable USB flash drives" meant that this for making flash drives, not booting from them.

I think it means making such devices to boot from them. In any case, you're not dealing with a USB flash drive in this case?

mjbswift wrote:

When you say that Boot001E isn't going to work unless I install rEFInd to the fallback path, do you mean that I need to replace esp/EFI/refind/ with esp/EFI/BOOT/?

No. Don't do that. Are the two efi files identical?

$ diff /boot/EFI/refind/{bootx64,refind_x64}.efi
$ echo $?

If they are (you get no output from the first command and the second returns 0), you could move bootx64.efi to

/boot/EFI/boot/bootx64.efi 

which is the fallback boot loader position. This will not likely get you the rEFInd interface you expect, but it will likely enable you to boot. It will probably show another rEFInd entry in the menu and choosing that will get you the standard interface. From there, you can choose one of the boot entries you've configured.

However, this is really for when your boot entries get fried (e.g. when you update your machine's firmware). It will work, but it is not very elegant. To add a boot entry you can use something like

# efibootmgr --create --gpt --disk <DISK> --part <N> --write-signature --label "Arch rEFInd" --loader '\EFI\refind\refind_x64.efi'

where <DISK> points to the DISK your ESP is on and <N> is the partition number. For example, on my system, I'd use /dev/nvme0n1 in place of <DISK> and 1 in place of <N> because my EFI partition is  /dev/nvme0n1p1. Note that p1 is NOT included in the value you use for <DISK>. It is easiest to boot with the fallback and then add the proper boot entry. Otherwise, arch-chroot into your system before executing the efibootmgr command.

Note that the guide you read is correct: refind_linux.conf is optional. I do not have it on my ESP. However, if you don't use it, you need to provide complete entries in either refind.conf or another configuration file which refind.conf includes. I put my entries into a custom configuration file and simply include it from refind.conf. This gives you more fine-grained control, but it is a bit more complex to set up.

I don't know what the refind-install command does as I've never used it, but configuration is really just a matter of adding the boot entry with efibootmgr and putting the files where they belong.

Edit: Based on the information in your earlier post, the command you'll want is

# efibootmgr --create --gpt --disk /dev/nvme0n1 --part 1 --write-signature --label "Arch rEFInd" --loader '\EFI\refind\refind_x64.efi'

Last edited by cfr (2022-12-14 02:05:27)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2022-12-14 08:32:29

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

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

There is of course always a chance that the EFI firmware is allergic to NVRAM changes outside of itself, so you might indeed have to opt for the fallback. But maybe first check whether you do not have an option in your EFI to explicitly add custom entries.  From what I've seen/heard thinkpads should generally be unproblematic here.

Offline

#10 2022-12-14 10:20:05

mjbswift
Member
Registered: 2022-12-13
Posts: 6

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

This is definitly moving in the right direction!

cfr wrote:
mjbswift wrote:

I figured that "for bootable USB flash drives" meant that this for making flash drives, not booting from them.

I think it means making such devices to boot from them. In any case, you're not dealing with a USB flash drive in this case?

Only in that I was installing from a live-USB.

cfr wrote:
mjbswift wrote:

When you say that Boot001E isn't going to work unless I install rEFInd to the fallback path, do you mean that I need to replace esp/EFI/refind/ with esp/EFI/BOOT/?

No. Don't do that. Are the two efi files identical?

Yes, they are.

cfr wrote:

If they are (you get no output from the first command and the second returns 0), you could move bootx64.efi to

/boot/EFI/boot/bootx64.efi 

which is the fallback boot loader position. This will not likely get you the rEFInd interface you expect, but it will likely enable you to boot. It will probably show another rEFInd entry in the menu and choosing that will get you the standard interface. From there, you can choose one of the boot entries you've configured.

Did this and, yes, I'm now able to boot!

I get a text based interface with the options:

rEFInd - Main Menu

Boot vmlinuz-linux from 510 MiB FAT volume
Boot EFI\refind\refind_x64.efi from 510 MiB FAT volume
Boot Fallback boot loader from ARHCISO_EFI
About rEFInd
Manage Hidden Tags Menu
Shut Down Computer
Reboot Computer
Reboot to Computer Setup Utility

Selecting the first boots the newly installed system. Selecting the second opens up a graphical interface which lists vmlinuz-linux.img along with some options below.

So, yes, moving in the right direction. Is my understanding correct that the the boot process is still unable to access /EFI/refind/refind_x64.efi which then reads refind_linux.conf and refind.conf and lists the kernels and options defined there?

cfr wrote:

I don't know what the refind-install command does as I've never used it, but configuration is really just a matter of adding the boot entry with efibootmgr and putting the files where they belong.

Edit: Based on the information in your earlier post, the command you'll want is

# efibootmgr --create --gpt --disk /dev/nvme0n1 --part 1 --write-signature --label "Arch rEFInd" --loader '\EFI\refind\refind_x64.efi'

OK, I included the part number in the disk like in the efibootmgr instructions on the wiki. That also has the --unicode flag but lacking the --gpt, and uses forward slashes.

I tried the version you suggested above but that didn't resolve the issue. Tried a couple more and was going to experiment with different versions but found that while efibootmgr creates an entry called Boot0000, this is then lost on reboot.

So I'm wondering, what exactly does "efibootmgr -c" do? Modify the boot order in the bios? And if so, is the bios then maybe just erasing my configuration upon startup?

Last edited by mjbswift (2022-12-14 10:22:32)

Offline

#11 2022-12-14 10:36:44

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

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

mjbswift wrote:

So I'm wondering, what exactly does "efibootmgr -c" do? Modify the boot order in the bios? And if so, is the bios then maybe just erasing my configuration upon startup?

Pretty much yes, that exact invocation should create a new entry pointing to the location of the refind.efi on the ESP, however some UEFIs you can only add custom entries/rearrange from within their own menus, check whether there's any option to add a custom "proper" entry. The one you are using now is a fallback that's primarily used for removable USB devices (... and setting this location will again lead to a contention battle with Windows - an issue UEFI solves under normal circumstances )

Last edited by V1del (2022-12-14 10:37:24)

Offline

#12 2022-12-14 11:56:26

hans456
Member
Registered: 2022-07-15
Posts: 6

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

I know I am late to the party, but this may help others: Some BIOS have a fastboot option. This may cause a Linux system to not see the nvme drive upon boot. Turning it off may help.

Offline

#13 2022-12-14 17:07:13

mjbswift
Member
Registered: 2022-12-13
Posts: 6

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

V1del wrote:
mjbswift wrote:

So I'm wondering, what exactly does "efibootmgr -c" do? Modify the boot order in the bios? And if so, is the bios then maybe just erasing my configuration upon startup?

Pretty much yes, that exact invocation should create a new entry pointing to the location of the refind.efi on the ESP, however some UEFIs you can only add custom entries/rearrange from within their own menus, check whether there's any option to add a custom "proper" entry. The one you are using now is a fallback that's primarily used for removable USB devices (... and setting this location will again lead to a contention battle with Windows - an issue UEFI solves under normal circumstances )

You #$%"$% glorious bastards ... we're home!

Yes, this turned out to be the Boot Order Lock which isn't a boot order lock but a Feel Free To Change The Boot Order But Try To Remove Or Add Entries And I'll Erase All Your Work You Silly Git Lock.

Booting now shows the fancy rEFInd interface and that starts up vmlinuz-linux without a hitch. There are still a few things I'm not quite sure of, but that's for another time when I have a bit more time to read up on rEFInd and its config options.

For now, I'm happy to say the issue has been resolved.

All of you: Many thanks for all your input and assistance!

hans456 wrote:

I know I am late to the party, but this may help others: Some BIOS have a fastboot option. This may cause a Linux system to not see the nvme drive upon boot. Turning it off may help.

Searching for this on-line did indeed turn up situations where this had been a problem. On my machine, this is called Boot Mode and there is a choice between Diagnostic and Quick. Both worked in my case but as you note, it may help others. Thanks for the suggestion!

Offline

#14 2022-12-14 17:24:32

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: System won't boot on a fresh installation [Thinkpad X13 - rEFInd]

mjbswift wrote:

I get a text based interface with the options:

rEFInd - Main Menu

Boot vmlinuz-linux from 510 MiB FAT volume
Boot EFI\refind\refind_x64.efi from 510 MiB FAT volume
Boot Fallback boot loader from ARHCISO_EFI
About rEFInd
Manage Hidden Tags Menu
Shut Down Computer
Reboot Computer
Reboot to Computer Setup Utility

Selecting the first boots the newly installed system. Selecting the second opens up a graphical interface which lists vmlinuz-linux.img along with some options below.

So, yes, moving in the right direction. Is my understanding correct that the the boot process is still unable to access /EFI/refind/refind_x64.efi which then reads refind_linux.conf and refind.conf and lists the kernels and options defined there?

If you choose the first option from the first menu, then, yes, you're not getting refind-linux.conf or refind.conf read. So any kernel parameters you add won't get used. On my system, that would prevent booting because I have an encrypted root. Even if it boots, there may be parameters you want for smooth operation.

If you choose the second option from the first menu and then choose what to boot from the graphical menu, refind_linux.conf and refind.conf will be read and any kernel parameters you've configured will get used. On my system, I can boot that way even though those parameters are crucial in my case.

So if you need to boot from the fallback position, I'd recommend going to the second menu and choosing your boot entry from there. That way you're using the entries as you configure them and will automatically do the right thing if you need to add kernel parameters for troubleshooting or something at some point.

You might also check for firmware updates. (I can't remember if this was mentioned earlier in the thread - apologies if so.) Lenovo generally seems to support thinkpads through the fwupd facility in Linux now, even if the machine isn't part of their certified-for-linux programme - even, in fact, if that programme didn't exist when the machine was produced. If there isn't an update or the update doesn't fix it, consider reporting the bug. I think it is worth doing this even for non-certified thinkpads, as individuals still seem to take the bugs seriously and that's sometimes enough.

Edit: adjusted in light of OP's success while writing the original post wink.

Last edited by cfr (2022-12-14 17:31:34)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB