You are not logged in.

#1 2023-03-31 10:47:34

ArchMark
Member
Registered: 2023-03-30
Posts: 36

[SOLVED] Dual-boot Windows 11 and Arch Linux question/problem

Here are my computer specs:

PowerSpec B734 Desktop Computer
AMD Ryzen 7 5700G 3.8GHz Processor
Microsoft Windows 11 Pro
16GB DDR4-2666 RAM
1TB Solid State Drive (NVME)
AMD Radeon 5700G Graphics
10/100/1000 Network
802.11ac Wireless
Bluetooth 4.2

UEFI/BIOS enabled, Secure Boot disabled.

Add-on: Western Digital 500GB SSD (/dev/sda) to the system for Arch Linux.

Windows 11 Pro x64 runs fine on WD Blue 1TB M.2 NVME SSD drive.

I booted up on the Arch Linux bootable USB drive and installed to the 500GB SSD drive. I used archinstall 2.5.3 to install Arch Linux.  No errors or problems when installing to the 500GB SSD.  Boot loader is systemd.

When I restarted Arch Linux, only Arch Linux shows in the systemd bootloader menu.  Windows 11 does not appear.

I restarted the computer, went in to BIOS, and booted up on the WD Blue 1TB M.2 SSD drive to get back in to Windows 11.  The Windows bootloader does not see Linux.  I prefer to use systemd boot loader.

My notes on Arch Linux (efitbootmgr) bootctl install varies a lot from everything I have been reading on the Internet. I just need to know how to add Windows 11 to systemd boot manager without causing unbootable system problems. In the past when I installed Linux to the systems, the Linux automated installers set up this automatically and it also used GRUB.  I'd like to get used to systemd bootloader.

Thank you.

Last edited by ArchMark (2023-04-01 18:01:28)

Offline

#2 2023-03-31 14:03:54

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

Re: [SOLVED] Dual-boot Windows 11 and Arch Linux question/problem

If you used two completely distinct ESPs on two completely distinct drives then you can't add the Windows bootloader to systemd-boot since systemd-boot will only read the Windows Loader from it's "own" ESP and only from the disk said ESP is on.

To do what you want you'd install systemd-boot onto the ESP of your Windows disk and configure your /boot partition to either be that same ESP or configure an additional parttition on that same disk to be your /boot and configure it with the XBOOTLDR spec GUID: https://wiki.archlinux.org/title/System … g_XBOOTLDR

For your current setup to be touched as minimally as possible you'd have to use GRUB or refind (iirc not sure on that last one, GRUB will work)

Online

#3 2023-04-01 13:04:59

ArchMark
Member
Registered: 2023-03-30
Posts: 36

Re: [SOLVED] Dual-boot Windows 11 and Arch Linux question/problem

I have provided lots of details in case I need this for reference again. There is probably a shorter and quicker way to do all of this, but this is my learning-journey.

Update:

When attempting to use GRUB bootload, I removed systemd-bootloader from Arch Linux. Installed GRUB with many problems, but I was able to eventnually boot in to Arch Linux using GRUB. However, GRUB caused my system to run extremely slow on boot up. The AMD system would normally boot up in a few seconds.  GRUB delayed the boot up time for several minutes. Then I removed GRUB, went back to systemd-bootloader. After getting confused on what I did right or wrong, I reloaded Arch Linux on the system. One missing item I did realize why GRUB may not have recognized the Windows parition or drive is that ntfs-3g was not installed.

I booted up on Arch Linux (archlinux-2023.03.01-x86_64.iso) on the USB drive, used archinstall v2.5.3 (did not update archinstall) to install to the secondary SSD drive (/dev/sda). The systemd boot menu only shows "Arch Linux" and "Reboot Into Firmware Interface" options.  The Arch Linux Fallback option was not there. So I kept research systemd bootloader problems and how to add that option there.

After looking at /boot/loader/entries/arch.conf

# Created by: archinstall
# Created on: 2023-04-01_05-08-35
title Arch Linux (linux)
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID=887dfcb0-5be9-4204-999f-9dd660075d1a zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspk

I added /boot/loader/entries/arch-fallback.conf (edited version of arch.conf):

title Arch Linux (fallback)
linux /vmlinuz-linux
initrd /amd-ucode.img
initrd /initramfs-linux-fallback.img
options root=PARTUUID=887dfcb0-5be9-4204-999f-9dd660075d1a zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs cow_spacesize=10G copytoram=n nvidia nvidia-drm.modeset=1 nouveau.modeset=0 i915.modeset=1 radeon.modeset=1 nvme_load=yes module_blacklist=pcspk

I also updated /boot/loeader/loader.conf

default arch.conf
timeout 10
console-mode max
editor no

I restarted Arch Linux many times for testing and verification that these are booting without any errors, and no errors when booting between them.  Progress!

I had to use the BIOS boot loader (F11 on the ASRock motherboard) and select the Windows Boot Manager to boot back in to Windows 11 (/dev/nvme0n1). Now I can toggle between Arch Linux and Windows 11 using the BIOS F11 menu without any problems. However, I want to use the systemd bootloader to manage the dual-boot.  When I was testing Endeavour OS (EOS), systemd bootloader dual booted beween Arch Linux and Windows 11 without any problems (automatic setup/configure).

Note: Windows 11 installed on parimary NVME M.2 SSD drive (/dev/nvme0n1).

Did some more research on systemd bootloader.

The Installation using XBOOTLDR article did not work for me.  Either I misunderstood something or messed up, but the systemd-boot-update.service did not automatically add anything.

Then I read this Dual booting Arch Linux and Windows article, this helped me a lot.  After mounting and copy the Microsoft EFI/ESP files over the Linux ESP, per the instructions, restarted Arch Linux.  This booted me in to Windows 11 without any systemd boot menu.  I had to use the BIOS F11 option to boot back in to Arch Linux using the Linux Boot Manager. This is when the Linux Boot Manger shows:

Arch Linux (arch.conf)
Arch Linux (fallback)
Windows 11 (auto-windows)
Reboot Into Firmware Interface

I then tested booting in each option on the list.  All works.  I can boot in to each one, restart, and the Linux Boot Manager quickly shows up on after the system posts.

I looked at /boot/loader/entries did not see any new .conf files.  I wanted to modify the .conf file to allow Windows 11 to boot as default. I could not locate any .conf file. I did read that the auto-window option is coming from:

/sys/firmware/efi/efivars/LoaderEntries-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f

I could not find out how to set "Windows 11 (auto-windows)" option as default, I created a windows.conf file in /boot/loader/entries:

/boot/loader/entries/windows.conf
title Windows 11
efi /EFI/Microsoft/Boot/bootmgfw.efi

Now the Linux Boot Manager shows these entries:

Windows 11 (windows.conf)
Arch Linux (arch.conf)
Arch Linux (fallback)
Windows 11 (auto-windows)
Reboot Into Firmware Interface

How would I set "Windows 11 (auto-windows)" as default in Linux Boot Manager? Creating a windows.conf file seems like duplicate effort.

I had to boot in to the UEFI/BIOS to set the primary boot option to Linux Boot Manager in the Boot Option Priorities.  The Windows Boot Manger is second.

Boot Option #1     Linux Boot Manager
Boot Option #2     Windows Boot Manager

Save and exit the changes in the BIOS.

To make sure Linux Boot Manager boots in to Windows 11, edit /boot/loader/loader.conf:

/boot/loader/loader.conf
default windows.conf
timeout 10
console-mode max
editor no

Thank you.

Last edited by ArchMark (2023-04-01 13:52:24)

Offline

#4 2023-04-01 15:38:15

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

Re: [SOLVED] Dual-boot Windows 11 and Arch Linux question/problem

Thanks for the solution write up. Please mark as [SOLVED] by editing the title in your first post (might have to shorten it a bit)

Online

#5 2023-04-01 22:55:45

ArchMark
Member
Registered: 2023-03-30
Posts: 36

Re: [SOLVED] Dual-boot Windows 11 and Arch Linux question/problem

ArchMark wrote:
Windows 11 (windows.conf)
Arch Linux (arch.conf)
Arch Linux (fallback)
Windows 11 (auto-windows)
Reboot Into Firmware Interface

How would I set "Windows 11 (auto-windows)" as default in Linux Boot Manager? Creating a windows.conf file seems like duplicate effort.

Offline

#6 2023-04-03 21:05:25

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

Re: [SOLVED] Dual-boot Windows 11 and Arch Linux question/problem

You can press D while in systemd-boot to force a certain default regardless of configuration, not sure how you'd do it otherwise.

Online

#7 2023-04-03 23:01:31

ArchMark
Member
Registered: 2023-03-30
Posts: 36

Re: [SOLVED] Dual-boot Windows 11 and Arch Linux question/problem

V1del wrote:

You can press D while in systemd-boot to force a certain default regardless of configuration, not sure how you'd do it otherwise.

I only knew of setting the defaults in the config files.

The "D" is much easier!  Thank you!

Offline

Board footer

Powered by FluxBB