You are not logged in.

#1 2023-01-09 01:46:32

redshoe
Member
Registered: 2015-12-16
Posts: 217

Windows10 and systemd-boot

I am trying to dual boot Windows 10 and Arch Linux under EFI installation (for both Arch and Windows). I managed to get the systemd-boot to find the Windows 10 automatically, but now the problem is that I do not see the Arch Linux installation entry during the boot process.

Here is how my system is configured and I am listing the things that I did so far.

I have 2 separate disks like below

Disk #1 :
- Partition #1: EFI System (Windows boot partition)
- Partition #2: Microsoft reserved
- Partition #3: Microsoft basic data
- Partition #4: Windows recovery environment

Disk #2
- Partition #1: Arch Linux (root and home directories)

1. Installed Windows 10 on the Disk #1
2. Installed Arch Linux on the Disk #2
3. Mounted the Disk #1 Partition #1 on to /boot/efi, and installed systemd-boot by

bootctl install

So, the ucode, vmlinuz-linux, initramfs-linux.img files are located at /boot, and the Windows boot related files are located at /boot/efi/EFI. And the systemd-boot loader related files are located at /boot/efi /loader. And for my boot entry I have a file named 'arch.conf' which as the following content

title  Arch Linux
linux  /vmlinux-linux
initrd /amd-ucode.img
initrd /initramfs-linux.img
options root="root-disk-partition-UUID-which-I-don't-bother-to-enter" rw

So, with above setting, my system detects Windows 10 on the boot menu, but it does not detect the Arch Linux installation. When I check the bootctl update, I get an error message of

...
...
...

source : /boot/efi/loader/entries/arch.conf
linux : /vmlinuz-linux (No such file or directory)
initrd : /amd-ucode.img (No such file or directory)
             /initramfs-linux.img (No such file or directory)

WARNING: default boot entry is broken

So, I am guessing that I should change the path for the vmlinuz-linux and initramfs-linux.img and amd-ucode? I tried changing it to something like

/boot/vmlinuz-linux

but it did not work.

Any ideas?

Thanks.

Last edited by redshoe (2023-01-09 01:48:07)

Offline

#2 2023-01-09 04:55:51

Adriik
Member
From: Argentina
Registered: 2022-03-10
Posts: 128

Re: Windows10 and systemd-boot

systemd-boot can only see files inside of ESP. From systemd-boot wiki:

For Linux boot, you can also use linux instead of efi. Or initrd in addition to options. The syntax is:

linux or initrd followed by the relative path of the corresponding files in the ESP; e.g. /vmlinuz-linux; this will be automatically translated into efi path and options initrd=path – this syntax is only supported for convenience and has no differences in function.

If your ESP is other than /boot, you need to copy kernel, intiramfs and microcode to ESP.
Or make a separate /boot partition and use XBOOTLDR.

Last edited by Adriik (2023-01-09 05:04:14)


Solo soy un loco más. Please use [code] [/code] tags.
Command cheatsheetCommand not found?
If I write something wrong in English, please correct me.

Offline

#3 2023-01-09 05:13:35

redshoe
Member
Registered: 2015-12-16
Posts: 217

Re: Windows10 and systemd-boot

Adriik wrote:

systemd-boot can only see files inside of ESP. From systemd-boot wiki:

For Linux boot, you can also use linux instead of efi. Or initrd in addition to options. The syntax is:

linux or initrd followed by the relative path of the corresponding files in the ESP; e.g. /vmlinuz-linux; this will be automatically translated into efi path and options initrd=path – this syntax is only supported for convenience and has no differences in function.

If your ESP is other than /boot, you need to copy kernel, intiramfs and microcode to ESP.
Or make a separate /boot partition and use XBOOTLDR.

Hmm. Okay.

Then the problem is that the partition size of Windows boot partition is too small, 100 MB, for me to put all three vmlinuz-linux, amd-ucode.img, initramfs-linux.img. What is the normal way of doing about this for the Windows and Arch Linux dual boot?

Offline

#4 2023-01-09 05:28:34

Adriik
Member
From: Argentina
Registered: 2022-03-10
Posts: 128

Re: Windows10 and systemd-boot

The only solution I can see (I'm not a expert) is using XBOOTLOADER.
So, you can create a separate boot partition and systemd-boot can read from that partition. The problem is the following:

systemd-boot wiki wrote:

The XBOOTLDR partition must be on the same physical disk as the ESP for systemd-boot to recognize it.

So, you need to create that partition from your disk#1.

I don't know if there's another solution that the wiki doesn't say.
Try to search the forums about systemd-boot, maybe another user had the same problem and there's a better solution.

Last edited by Adriik (2023-01-09 05:29:05)


Solo soy un loco más. Please use [code] [/code] tags.
Command cheatsheetCommand not found?
If I write something wrong in English, please correct me.

Offline

#5 2023-01-09 07:28:03

d.ALT
Member
Registered: 2019-05-10
Posts: 920

Re: Windows10 and systemd-boot

Not a solution, but...
If you computer is capable of, just use its Boot Manager (eg.: press F12 while starting up) to select which .efi executable you want to boot.
This way, you can leave Windows' ESP on Disk1 and systemd-boot on Disk2 and just select one of the two from the Firmware's built-in Boot Manager.


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#6 2023-01-09 19:08:46

redshoe
Member
Registered: 2015-12-16
Posts: 217

Re: Windows10 and systemd-boot

d.ALT wrote:

Not a solution, but...
If you computer is capable of, just use its Boot Manager (eg.: press F12 while starting up) to select which .efi executable you want to boot.
This way, you can leave Windows' ESP on Disk1 and systemd-boot on Disk2 and just select one of the two from the Firmware's built-in Boot Manager.

Yeah.. I guess that'll do. Thanks.

Offline

#7 2023-01-09 22:29:18

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Windows10 and systemd-boot

redshoe wrote:

What is the normal way of doing about this for the Windows and Arch Linux dual boot?

Install Windows with a larger ESP.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#8 2023-01-10 06:04:12

redshoe
Member
Registered: 2015-12-16
Posts: 217

Re: Windows10 and systemd-boot

Slithery wrote:
redshoe wrote:

What is the normal way of doing about this for the Windows and Arch Linux dual boot?

Install Windows with a larger ESP.

Thanks, but I just did what d.ALT suggested.

Offline

#9 2023-01-11 03:16:44

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: Windows10 and systemd-boot

Another solution is to use a different boot loader such as rEFInd, grub or whatever.

Please mark this is solved if you're happy with the current solution. (Edit your first post and change the title.)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB