You are not logged in.

#1 2023-11-15 21:39:39

WaterNinja05
Member
Registered: 2023-11-15
Posts: 10

[Solved] Problems while installing arch dual-boot with win11

Hi all,

I am trying to dual boot arch with windows 11, because i still want to play games that don't work on linux and for my studies we may need windows in the future.

So i just installed arch alongside the existing windows os, which went fine. Only problem i have now is that grub doesn't show up in my boot options in the bios. But my laptop does recognize an EFI file on the hard drive in fast boot options. (so not in my f10 menu, but it does show in my f9 menu)
For context i am using a new omen 16 laptop specifically: HP OMEN 16-WF0894ND

I tried to re-install grub, and now tried to use systemd-boot instead of grub.
Now systemd-boot does show up, but i cannot get the correct config file for my arch install or windows.
How would i create the correct config files, or how do i get grub working. I am open to both systemd-boot and grub.
I tried to make one for systemd-boot, but when i boot up it fails to find the root for that PARTUUID.
If you need info let me know, i don't no what i remotely would need.

Last edited by WaterNinja05 (2023-11-19 19:48:39)

Offline

#2 2023-11-17 18:58:22

ZaneFerns360
Member
Registered: 2023-10-31
Posts: 3

Re: [Solved] Problems while installing arch dual-boot with win11

while installing arch with grub, for dual booting you have to install the following:
pacman -S grub efibootmgr os-prober

You have to mount the windows efi directory as-   /efi   before installing grub.
To install grub on /efi mounted partition, run:

grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB

later on after installation, once you have booted into arch successfully, go ahead and run:

grub-mkconfig -o /boot/grub/grub.cfg

this should report that it has found windows and you will be good to go.

If it doesnt work then you may also have to uncomment a line in /etc/default/grub for enabling os-prober.



For more info check this -   https://www.linuxtechi.com/dual-boot-ar … indows-10/

Offline

#3 2023-11-17 21:23:00

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [Solved] Problems while installing arch dual-boot with win11

I have had an HP ENVY laptop for a year or two - and the BIOS has a problem where it was easy for the linux boot entry in NVRAM to either disappear or not be the default, despite being set correctly either for grub or for sd-boot.  It is possible that the HP OMEN bios has the same bug as in my laptop.  The solution that I came to was as follows - once the boot entry is written to the NVRAM by following the normal install procedure for your chosen grub or sd-boot boot manager, then check that the entry is indeed in NVRAM by using the efibootmgr command.  One of the entries should be in the listed output - if not then re-run your install for grub or sd-boot.  Once efibootmgr shows the entry is present, then what I do is to go into the laptop bios (uefi) settings, and go to the boot section.  What I found with my laptop is that the Windows Boot manager appears at the top of the list, and when you click into that entry, it shows there are both the Windows Boot Manager and in my case for sd-boot also the Linux Boot Manager, but the sd-boot entry is second.  I then use f5 or f6 to re-order the boot entry so that the Linux entry is at the top, and then click onto it to highlight it, and then crucially, to press f10 which then saves the changed boot entry order - and then exit the bios settings making sure that the changes are saved.  Only if I do this in this way can I get the laptop to boot to my chosen sd-boot and then with my choice of arch, or Windows once the sd-boot menu comes up.  The same would apply if you use grub.

All of this should not be necessary at all, but it appears, certainly on my laptop (HP ENVY x360 Convertible 15-ee0xxx), that this is due to a buggy uefi - and HP never fixed the bios on my machine to make sure my choice of boot entry 'sticks' once I have written the NVRAM entry from arch.  I hope this may help you also.

For my machine I can check that the NVRAM entry is present for sd-boot by running this command:

$ efibootmgr | grep -i linux
Boot0003* Linux Boot Manager    HD(1,GPT,07c3xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx,0x800,0x82000)/File(\EFI\systemd\systemd-bootx64.efi)

For grub there would also be a line corresponding to your grub efi file.
For sd-boot you can usually check your entries with bootctl.  But you do need your entries for any boot option set correctly - for example one may look like this:

$ cat /boot/loader/entries/linux-arch.conf 
#
# linux-arch.conf
#
title   Linux Arch
linux   /vmlinuz-linux
initrd  /initramfs-linux.img
initrd  /amd-ucode.img 
options root="UUID=xxxxxxxxx-xxxx-xxxxxxxxxxx-xxxxxxxxxxxxxx" rw acpi_backlight=vendor audit=0

where the three referenced files are in /boot/

I have other laptops which were dual boot also, but I only ever had this particular issue with my HP Envy. The other laptops were different brand, and the normal install procedure never failed on those.

Last edited by mcloaked (2023-11-17 21:37:01)


Mike C

Offline

#4 2023-11-19 19:47:40

WaterNinja05
Member
Registered: 2023-11-15
Posts: 10

Re: [Solved] Problems while installing arch dual-boot with win11

So basically, i needed to re-install grub, and remove the non necessary files of sd-boot. And fix my file structure, since it was wrong for some reason, and my UEFI/BIOS couldn't find my grub installation.
So for future people having the same problems, make sure the file structure to the grub-install is as follows:

/boot/EFI/{your operating system, here it is thus "arch"}/grubx64.efi

And obviously update the grub config file using:

grub-mkconfig -o /boot/grub/grub.cfg

Make sure it detects the Windows boot manager, if os-prober is turned of, you need to uncomment a line in /etc/default/grub

And thanks for the help both of you!
Good luck, and enjoy your arch win11 dual booted system :)

Offline

Board footer

Powered by FluxBB