[Tutorial] Convert to systemd-boot

EndeavourOS➜  6.1.1-arch1-1  ᐅ   pacman -Qsq firmware | grep firmware
alsa-firmware
linux-firmware
linux-firmware-whence
sof-firmware
EndeavourOS➜  6.1.1-arch1-1  ᐅ

I will delete the sof-firmware, looks like bloat!

EndeavourOS➜  6.1.1-arch1-1  ᐅ  pacman -Qi sof-firmware
Name            : sof-firmware
Version         : 2.2.3-1
Description     : Sound Open Firmware
Architecture    : x86_64
URL             : https://www.sofproject.org/
Licenses        : custom:BSD  custom:ISC
Groups          : None
Provides        : None
Depends On      : None
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 16,73 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : zo 11 dec 2022 15:29:33 CET
Install Date    : ma 12 dec 2022 09:56:24 CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

Well, my ESP partition is only 100 MB, and its size is even smaller than the boot partition. Maybe I’ll try systemd-boot on a virtual machine.

Will the snapshot list still appear on the boot menu, from which I can choose to boot into?

I am still not sure if the advantages/limitations systemd-boot brings with it, as opposed to grub2 (which I see is no longer the default), are worth the switch. In my case, it’s going to be a clean system, so I want t get it right for the next few years at least.

Also, what else is so different with systemd-boot setup? I see many tutorials these days where your bootloader is the qualifier whether you can install certain packages or follow certain tutorials.

Is it better to go with the improved Grub2 for systems with btrfs root partition? What actually improved since the Grub snafu?

It seems like a personal preference, but it must have implications down the line, or sorry, that only runs on systemd-boot, or systemsd-boot ignores that configuration file, it’s only recognized/read by Grub…

I got hit with that Grub snafu and lost the ability to recover my snapshots, even though I followed precise recovery instructions, and it was supposed to work, but never did. I still could not arch-chroot into it, so it left a sour taste in my mouth as I recall how many wasted hours getting things just right the way I had it for my workflow.

You can appreciate I am still a little wary of a Grub2, even though they made some substantial improvements to an aging bootloader. I see systemd-boot has become the defualt bootloader for Cassini, and systemd-boot feels like a safeguard, but I know nothng about it and no one seems to be talking about the major differences. I wonder what convinced the dev team to switch? Maybe I have been out of the loop for too long with my health issues, but is there fast 101 on this I missed?

From what I can see, tutorials are already being separated into which one works with whichever bootloader. If it is just up to us to decide, then I would risk Grub2, but the FOMO factor plays into not going with systemd-boot, but what would we be missing out on? I already hear ability to boot directly into snapshots, but what else is lurking beneath?

I’m a pretty simple guy, and just want something that 's not overly complicated, as I thought I had with Grub, btrfs and your btrfs Assistant with snapshots. Now that I am reformatiing, I want to get this right. Am I overthinking this or does the choice of bootloader have no bearing on what we may be locked into for the future? Happy Christmas.

No.

grub and systemd-boot are different. Only you can decide which you prefer.

That being said, I want to clarify what we mean by “default” in this case. It simply means that if you click next through the installer, you will get systemd-boot. Grub is still supported and available in the installer.

It is totally different but it is just a bootloader which is a small(but important) part of the system. Unless those tutorials directly involve the bootloader, I am not sure why it would matter. In cases where it does matter, most of our wiki articles have been changed to reflect instructions for both grub and systemd-boot as we install it.

This is hard to answer. It depends what you want. If booting off snapshots and single click snapshot restores are important to you, then grub is likely the better choice. Otherwise, it doesn’t matter.

There have been no special changes to grub since then.

This is the same as any other software on your system. If you install two different music players they don’t read each others config files. Grub and systemd-boot are the same.

We didn’t switch. We started offering both. We also added the ability to not install a bootloader in case you wanted to install your own.

Systemd-boot is much simpler and very easy to support as it requires no configuration.

Of course, that doesn’t mean it is better for your needs. It is ultimately up to you which you prefer and which meets your needs better.

3 Likes

Wait, you have an ESP partition and a separate boot partition? I thought we only need one ESP partition for our bootloader?

100MB is only enough for only one kernel image, right?

On my machine (a thinkpad laptop), I did notice a slight increase in boot speed (about 2 seconds) with systemd-boot. Other than that, there’s not much significant difference in terms of performance (at least on the surface).

The other advantage of systemd-boot is that we don’t have to run grub-mkconfig every time we update kernels; then again, we can just run those with pacman hooks, so it might not matter much.

You only need one but you can have as many as you want. Although, I am not sure there is much advantage to that.

It might not even be enough for one. When the installer detects an ESP that small, it adds a second one if you choose systemd-boot.

1 Like

That’s interesting. How does this work, actually? I’m trying to imagine a use case for that, because I’ve never really encountered a situation that makes me decide to have more than one boot partition. Is it to keep different bootloaders on different partitions, perhaps?

Putting two ESPs on one disk is essentially the same as having two disks each with their own ESP. The BIOS/firmware just finds all the ESP partitions on all disks.

Yeah, it generally adds complication for not a lot of return. I don’t do that either.

Some people do it so Windows can have it’s own ESP or so that each grub can separate and then use the BIOS to switch between OSes.

One of the thing I like about systemd-boot is that since nothing is detecting anything(Except Windows) to being with, you don’t have to worry about them overwriting each other. Each distro just drops it’s own files in and the bootloader reads them.

1 Like

Yeah, Dalto’s BTRFS Assistant and pacman hooks took care of all that in the grub-btrfs. but I don’t know what happens with systemd-boot.

I guess the question is more directed to what can you and can’t be done when using respective bootloaders.

I saw a tutorial the other day, where the author said systemd-boot ignores this is that file, but grub reads it, so I guess I’m more interested in knowing what will be different once systemd-boot is the bootloader?

With systemd-boot, there is also a set of scripts (courtesy of Dalto) on the aur and the endeavouros repo to handle post upgrade operations like regenerating images, etc.

Will it be too much trouble to ask you to share a link to that tutorial?

Honestly Anthony, I have looked at so many tutorials since I realized my laptop is dying, and you get some pretty misleading info with all these so called basement dwelling experts that have emerged since the covid lockdown, that I probably can’t find it now.

When I restore the history files and get past my IT nightmare I sold be happy to DM it to you if you wish. If it’s bad info, I would not want to pollute the forum with it.

That’s understandable.

Personally, I found systemd-boot’s arch manual page very helpful. It was the first thing I read before I made the switch from Grub to systemd-boot.

1 Like

Thanks for your detailed response as is your forté. Poor choice of words om my part regarding default bootloader offering both is better.

I choose to stay with Grub2.

Sorry, I wrote it wrong: the size of the ESP partition is smaller than that of the /boot directory.

Does this mean that if the installer detects that the ESP partition is small enough, it creates another one? Because if so, then the installer is really quite intelligent, and you can only congratulate him for that.

Yes.

:partying_face:

If that’s the case. What do you think shows the fact that systemd-boot has more limited functionality than grub? Say, for example, that you have to be more sane when handling grub, and systemd-boot is foolproof, so to speak?

They are very different but the biggest difference in my opinion is that grub has it’s own file system drivers while systemd-boot uses the drivers built into the kernel.

That has many implications and drives both the additional functionality in grub as well as much of the additional complexity.

SO how do you restore snapshots on systemd-boot when/if needed?