4

I've followed the classic procedure to install Windows and Linux in dual boot. First I installed Windows in UEFI mode, then I use a bootable PopOS key to resize the main Windows partition; I created a Linux partition as well as a 500MB /boot/efi partition in the remaining space.

My problem is, systemd-boot can't seem to detect the Windows bootloader.

When I display the systemd-boot menu, it only lists PopOS as a possible boot option, even though I can launch Windows from my BIOS menu with no problem.

When I run bootctl, I get the following output:

System:
     Firmware: UEFI 2.70 (American Megatrends 5.14)
  Secure Boot: disabled
   Setup Mode: setup

Current Boot Loader:
      Product: systemd-boot 245.4-4ubuntu3.1pop0~1590695674~20.04~eaac747
     Features: ✓ Boot counting
               ✓ Menu timeout control
               ✓ One-shot menu timeout control
               ✓ Default entry control
               ✓ One-shot entry control
               ✓ Support for XBOOTLDR partition
               ✓ Support for passing random seed to OS
               ✓ Boot loader sets ESP partition information
          ESP: /dev/disk/by-partuuid/585919b8-7f1b-4f94-a0b1-6ff195d07515
         File: └─/EFI/SYSTEMD/SYSTEMD-BOOTX64.EFI

Random Seed:
 Passed to OS: yes
 System Token: set
       Exists: yes

Available Boot Loaders on ESP:
          ESP: /boot/efi (/dev/disk/by-partuuid/585919b8-7f1b-4f94-a0b1-6ff195d07515)
         File: └─/EFI/systemd/systemd-bootx64.efi (systemd-boot 245.4-4ubuntu3.1pop0~1590695>
         File: └─/EFI/BOOT/BOOTX64.EFI (systemd-boot 245.4-4ubuntu3.1pop0~1590695674~20.04~e>

Boot Loaders Listed in EFI Variables:
        Title: Linux Boot Manager
           ID: 0x0003
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/585919b8-7f1b-4f94-a0b1-6ff195d07515
         File: └─/EFI/SYSTEMD/SYSTEMD-BOOTX64.EFI

        Title: Windows Boot Manager
           ID: 0x0000
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/42f0d8f0-13e0-41cf-bc36-ac80dccc54fd
         File: └─/EFI/MICROSOFT/BOOT/BOOTMGFW.EFI

        Title: UEFI OS
           ID: 0x0009
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/585919b8-7f1b-4f94-a0b1-6ff195d07515
         File: └─/EFI/BOOT/BOOTX64.EFI

Boot Loader Entries:
        $BOOT: /boot/efi (/dev/disk/by-partuuid/585919b8-7f1b-4f94-a0b1-6ff195d07515)

Default Boot Loader Entry:
        title: Pop!_OS
           id: Pop_OS-current.conf
       source: /boot/efi/loader/entries/Pop_OS-current.conf
        linux: /EFI/Pop_OS-3ce60b75-530a-4cad-9e80-5156a8e6bb56/vmlinuz.efi
       initrd: /EFI/Pop_OS-3ce60b75-530a-4cad-9e80-5156a8e6bb56/initrd.img
      options: root=UUID=3ce60b75-530a-4cad-9e80-5156a8e6bb56 ro quiet loglevel=0 systemd.sh>

Notice the Windows Boot Manager entry under Boot Loaders Listed in EFI Variables. It seems systemd-boot is somewhat aware that my Windows partition exists, it just won't detect it as something that can be booted from.

(running bootctl install doesn't seem to change anything)

My /boot/efi/ directories look like this:

/boot/efi/EFI
├── BOOT
│   └── BOOTX64.EFI
├── Linux
├── Pop_OS-3ce60b75-530a-4cad-9e80-5156a8e6bb56
│   ├── cmdline
│   ├── initrd.img
│   └── vmlinuz.efi
└── systemd
    └── systemd-bootx64.efi
/boot/efi/loader/entries/
└── Pop_OS-current.conf

So the directories that should have been populated with the Windows Bootloader somehow aren't.

How can I diagnose this problem, and add Windows as a startup option to systemd-boot?

1
  • (also, if someone with enough reputation could create a "pop-os" tag, that'd be appreciated) – Narrateur du chaos Sep 22 '20 at 16:18
2

Try This method has only been tested on a multi drive system

Find Windows EFI Partition

lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT

Create Path & Mount Windows EFI Partition

sudo mkdir /mnt/win-efi
sudo mount /dev/sdb1 /mnt/win-efi

Copy Contents of Windows EFI to POP EFI

sudo cp -r /mnt/win-efi/EFI/Microsoft /boot/efi/EFI

Add timer to bootloader

sudo micro /boot/efi/loader/loader.conf

Reboot

sudo reboot
1

it's not going to work

the installer needs to call bootctl install with the right parameters when it installs the OS, after installation you can't change it anymore

pop os is badly configured, so at installation time it doesn't feed bootctl with the partition paths and systemdboot can't detect the windows partition

you should forget systemd boot and use grub instead

0

Install rEFInd

After some further research, I've found this reddit thread from someone with an identical problem. Multiple posters in this and other threads recommended installing rEFInd instead.

rEFInd was straightforward to install and immediately detected my Windows partition.

I followed these Youtube tutorials, which I recommend:

0

I don't know if it will work on uefi mode. I had the same problem with a legacy mode installation on a 2010 laptop. I solved by installing os-prober. Then I type "sudo os-prober" and it returns the already present installation of windows 10.

After that I typre "sudo update-grub"

And finally Windows 10 has been found.

Hope this can help someone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.