Systemd-boot and Grub together?

Reading I found someone saying here “You could just install GRUB alongside systemd-boot in case you need grub-btrfs’ functionality.” and here that “GRUB and Systemd-boot should be able to coexist inside the same system”

I never thought this can be possible as both are complete;y different?

How can this be done?
How to chose which one to boot or reboot to?
Any risks?
Anyone tried?
What happens if Grub Breaks?

Too many questions that cannot be answered in general.

Thus the only general answer to most all your questions is:

“It depends…” :v:

You install both.

The selection is done via the priorities in your BIOS/firmware.

I am not sure it would work with our default packages, you would probably need to build custom automation for dracut. It would require you to write, test and maintain custom scripts.

Also, you would need to maintain both in parallel so it would be extra effort and configuration.

It depends in what way it breaks.

2 Likes

one mode to have both on one disk is
you may include systemd-boot in existing GRUB

look to @dalto answer —> requires to write a custom script

Summary

Willy Wonka & the Chocolate Factory - Pure Imagination Scene (4/10) | Movieclips - YouTube

:hugs:

3 Likes

Thanks a lot @dalto

and @ivanhoe

and @colin
And yes @BONK it seems to be pure immagination.
I see it is not that simple (for me at least), what I read gave me an impression it is just install Grub, reboot, select form a menu to bot through Grub or systemd-boot!
I wish it was that simple.

Though I still hope someone would come up with something for systemd-boot that gives options to boot from earlier snapshots as Grub does. I think it can be done. It is software anyway!

Here is a clue I see @colin

If I can include systemd-boot in existing Grub (that is having a menu option in Grub to boot via systemd-boot? Am I getting it right?), can it be done the other way round (having a menu entry in systemd-boot to boot via Grub?)
This would be great!

What are the advantages of using systemd-boot over Grub if having the option to boot into snapshots is crucial for your use case?

Grub seems to be actively developed and still is the default for many distributions. A perfectly valid option one would think.

1 Like

I don’t remember that ever happening. :slight_smile:

No, need to repeat again, the “modifications” done by Grub that caused the problem that users encountered, well my personal point of view it does not fit with me, if I am updating/upgrading any software it should be just updated and should not require I do something else!

Secondly, systemd-boot became the default for EndeavourOs, this indicates something for me! Generally I prefer to go with the defaults.

This topic is not “political” by any means, I am just a user, I am just think, dreaming, hoping of features or developments that male the system better, easier to use and more efficient.

You forgot the second part:

What is default is because someone has chosen/decided it to be that way. They are not written into stone.

Personally if it doesn’t fit my use case, I would use something else that does.

With that said, I am not advocating for or against anything so it is not political as you insinuate.

I am just saying IF having the option to boot into snapshot is important to you, Linux gives you other options that the so called “defaults”.

All that said, I would like to quote a wise man here on the forum:

Your system, your rule.

4 Likes

Thanks @pebcak
That “someone” who “decided it to be that way” are the EndeavourOS developers whom I trust 1000% are doing the right thing, and gave us the wonderful EndeavourOS! This is why I prefer to follow.

Me as well, I am by no means with or against any. The post is mainly about the possibility of using “both” and not against “any” of the two. Having the best of both worlds.

Just think of this post as just brainstorming and a simple question if I can do it as an option within systemd-boot or by having a menu to select to boot from it or from Grub! (which I understand now it is not that simple)
That’s all.

1 Like

Good luck then with your endeavour to find a way to integrate Grub and systemd-boot.
That would certainly be appreciated by many users I suppose.

Cheers

:wave:t5:

2 Likes

It is not necessarily integrating both, or using this or that.
It is about having the best of both worlds.
I wish and hope I can be useful to this community.

1 Like

Would you like to try installing both and testing this setup for example in a virtual machine?

Here’s a little off topic.

I didn’t know that the comment told about EFIFS (it’s called EFI filesystem drivers) from your link of reddit. I researched it a bit, this may support multiple different filesystems and is based on GRUB2 driver.

systemd-boot developer already planned to load any driver into EFI stub, that I suspect.
See: https://github.com/systemd/systemd/issues/15617

Archlinux will plan to support for systemd-boot reading filesystems with EFI driver or not:

do you mean both loaders installed in the same OS?
or do you mean two seperate OS (systemd and grub) in one bootmenue (grub or systemd)

As the OP said, both bootloaders alongside in the same system.
But other kind of testing may be useful too to find how it works and what other system settings may be needed.

Sure I do not mind trying it, if it will be simple to implement fro a non techie like me (though I do not mind trying anyway as I am sure all wonderfull forum members will be here with me) AND IF and ONLY IF upon booting/rebooting I will get:
1- a menu to select from to boot via sytemd-boot or Grub, or
2- systemd-boot as usual but with an option to select to boot via Grub, or (and much better)
3- systemd-boot that by itself gives options for previous sanpshots as Grub did.

My humble, simple though not that techie, what Grub does, is software, Grub itself is a software, systemd-boot as well is a software. So, it can be done, maybe have a new one called systemd-grub! (that is boot from systemd-boot with features of booting from a snapshot!

I am dreaming I know, but dreaming of something is the first step of getting it. (airplanes, reaching the moon, diving in the ocean… you name it)

Above, I answered your questions. Let me be more specific.

Given your stated needs and what you say above you should absolutely not do this.

There are a lot of reasons for this:

  • You are increasing complexity and increasing your chance of breakage
  • You will have to rewrite the automation around dracut
  • You stated that the reason you want to use systemd-boot is that it is the default but by making this change you would be creating a completely non-standard setup that would make it difficult for other members to help you with troubleshooting. You would be on your own.
  • The benefit you get with this solution is much less the downsides

IMO, the only reason to do this would be as an experiment. In the real world, this is a worst of both worlds solution, not what you are envisioning it to be.

It absolutely isn’t. You need the ability to read through and understand all our existing automation scripts, understand what they do and then write your own scripts and hooks to replace them.

This would be the result you would get.(Or the opposite, it would be your choice if you start with grub or systemd-boot)

3 Likes

And I really appreciate it and appreciate all your valuable inputs.

I will never do it! You know I am not that techie… please, just look at ti as I am thinking loud with you, or as someone a thousand years ago hoping he can fly in the sky or as brainstorming, or…

This is more than enough for me to tell my self no thank you!

As I said in my first post, I found it on 2 websites, I thought it is something like just installing Grub and that’s it.
But I see, it is not the case.

1 Like