Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update boot_managers.md #80

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/content/docs/installation/boot_managers.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@ handles the task of loading an OS kernel into memory, often along with support f
For a more detailed explanation and the reason both terms are often used interchangeably,
please see "[Managing EFI Boot Loaders for Linux: Basic Principles](https://www.rodsbooks.com/efi-bootloaders/principles.html)" by Rod Smith.

Here is the feature comparison table for the boot managers, accompanied by additional details and recommendations:

### **Feature Comparison Table**

| **Feature** | **systemd-boot** | **rEFInd** | **GRUB** |
|----------------------------|---------------------------------------|---------------------------------------|------------------------------------|
| **UEFI Support** | ✅ Yes | ✅ Yes | ✅ Yes |
| **BIOS Support** | ❌ No | ❌ No | ✅ Yes |
| **Autodetection** | ❌ Limited (manual configuration) | ✅ Full autodetection | ✅ Autodetection (regenerates config) |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a reader I don't know what "autodetection" entails. Is it autodetection of various kernel versions or autodetection of the various operating systems installed on the system?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it should be an autodetection of kernel versions. I can change that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, all of them support autodetection, without any caveats. systemd-boot-manager will update entries and create new ones for each kernel version. GRUB also has kernel hooks for this, no need to regenerate the config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that better?

| **Autodetection of kernel versions** | ✅ Supported                        | ✅ Supported                         | ✅ Supported                         |

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just remove this. All of them support it and it seems to be a nobrainer feature to have in any boot manager that users shouldn't even think about this.

| **Theming/Customization** | ❌ Minimal | ✅ Extensive | ✅ Extensive |
| **Configuration Complexity**| Simple | Moderate | Complex |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really agree with this either, but I would need to fact check on rEFind's configuration

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can look into this, but since I don’t personally use rEFInd, it may take some time.

| **Secure Boot Support** | ✅ Yes | ✅ Yes | ✅ Yes |
| **Filesystem Support** | FAT, FAT16, FAT32 | FAT, EXT4, BTRFS | Most Linux FS |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it is true that GRUB has support for loads of filesystems, I believe that the support is strictly read-only. For example, see CachyOS/distribution#59 where GRUB fails to write grub.env to a BTRFS filesystem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure how to solve this at the moment, but I can try investigating which filesystems are specifically supported by GRUB.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is likely sufficient to add a footnote clarifying that certain filesystems aren't supported (right not those that come to mind are BTRFS and ZFS).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.gnu.org/software/grub/manual/grub/html_node/Features.html?

Support multiple filesystem types transparently, plus a useful explicit blocklist notation. The currently supported filesystem types are Amiga Fast FileSystem (AFFS), AtheOS fs, BeFS, BtrFS (including raid0, raid1, raid10, gzip and lzo), cpio (little- and big-endian bin, odc and newc variants), Linux ext2/ext3/ext4, DOS FAT12/FAT16/FAT32, exFAT, F2FS, HFS, HFS+, ISO9660 (including Joliet, Rock-ridge and multi-chunk files), JFS, Minix fs (versions 1, 2 and 3), nilfs2, NTFS (including compression), ReiserFS, ROMFS, Amiga Smart FileSystem (SFS), Squash4, tar, UDF, BSD UFS/UFS2, XFS, and ZFS (including lzjb, gzip, zle, mirror, stripe, raidz1/2/3 and encryption in AES-CCM and AES-GCM).

btw: BTRFS should works, idk what happened.

Copy link
Member

@1Naim 1Naim Dec 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned previously, the support mentioned here seems to indicate a sufficient condition for reading, not writing. The issue seems to be that GRUB doesn't support sparse files, which BTRFS and some others do from compression or so.

edit: The "unsupported" part of this has to do with saving default entries. If that feature is off, then GRUB is happy.

| **Encrypted Boot** | ❌ No | ❌ No | ✅ Yes (boot partition) |
| **Hardware Compatibility** | UEFI-only | UEFI-only | UEFI and BIOS |
| **Ease of Setup** | Moderate | Easy | Moderate |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can "bait" users into thinking that the other boot managers except rEEFInd is "hard" to setup while it's not true. Can you give cases where GRUB and sd-boot are harder to setup than rEFInd? In the context of CachyOS, systemd-boot is complemented with systemd-boot-manager which aids in creating new entries for the each kernel installed/updated and a generic way to configure entries from one file (similar to GRUB).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I have sometimes struggled to configure and maintain GRUB and ended up with a broken system. That's why I wrote this. SystemD booting is easy via systemd-boot-manager, true.

I would say we can also remove this section, because the diffculty of configure this up is marginal?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say we can also remove this section

Instead of removing it altogether, I think replacing it with "Partition Table" would be better. In the context of setting up boot managers, all of it is handled by the installer. The only case where a user would have to do it themselves is through manual partitioning, in which case adding a partition table comparison would make sense. Consider https://wiki.cachyos.org/installation/installation_on_root/#manual-partitioning No. 5 for that. (Note that these partition tables aren't strict requirements[1][2], it's just what CachyOS uses.)

[1] rEFInd used to have a three-partition table, /boot, /boot/efi and /
[2] It is also possible for systemd-boot to have separate ESP (EFI binaries) and boot partitions (kernel image and initramfs).

| **Best Use Case** | UEFI systems, single OS | UEFI, multi-boot | BIOS systems or encrypted boot partitions |

## systemd-boot
Part of systemd family, systemd-boot was created to be as simple as possible, therefore it only has support for UEFI based systems. This simple yet efficient design ensures it is reliable and fast. However this comes at the cost of advanced features supported by other boot managers.

Expand Down