You are not logged in.

#1 2025-02-23 19:39:14

muresine
Member
Registered: 2024-08-01
Posts: 3

Ran mkinitcpio from live USB; now system directly boots to Windows

I was updating my Arch system recently and stumbled upon icu related package conflict. I managed to break pacman/yay. Fixed that, but managed to make my system stuck at "loading initial ramdisk". Managed to fix that by arch-chrooting into the system and running mkinitcpio, but I'm stuck now. Trying to search web and ask LLMs, but can't find anything narrow enough to my case.

I do have an MSI motherboard though.

Partition wise I have 2 'EFI System'. One for Windows (/dev/nvme1n1p1) and another for Linux (/dev/nvme1n1p5). The root fs itself is on partition 6 of same nvme.

What I've already tried is chrooting into arch system and running `grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB` followed by `grub-mkconfig -o /boot/grub/grub.cfg`. The configuration file do show both windows and Arch linux entries.

I thought of changing the boot order from the BIOS settings, but it does not show Windows/Arch stuff. It only shows the NVME along with USB/network etc. But both Arch and Windows are on same NVME but there is no granular option.

I could have copy pasted the config files and output, but I don't know how do I copy paste without GUI.

How to proceed?

Offline

#2 2025-02-23 20:39:05

cryptearth
Member
Registered: 2024-02-03
Posts: 2,130

Re: Ran mkinitcpio from live USB; now system directly boots to Windows

well - you could check wether there're any bootentries at all:

efibootmgr

from live arch install media
although I haven't experienced it on msi it very well could be the entries are either not saved or thrown away on POST
could also be the uefi is confused by the multiple ESPs
I run win10 with arch on a msi b550-a pro on one nvme with
- one esp
- one swap
- one root
- one home
- one windows
and have both the windows bootloader and grub installed along eachother on the one esp
as I use os-prober I chain windows from grub - but windows being being windows it keeps re-adding itself both as with a bootentry directly to bootmgfw as well as placing a copy at the fallback path
so long I was lucky and the uefi always respected my grub entry as first priority but I guess it's just a matter of time some weird windows update somehow breaks it
I would start by removing the second esp and have both windows bcd and grub on the same esp
clear all boot entries and make sure grub is at priority 0000 - this should force any windows entry and the fallback path to get lower priority of at least 0001 making grub always the first to get booted
what might could help: reflash the bios: not so long ago we had a topic OP just reflashed the bios which seem to have reset something that got stuck
make sure to proper setup the uefi after flashing - msi tends to set either csm or secureboot - both should be disabled

Offline

#3 2025-02-26 08:38:13

muresine
Member
Registered: 2024-08-01
Posts: 3

Re: Ran mkinitcpio from live USB; now system directly boots to Windows

I had no idea only 1 ESP works. I thought each OS needs one. I don't know how my setup worked at the first place. efibootmgr does only show Windows (and the live USB). Timeout is always 0 secs. I tried modifying it, but it reverted next time I booted.

I think the best option for me is to take backup and re-install arch. I don't want that extra partition lying around when not needed.

Offline

#4 2025-02-26 09:50:54

cryptearth
Member
Registered: 2024-02-03
Posts: 2,130

Re: Ran mkinitcpio from live USB; now system directly boots to Windows

uefi specs state:
at least one esp is required with a supported filesystem (fat32 is mandatory but each oem can add additional drivers) to load and start at least one efi binary - then its up to that binary to load configs and maybe chain operating systems
the spec also doesn't mention anything about more than one esp so support is up to the oem
that said: depending on its actual implementation an uefi might be able to work with multiple esp on one drive or on multiple drives - but it can also fail as soon as a second esp is found

Offline

Board footer

Powered by FluxBB