Can Systemd-boot not look for Kernel outside the EFI partition?

Debian_SuperUser

New Member
Joined
Mar 18, 2024
Messages
15
Reaction score
2
Credits
153
I am on Arch and configuring systemd-boot although I do have GRUB installed. My kernel is located in /boot but whenever I do "bootctl list", it shows that it really wants to look under /boot/efi which is mounted as the EFI partition. Can I not change it to look under /boot only? How is it even safe and reliable to have your kernels on your EFI partition?

I would also like to map GRUB under systemd-boot. How can I do that (I guess changing the path for grub-install)?
 


My kernel is located in /boot but whenever I do "bootctl list", it shows that it really wants to look under /boot/efi which is mounted as the EFI partition.
efi partition contains boot loaders under directory EFI, that is boot loaders are located in /boot/efi/EFI/debian

Boot loader is executed by UEFI which in turn executes one of the kernels that are located under /boot

Can I not change it to look under /boot only?
I think no because boot loaders must be located under EFI directory to be located by UEFI.
grub is also is configured this way.
 
efi partition contains boot loaders under directory EFI, that is boot loaders are located in /boot/efi/EFI/debian

Boot loader is executed by UEFI which in turn executes one of the kernels that are located under /boot


I think no because boot loaders must be located under EFI directory to be located by UEFI.
grub is also is configured this way.

Yes the bootloader should on the ESP, but I am talking about the kernel. If my kernel only resides in /boot/, then systemd-boot does not recognize my Linux install. I am fine keeping the bootloader on the EFI partition, in fact I probably have to keep it there, but I don't want my kernel to reside on the EFI partition.
 
Yes the bootloader should on the ESP, but I am talking about the kernel.
The very first boot loader that is executed by UEFI is grub boot loader.
grub then lists kernels to the user to choose, so if you wan to have kernel(s) somewhere else you'd need to modify grub config at a minimum to instruct it at new location of the kernel.

But this won't make bootctl list something else, it will continue to list boot loaders under EFI directory.

How is it even safe and reliable to have your kernels on your EFI partition?
because if you want to encrypt your root partition then kernel may not be stored there, is should be on boot partition which isn't encrypted.

I've never done this btw, could be wrong, but I know that grubx64.efi is the first thing to be executed by UEFI and it can't be simply moved elsewhere, but you can change boot loader config to a new location of the kernel but that location (partition) should not be encrypted.
 
The very first boot loader that is executed by UEFI is grub boot loader.
grub then lists kernels to the user to choose, so if you wan to have kernel(s) somewhere else you'd need to modify grub config at a minimum to instruct it at new location of the kernel.

But this won't make bootctl list something else, it will continue to list boot loaders under EFI directory.


because if you want to encrypt your root partition then kernel may not be stored there, is should be on boot partition which isn't encrypted.

I've never done this btw, could be wrong, but I know that grubx64.efi is the first thing to be executed by UEFI and it can't be simply moved elsewhere, but you can change boot loader config to a new location of the kernel but that location (partition) should not be encrypted.

Nah, you don't get what I mean.

First of all, we don't talk about GRUB, I am talking about systemd-boot. The systemd boot loader itself HAS to reside on the EFI partition, but I am talking about the Kernel. I am not able to make systemd point to my /boot/ directory where my Kernel resides. It has to be on the EFI partition along with the boot loader. I am also not able to make a symlink because I guess it is between different partition types.

Along with that, I am wondering if I can have GRUB has a bootable operating system (it is kind of like an OS by itself) under systemd-boot. So I can go in GRUB if I want the advanced features through the Linux Boot Manager (systemd).
 
First of all, we don't talk about GRUB, I am talking about systemd-boot. The systemd boot loader itself HAS to reside on the EFI partition, but I am talking about the Kernel. I am not able to make systemd point to my /boot/ directory where my Kernel resides. It has to be on the EFI partition along with the boot loader.
I see, sorry for confusion.

According to the docs that's how it needs to be:

systemd-boot operates on the EFI System Partition (ESP) only. Configuration file fragments, kernels, initrds, other EFI images need to reside on the ESP.
...
All files need to reside on the ESP.
 

Staff online


Top