You are not logged in.

#1 2022-08-31 18:26:45

Algorhythm
Member
Registered: 2022-06-09
Posts: 9

[Solved] MSI UEFI FW won't boot into Arch automatically

After taking my CMOS battery out to move overseas, I can boot into arch my manually selecting the right boot option, but I can't get the UEFI firmware to recognise the hard disk as UEFI bootable to boot into it automatically.

My system:
MSI B350 PC MATE with Ryzen 5 1600
SATA SSD (/dev/sda1) with my old windows install I'm keeping around (this previously caused no issues when I first installed Arch, boot worked just fine)
NVME M.2 SSD (/dev/nvme0n1) with the arch install in it:
output of 'fdisk -l':

Disk /dev/sda: 111.79 GiB, 120034123776 bytes, 234441648 sectors
Disk model: KINGSTON SV300S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: DDC6323C-C07D-11EC-9135-99541708DC1C

Device         Start       End   Sectors   Size Type
/dev/sda1       2048    206847    204800   100M EFI System
/dev/sda2     206848 233389633 233182786 111.2G Microsoft basic data
/dev/sda3  233390080 234436607   1046528   511M Windows recovery environment


Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: Samsung SSD 970 EVO Plus 1TB            
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9972F422-3FC1-DE40-96D8-623B0F5EC3E8

Device           Start        End    Sectors  Size Type
/dev/nvme0n1p1    2048    1128447    1126400  550M EFI System
/dev/nvme0n1p2 1128448    5322751    4194304    2G Linux swap
/dev/nvme0n1p3 5322752 1953523711 1948200960  929G Linux filesystem

Output of 'efibootmgr' (boot order puts windows first, I have tried to use efibootmgr to put the linux disk first but that doesn't seem to work):

BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0008,0000,0009
Boot0000* Windows Boot Manager	HD(1,GPT,ddc63239-c07d-11ec-9135-99541708dc1c,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000069860100000010000000040000007fff0400
Boot0008* Hard Drive	BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)0000474f00004e4fd3000000010000008700530061006d00730075006e006700200053005300440020003900370030002000450056004f00200050006c007500730020003100540042000000050109000200000000010416008b12e85cec2cf040837280640e3dc85802007fff040002010c00d041030a0000000001010600010101010600000003171000010000000025385a1191a8497fff040001043400ef47642dc93ba041ac194d51d01b4ce653003400450057004e004d0030005200410031003700370034003000540000007fff04000000424f00004e4fcb000000010000008b004b0049004e004700530054004f004e00200053005600330030003000530033003700410031003200300047000000050109000200000000010416008b12e85cec2cf040837280640e3dc85802007fff040002010c00d041030a0000000001010600030101010600010003120a000000ffff00007fff040001043e00ef47642dc93ba041ac194d51d01b4ce63000350032003000420036003200370032003500310030003400390043003500200020002000200000007fff04000000424f
Boot0009* UEFI OS	HD(1,GPT,14c595c8-98cb-f34c-b019-c7986373bab2,0x800,0x113000)/File(\EFI\BOOT\BOOTX64.EFI)0000424f

outpt of 'tree /boot/efi' with /dev/nvme0n1p1 mounted there:

/boot/efi
└── EFI
    └── BOOT
        └── BOOTX64.EFI

What I've tried:
- copious googling, found a lot of forum threads with similar issues but none of the proposed solutions worked for me
- upgrading UEFI firmware
- using grub-install --removable or manually moving the EFI executable to the fallback path
- using a live ISO to format the EFI partition and start from scratch with grub-install [--removable]
- re-running grub-mkconfig with combinations of the above

Thankfully I can still use my system but having to use the boot menu on every restart is annoying, and I have reached the end of my ideas and knowledge on how to find a solution. Any help would be greatly appreciated!

Last edited by Algorhythm (2022-09-01 14:36:25)

Offline

#2 2022-08-31 18:53:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,101

Re: [Solved] MSI UEFI FW won't boot into Arch automatically

Generally you need to get an entry for GRUB which would be created if you used grub-install without removable but with a bootloader-id and with efibootmgr installed. FWIW some motherboards only allow changes to NVRAM from their own interface maybe check whether you can do that. Which mainboard is this exactly?

Last edited by V1del (2022-08-31 18:54:44)

Offline

#3 2022-08-31 19:07:31

Algorhythm
Member
Registered: 2022-06-09
Posts: 9

Re: [Solved] MSI UEFI FW won't boot into Arch automatically

V1del wrote:

Generally you need to get an entry for GRUB which would be created if you used grub-install without removable but with a bootloader-id and with efibootmgr installed. FWIW some motherboards only allow changes to NVRAM from their own interface maybe check whether you can do that. Which mainboard is this exactly?

I'm on the MSI B350 PC MATE. Running the latest BIOS now

Looks like grub had an update recently, installing that with pacman and following the suggested steps of grub-install ..., grub-mkconfig still didn't work though.

Offline

#4 2022-09-01 01:20:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,101

Re: [Solved] MSI UEFI FW won't boot into Arch automatically

MSI's are notorious for a fucked EFI implementation (and sorry seems like you did mention that in the OP). So --removable is/was likely necessary. If efibootmgr can't change it you need to find a way in the EFI itself to configure the primary boot device.

Last edited by V1del (2022-09-01 01:21:01)

Offline

#5 2022-09-01 03:19:55

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

Re: [Solved] MSI UEFI FW won't boot into Arch automatically

Some firmware doesn't like multiple EFI partitions. Do you have room to install grub to the original EFI or have you tried that?


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

#6 2022-09-01 08:18:49

Algorhythm
Member
Registered: 2022-06-09
Posts: 9

Re: [Solved] MSI UEFI FW won't boot into Arch automatically

cfr wrote:

Some firmware doesn't like multiple EFI partitions. Do you have room to install grub to the original EFI or have you tried that?

What do you mean by 'original EFI' in this case? I don't have multiple EFI partitions on the same drive, I have 2 drives, each with their own EFI partition. One drive holds windows, the other holds linux. I saw another potential fix to try on the wiki: copy /EFI/BOOT/BOOTX64.EFI to /EFI/BOOT/SHELLX64.EFI as well, I can try that later today.

Offline

#7 2022-09-01 13:21:02

Algorhythm
Member
Registered: 2022-06-09
Posts: 9

Re: [Solved] MSI UEFI FW won't boot into Arch automatically

I've managed to stumble across a solution on my own:

According to the wiki and other threads, efibootmgr can fail to properly detect EDD 3.0 and create boot entries that don't work: see this issue. Trying the fix suggested on the wiki made a difference to how the boot entry was set up, in line with what was found in the issue discussion.
Additionally, with the UEFI FW update I found a new setting that I hadn't seen before which they called UEFI Hard Disk BBS Priority. It seems that MSI's FW does not add new UEFI hard disks to the main boot order display, but wants you to select a generic 'UEFI hard disk' for boot, then set up which order you want them attempted with this menu... hmm

Anyway, thanks to either one or both of these fixes I can now do a cold boot straight into Arch without spamming F11. This thread can be marked as solved

Last edited by Algorhythm (2022-09-01 13:23:22)

Offline

#8 2022-09-01 14:34:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,101

Re: [Solved] MSI UEFI FW won't boot into Arch automatically

Ye, MSI boot order fuckery as usual. Please mark it as such yourself by editing the title in your first post (might have to shorten it a bit/mention the actual cause)

Offline

#9 2022-09-01 17:25:37

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

Re: [Solved] MSI UEFI FW won't boot into Arch automatically

Algorhythm wrote:
cfr wrote:

Some firmware doesn't like multiple EFI partitions. Do you have room to install grub to the original EFI or have you tried that?

What do you mean by 'original EFI' in this case? I don't have multiple EFI partitions on the same drive, I have 2 drives, each with their own EFI partition. One drive holds windows, the other holds linux. I saw another potential fix to try on the wiki: copy /EFI/BOOT/BOOTX64.EFI to /EFI/BOOT/SHELLX64.EFI as well, I can try that later today.

This isn't relevant as you've fixed the problem smile, but I was assuming the EFI partition on the Windows disk was created first. I was thinking that, if you had finicky firmware, it might prefer you to install a boot loader to that partition. One problem is that Windows setups often don't make the partition big enough for you to put everything there, but you can always use a boot loader which can use kernel images etc. on a different disk. So you'd install rEFInd or GRUB or something to the Windows EFI partition and use that to call stuff from your other disk, if you couldn't put everything on that EFI partition.

But, as I say, obviously your firmware can cope with the two EFI partitions, even if it is finicky about how you set it up, so this suggestion isn't relevant.


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