You are not logged in.
Hi all, I've already checked the arch wiki on this, but there seems to be no solution. I want to move from grub to systemd-boot, but I have /boot as just a folder on my root btrfs partition. The arch wiki claims that systemd-boot can boot from any file system your BIOS recognises, but how do I add drivers/whatever for btrfs to systemd-boot? Should I have made another /boot partition when installing anyway?
(my ESP is on /efi)
Edit: I forgot to mention, systemd-boot only detect Windows 10 on my disk, and not the Arch partition.
Last edited by Somerandomnerd (2022-04-05 11:34:04)
Offline
You can't, you need to use GRUB or refind for this if you want btrfs support. You could create another FAT partition and mount that to /boot if you don't want to reuse the ESP directly, but you need to make it adhere to the extended boot loader spec: https://wiki.archlinux.org/title/System … g_XBOOTLDR
Last edited by V1del (2022-04-05 14:29:59)
Online
Hi,
did you add "rootflags=subvol=@" in your systemd-boot input options?
a "bootctl status" output would be welcome.
I don't love rosbeef
Offline
loader.conf
#timeout 3
#console-mode keep
default arch.conf
timeout 4
console-mode max
editor no
arch.conf
title Arch Linux
linux /vmlinuz-linux-lts
initrd /intel-ucode.img
initrd /initramfs-linux-lts.img
options root=UUID=930ff009-8fb5-4422-a745-c51e8f98072b zswap.enabled=0 loglevel=3 rootflags=subvol=@ rw
sudo bootctl status
System:
Firmware: n/a (n/a)
Secure Boot: disabled (unknown)
TPM2 Support: yes
Boot into FW: supported
Current Boot Loader:
Product: n/a
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
✗ Load drop-in drivers
✗ Boot loader sets ESP information
ESP: n/a
File: └─n/a
Random Seed:
Passed to OS: no
System Token: set
Exists: yes
Available Boot Loaders on ESP:
ESP: /efi (/dev/disk/by-partuuid/97ec61d0-6cc7-4a87-9d8c-7513345ae61d)
File: └─/EFI/systemd/systemd-bootx64.efi (systemd-boot 250.4-2.1-arch)
File: └─/EFI/BOOT/BOOTX64.EFI (systemd-boot 250.4-2.1-arch)
File: └─/EFI/BOOT/BOOTIA32.EFI
Boot Loaders Listed in EFI Variables:
Title: arch
ID: 0x0000
Status: active, boot-order
Partition: /dev/disk/by-partuuid/97ec61d0-6cc7-4a87-9d8c-7513345ae61d
File: └─/EFI/arch/grubx64.efi
Title: Linux Boot Manager
ID: 0x0002
Status: active, boot-order
Partition: /dev/disk/by-partuuid/97ec61d0-6cc7-4a87-9d8c-7513345ae61d
File: └─/EFI/systemd/systemd-bootx64.efi
Title: rEFInd Boot Manager
ID: 0x0003
Status: active, boot-order
Partition: /dev/disk/by-partuuid/97ec61d0-6cc7-4a87-9d8c-7513345ae61d
File: └─/EFI/refind/refind_x64.efi
Title: Windows Boot Manager
ID: 0x0001
Status: active, boot-order
Partition: /dev/disk/by-partuuid/97ec61d0-6cc7-4a87-9d8c-7513345ae61d
File: └─/EFI/Microsoft/Boot/bootmgfw.efi
Boot Loader Entries:
$BOOT: /efi (/dev/disk/by-partuuid/97ec61d0-6cc7-4a87-9d8c-7513345ae61d)
Default Boot Loader Entry:
title: Arch Linux
id: arch.conf
source: /efi/loader/entries/arch.conf
linux: /vmlinuz-linux-lts (No such file or directory)
initrd: /intel-ucode.img (No such file or directory)
/initramfs-linux-lts.img (No such file or directory)
options: root=UUID=930ff009-8fb5-4422-a745-c51e8f98072b zswap.enabled=0 loglevel=3 rootflags=subvol=@ rw
WARNING: default boot entry is broken
I think the cause is that it should be @/vmlinuz instead of /vmlinuz and so forth... gonna try it
edit: does not work
Last edited by Somerandomnerd (2022-04-05 15:54:50)
Offline
you have refind and systemd-boot, i think 1 bootloader would be enough.
moreover there is still a grub entry.
it looks like the linux images are not in the right place.
I have something like that, if it helps you:
bootctl status :
System:
Firmware: UEFI 2.70 (American Megatrends 5.17)
Secure Boot: disabled (setup)
TPM2 Support: yes
Boot into FW: supported
Current Boot Loader:
Product: systemd-boot 250.4-2-arch
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
✓ Load drop-in drivers
✓ Boot loader sets ESP information
ESP: /dev/disk/by-partuuid/cf441c61-ed1f-40b5-93ef-a398aa9ab89b
File: └─/EFI/SYSTEMD/SYSTEMD-BOOTX64.EFI
Random Seed:
Passed to OS: yes
System Token: set
Exists: yes
Available Boot Loaders on ESP:
ESP: /boot (/dev/disk/by-partuuid/cf441c61-ed1f-40b5-93ef-a398aa9ab89b)
File: └─/EFI/systemd/systemd-bootx64.efi (systemd-boot 250.4-2-arch)
File: └─/EFI/BOOT/BOOTX64.EFI (systemd-boot 250.4-2-arch)
Boot Loaders Listed in EFI Variables:
Title: Linux Boot Manager
ID: 0x0000
Status: active, boot-order
Partition: /dev/disk/by-partuuid/cf441c61-ed1f-40b5-93ef-a398aa9ab89b
File: └─/EFI/SYSTEMD/SYSTEMD-BOOTX64.EFI
Title: Windows Boot Manager
ID: 0x0002
Status: active, boot-order
Partition: /dev/disk/by-partuuid/cf441c61-ed1f-40b5-93ef-a398aa9ab89b
File: └─/EFI/MICROSOFT/BOOT/BOOTMGFW.EFI
Boot Loader Entries:
$BOOT: /boot (/dev/disk/by-partuuid/cf441c61-ed1f-40b5-93ef-a398aa9ab89b)
Default Boot Loader Entry:
title: Arch Linux
id: arch.conf
source: /boot/loader/entries/arch.conf
linux: /vmlinuz-linux
initrd: /amd-ucode.img
/initramfs-linux.img
options: root="LABEL=arch_os" rootflags=subvol=/@ audit=0 rw
lsblk :
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 2,7T 0 disk
└─sda1 8:1 0 2,7T 0 part /3to
nvme1n1 259:0 0 232,9G 0 disk
├─nvme1n1p1 259:2 0 512M 0 part /boot
├─nvme1n1p2 259:3 0 1G 0 part [SWAP]
└─nvme1n1p3 259:4 0 231,4G 0 part /var/log
/home
/.snapshots
/
nvme0n1 259:1 0 465,8G 0 disk
├─nvme0n1p1 259:5 0 16M 0 part
└─nvme0n1p2 259:6 0 465,7G 0 part
ls /boot :
total 153M
drwxr-xr-x 5 root root 4,0K 1 janv. 1970 ./
drwxr-xr-x 1 root root 170 23 déc. 16:54 ../
drwxr-xr-x 7 root root 4,0K 21 nov. 18:31 EFI/
drwxr-xr-x 3 root root 4,0K 5 avril 08:34 loader/
drwxr-xr-x 2 root root 4,0K 20 févr. 18:43 'System Volume Information'/
-rwxr-xr-x 1 root root 50K 11 mars 20:21 amd-ucode.img*
-rwxr-xr-x 1 root root 84M 3 avril 08:17 initramfs-linux-fallback.img*
-rwxr-xr-x 1 root root 60M 3 avril 08:17 initramfs-linux.img*
-rwxr-xr-x 1 root root 11M 29 mars 20:41 vmlinuz-linux*
ls /boot/EFI :
drwxr-xr-x 7 root root 4,0K 21 nov. 18:31 ./
drwxr-xr-x 5 root root 4,0K 1 janv. 1970 ../
drwxr-xr-x 2 root root 4,0K 21 nov. 18:32 arch_netboot/
drwxr-xr-x 2 root root 4,0K 18 mars 22:28 BOOT/
drwxr-xr-x 2 root root 4,0K 18 nov. 10:56 Linux/
drwxr-xr-x 4 root root 4,0K 25 déc. 12:20 Microsoft/
drwxr-xr-x 2 root root 4,0K 18 mars 22:28 systemd/
I don't love rosbeef
Offline
you have refind and systemd-boot, i think 1 bootloader would be enough.
moreover there is still a grub entry.
I have refind in case grub doesn't work, and systemd-boot doesn't work so I am using grub to boot.
And to the rest of the message, I have ESP on /efi, but yeah, basically the same.
Offline
Again. You can't make systemd-boot boot from a btrfs partition. The "drivers" in this case would need to be provided by your actual motherboard. You can either substitute your ESP for /boot and put everything there or create an additional FAT partition.
Online
Figured it out, systemd-boot can only see /efi as /. no other partition.
Guess I'll have to make seperate /boot if I want it to work :shrug:
Offline
You can't make systemd-boot boot from a btrfs partition. The "drivers" in this case would need to be provided by your actual motherboard
Alright, sorry for bothering you.
Offline
What you read about it reading other filesystems means that it can load from the ESP or XBOOTLDR partitions with other filesystems. What you're trying isn't going to work.
Edit: wow, WAY too slow.
Last edited by Scimmia (2022-04-05 16:12:16)
Offline
Again. You can't make systemd-boot boot from a btrfs partition. The "drivers" in this case would need to be provided by your actual motherboard. You can either substitute your ESP for /boot and put everything there or create an additional FAT partition.
That's actually not true anymore. As of systemd 250:
* sd-boot gained support for automatically loading all EFI drivers
placed in the /EFI/systemd/drivers/ subdirectory of the EFI System
Partition (ESP). These drivers are loaded before the menu entries are
loaded. This is useful e.g. to load additional file system drivers
for the XBOOTLDR partition.
Offline
You can't, you need to use GRUB or refind for this if you want btrfs support. You could create another FAT partition and mount that to /boot if you don't want to reuse the ESP directly, but you need to make it adhere to the extended boot loader spec: https://wiki.archlinux.org/title/System … g_XBOOTLDR
But somehow I managed to run systemd-boot in a btrfs partition without XBOOTDLR.
Offline
V1del wrote:You can't, you need to use GRUB or refind for this if you want btrfs support. You could create another FAT partition and mount that to /boot if you don't want to reuse the ESP directly, but you need to make it adhere to the extended boot loader spec: https://wiki.archlinux.org/title/System … g_XBOOTLDR
But somehow I managed to run systemd-boot in a btrfs partition without XBOOTDLR.
Oh? And where are your kenrel/initramfs?
Offline
I don't know if it's possible:
- copy "microsoft" folder
- chroot
- uninstall refind and grub
- format /boot partition
- install systemd-boot
- generate linux image
- copy "microsoft" folder
- add the microsoft entry ? https://wiki.archlinux.org/title/System … om_Windows
I don't love rosbeef
Offline
diyfan wrote:V1del wrote:You can't, you need to use GRUB or refind for this if you want btrfs support. You could create another FAT partition and mount that to /boot if you don't want to reuse the ESP directly, but you need to make it adhere to the extended boot loader spec: https://wiki.archlinux.org/title/System … g_XBOOTLDR
But somehow I managed to run systemd-boot in a btrfs partition without XBOOTDLR.
Oh? And where are your kenrel/initramfs?
in /boot
and my ESP is in /efi
I had btrfs-progs installed, maybe that's why it worked for me
Offline
Scimmia wrote:diyfan wrote:But somehow I managed to run systemd-boot in a btrfs partition without XBOOTDLR.
Oh? And where are your kenrel/initramfs?
in /boot
and my ESP is in /efi
I had btrfs-progs installed, maybe that's why it worked for me
No, btrfs-progs has nothing to do with any of this.
There is no way for systemd-boot to be reading /boot on your btrfs root. It just doesn't work that way. If I had to guess, you're actually using grub or something.
Offline
This should be possible. Has anyone tried it?
systemd version 250 introduced this in December 2021.
✓ Load drop-in drivers
Arch has a community package named efifs that adds the efi drivers from https://efi.akeo.ie/ to /usr/lib/efifs-aa64/ and from there you copy the ones you want to [efi partition]/EFI/systemd/drivers/ and they get automatically loaded.
I'd appreciate if anyone has any experience on this before I rearrange my partition scheme. Thanks.
If it works well, then the wiki needs an update!
Last edited by brian001 (2022-04-10 13:50:49)
Offline
Well the stipulation that you'd need a XBOOTLDR marked partition still holds regardless. Not sure how well things will behave if you change the identifier for your root GUID: https://wiki.archlinux.org/title/System … g_XBOOTLDR , I'd guess from a linux perspective this shouldn't matter much, but don't have any hands on expereince.
Last edited by V1del (2022-04-10 14:09:31)
Online
It's difficult to tell with almost no documentation of the new feature, but from glanicing through the git issues and commits I get the impression that XBOOTDLR is completely separate.
Right now I put my kernel and initrd on my FAT efi system partition with a LUKS encrypted ext4 root partition.
I would like to move to btrfs with encryption. What is the advantage of having kernels and initrds on a separate unencrypted btrfs partition rather than the ESP? Snapshots of the kernels?
Offline
More fault resilience than FAT is my usual argument, you can trivially corrupt your FAT partition if you have e.g. a blackout after an update without an explicit sync. Fairly certain that no matter the driver, actual unencryption of a drive is still currently out of scope.
Regarding the "completely seperate" I don't get that impression at all. You still need to have a partition explicitly marked as such so that it is even considered to be loaded and looked at for entries, unless my reading comprehension is completely shot.
E.g. https://github.com/systemd/systemd/blob … 2488-L2497 there are entries added on the root dir (... in this case systemd-boot's root which is the ESP) and an additional line for explicitly checking XBOOTLDR partitions
Last edited by V1del (2022-04-10 18:04:58)
Online
You might be right.
But I was thinking of a situation where I have a small unencrypted install of archlinux as an emergency recovery partition. I could put the kernel and initrd in /boot on that partition to keep it separate. If I format that partition as btrfs and then I reference that partition by UUID in a loader entry in systemd-boot, then it should work if the file system driver has been loaded. I wouldn't get the autodiscovery of using XBOOTLDR, but the partition would be self contained and I could load it from systemd-boot.
I guess I'll have to test it.
Edit: altho as an emergency recovery, it might be better to have the /boot on FAT so I could boot it directly from bios?
Last edited by brian001 (2022-04-11 13:13:36)
Offline
AFAIK, systemd-boot has no way to "reference that partition".
Offline
Not sure whether a loader entry allows to lookup arbitrary UUIDs. but for the case as you describe it I'd just try to set the XBOOTLDR GUID, AFAIK linux doesn't actually require that to be of a certain value.
Last edited by V1del (2022-04-11 13:49:24)
Online
I see. So at this time, systemd-boot will only load a kernel from the ESP or the XBOOTLDR with their unique GUIDs.
And if you make a XBOOTLDR with a file system other than fat32, you gain some advantages, but you lose the ability to load directly from most efi bioses.
Last edited by brian001 (2022-04-11 14:20:56)
Offline
I see. So at this time, systemd-boot will only load a kernel from the ESP or the XBOOTLDR with their unique GUIDs.
Well, kind of. It's from the partition that systemd-boot is on or XBOOTLDR. Since the firmware's boot manager does reference things by PARTUUID, the partition systemd-boot is on doesn't technically have to be an ESP, but it generally is. Systems can also have more than 1 ESP, but systemd-boot won't load things from the ones it's not on.
Last edited by Scimmia (2022-04-11 14:33:00)
Offline