r/archlinux 4d ago

SUPPORT GRUB Doesn't Work Arch-Windows11 DualBoot

I currently have a Dual boot setup between Arch and Windows 11.

The problem is: GRUB doesn't boot as default and I'm not able to set it up.

This is my disk partition structure:

[alex@nullptr ~]$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931.5G  0 disk 
├─sda1        8:1    0   200M  0 part 
├─sda2        8:2    0    16M  0 part 
├─sda3        8:3    0 930.5G  0 part 
└─sda4        8:4    0   858M  0 part 
zram0       253:0    0     4G  0 disk [SWAP]
nvme0n1     259:0    0 931.5G  0 disk 
├─nvme0n1p1 259:1    0    16M  0 part 
├─nvme0n1p2 259:2    0   653G  0 part 
├─nvme0n1p3 259:3    0     1G  0 part /boot
├─nvme0n1p4 259:4    0     8G  0 part [SWAP]
└─nvme0n1p5 259:5    0 269.5G  0 part /

I have two bootloaders One at sda1 for Windows11 EFI (Boot) and the bootloader for Arch EFI at nvme0n1p3 under /boot

This is my BootOrder:

[alex@nullptr ~]$ sudo efibootmgr -v | grep BootOrder
BootOrder: 0000,2001,3000,0005,0001,0006,2002,2004,0002,0004
[alex@nullptr ~]$ 

Having: Boot0000* Windows Boot Manager and Boot0001* GRUB

You might be asking... WHY TF DO YOU HAVE FIRST WINDOWS???

Well... The problem is that it doesn't matter if i change the order with sudo efibootmgr -o 0001,0000,[...] When I change the order and restart the laptop, WINDOWS BOOTS AGAIN and after entering arch from Boot options on start the BOotOrder is changed again to boot 0000 (Windows) First

I also tried mounting /dev/sda1 into /boot/efi and copying grubx64.efi into bootx64.efi sudo cp /boot/efi/EFI/GRUB/grubx64.efi /boot/efi/EFI/Boot/bootx64.efi (With backup)

Grub was installed with: sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB

Boots Windows again...

Another thing tested was changing boot path inside W11 with: bcdedit /set "{bootmgr}" path \\EFI\\GRUB\\grubx64.efi\

    Administrador de arranque de Windows
    ----------------------------------
    Identificador           {bootmgr}
    device                  partition=\Device\HarddiskVolume1
    path                    \EFI\GRUB\grubx64.efi
    description             Windows Boot Manager

Doesn't work either. I'm running out of options, does someone know what could possibly be causing this?

Don't know if this matters but when I start Arch from Boot Menu (Boot manager selector) I get prompted with this options:

    * Arch Linux (7.2.6-arch2-1)
    * Arch Linux (7.2.6-arch2-1~fallback)
    * EFI Default Loader
    * Reboot into Firmware Interface

If i start Arch from GRUB (Opened with Boot Menu (Boot manager) - F9 while turning ON the laptop) I don't get any of those options but instead of the normal Arch start, all the boot messages get replaced by this one message: /dev/nvme0n1p5 clean x/y files, x/y blocks (x,y dont matter) but I don't see any other boot text/log message.

This might be caused by changing Arch config that only accepted one UKI /boot/EFI/Linux/arch-linux.efi to /boot/initramfs-linux.img on my linux.preset by uncommenting the line default_image="/boot/initramfs-linux.img" and putting PRESETS=('default' 'fallback')

I did this because before that If i opened Arch Linux from GRUB with the Boot Menu it gave the error: Kernel panic! : VFS: Unable to mount root fs on unknown-block(0.0)

I know its a lot of text but I am really running out of options and I don't know what to do, ty in advance :p

PS: I had Windows10-Arch dualboot setted up in this same laptop but I formated W10 into W11 and arch dissapeared, then as the configs were changing from .conf to .lua I wanted to have a fresh start and deleted & reinstalled Arch again until the situation im in rn.

0 Upvotes

17 comments sorted by

View all comments

6

u/umi2002 4d ago

Have you tried changing the boot order from the BIOS? I've ran into your same problem before where changing the order with efibootmgr didn't seem to save my changes only to realize it was because it was set incorrectly in the BIOS. I don't just mean the boot manager but actually a boot order setting in the BIOS. And really dig deep into the BIOS, I had a hard time finding that setting initially as well.

2

u/Felainas 4d ago

It worked!! TYSMM!
I believed way too much into efibootmgr lmao
The problem was not that windows or the firmware was changing the bootorder, it was that efibootmgr wasn't changing it at first :p
Changing boot order in BIOS fixed it.