DEV Community

Jeremy
Jeremy

Posted on

Setting Up Dual Boot with Windows and Arch Linux Using systemd-boot

Dual-booting Windows and Arch Linux is fairly straightforward when each operating system is installed separately. However, you might need to manually select the boot device through your BIOS settings every time you want to switch. To make this more convenient, you can configure systemd-boot to present a centralized boot menu, allowing you to choose between Arch and Windows easily at startup.

Installing and Configuring systemd-boot

systemd-boot comes bundled with systemd, so you don't need to install anything extra. To initialize it, simply use bootctl:

bootctl install 
Enter fullscreen mode Exit fullscreen mode

This command will install systemd-boot into your EFI system partition, set up a new bootloader entry named Linux Boot Manager, and configure it as the first option in your UEFI firmware.

At this point, if you reboot, you will only see Arch Linux listed as a boot option — we still need to add Windows manually.

Adding the Windows Boot Entry

The goal is to make Windows available directly from the systemd-boot menu. To do this, we'll copy Windows' EFI boot files into Linux's EFI partition. systemd-boot will automatically detect the Windows bootloader once the files are in place — no need to create a manual entry.

Step 1: Identify the Windows EFI Partition

First, list all block devices:

lsblk 
Enter fullscreen mode Exit fullscreen mode

Sample output:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 223.6G 0 disk ├─sda1 8:1 0 100M 0 part ├─sda2 8:2 0 16M 0 part ├─sda3 8:3 0 222.9G 0 part └─sda4 8:4 0 546M 0 part zram0 253:0 0 4G 0 disk [SWAP] nvme0n1 259:0 0 476.9G 0 disk ├─nvme0n1p1 259:1 0 1G 0 part /boot ├─nvme0n1p2 259:2 0 47G 0 part / └─nvme0n1p3 259:3 0 428.9G 0 part /home 
Enter fullscreen mode Exit fullscreen mode

In this example, sda1 is a 100MB partition, which typically indicates Windows' EFI partition.

Step 2: Mount the Windows EFI Partition

Create a mount point and mount the Windows EFI partition:

sudo mkdir /mnt/windows-efi sudo mount /dev/sda1 /mnt/windows-efi 
Enter fullscreen mode Exit fullscreen mode

Step 3: Copy Windows Boot Files

Copy the Microsoft EFI directory into your Arch system’s EFI folder:

sudo cp -r /mnt/windows-efi/EFI/Microsoft /boot/EFI/ 
Enter fullscreen mode Exit fullscreen mode

Once copied, systemd-boot will automatically detect the Windows Boot Manager.

Final Step: Reboot and Enjoy

After setting everything up, reboot your machine. You should now see both Arch Linux and Windows listed in the systemd-boot menu — no additional configuration required!

Top comments (0)