As you know, os prober cannot find Fedora Linux on Arch Linux. I’m currently using Fedora’s grub, but it doesn’t properly handle the entry of Arch-based distributions into grub. How to manually add Fedora to the EndeavourOS grub menu?
You can manually create Grub boot entries in /boot/grub/grub.cfg
, see this article here: https://wiki.archlinux.org/title/GRUB#Custom_grub.cfg
Mount the Fedora partition somewhere and look in the boot directory to identify the kernel and initramfs files. Then, edit /etc/grub.d/40_custom
to add a custom entry for Fedora.
menuentry "Fedora Linux" {
set root=(hd0,2)
linux /boot/[name of kernel] root=/dev/sda2 ro quiet
initrd /boot/[name of initramfs]
}
Replace (hd0,2)
with the correct Grub identifier for your Fedora partition. (hd0,2)
refers to the first hard drive and the second partition. Adjust this if necessary. And replace /dev/sda2
with the correct partition for your Fedora root.
Finally, regenerate the Grub config.
sudo grub-mkconfig -o /boot/grub/grub.cfg
If you can’t get that working for some reason, another option is to install the rEFInd boot manager and use that for choosing the distro you want to boot at startup.
Maybe this could help: https://www.lorenzobettini.it/2024/07/multibooting-fedora-and-arch-with-grub/
Thanks, I always find your articles useful. If I understand correctly, in this case you also prefer to use Fedora’s grub.
Glad you find them helpful
Yes, it’s better to leave Fedora as the main one, due to its way to do the updates (requiring reboots}.
Nice article, but I found one thing it mentions that I’ve never run into: the installation of updates after a reboot, which then can trigger another reboot.
Fedora has its way of updating the system, which requires rebooting, installing updates, reboot again. This process doesn’t work well when Fedora is not the principal booting system; at least, it requires attention to manually select the Fedora entry a few times during this update/booting process. Thus, it’s better to keep Fedora as the principal booting system.
I’ve been running Fedora Rawhide for well over a year and this has never happened. Unless, of course, the author is referencing automatic updates, which I never use. (Well, it does happen when upgrading to a new version, like 39 to 40, but that another subject altogether).
The one thing that I have run into is disabling BLSCFG, which has led to an unbootable system.
With Fedora, you only have to be careful that it handles the kernel entries of Arch-based distributions differently (initrd vs initfram), so after each grub package update on Fedora, grub.cfg must also be modified accordingly for the EndeavorOS entries.
Yes, in this respect Fedora’s update mechanism is similar to Windows’.
Yes, I was referring to that, e.g., when you update through gnome software
I don’t use gnome-software to update my Fedora box.
Sometimes, When I haven’t been updating the system for a long time and there are a lot of packages to be updated, I have done an offline update which I guess is pretty similar to what gnome-software does:
sudo dnf offline-update download
sudo dnf offline-update reboot
I believe the process should be similar to what is described here:
https://www.freedesktop.org/software/systemd/man/latest/systemd.offline-updates.html
However, oftentimes, just a:
sudo dnf update
cut it for me.
dnf upgrade --refresh for me and if there is a new kernel then I already know i need to reboot