If possible and if your system has a decent UEFI boot menu, it would be easiest to just use the UEFI boot menu to select which system to boot.
There are different ways to get to the UEFI boot menu
Hit the magic key during boot. For example DEL, F2, F12, or ESC
select the UEFI firmware entry in the grub2 menu.
run systemctl restart --firmware-setup from your Fedora system.
Setting up multiboot in Kinoite will be tricky and it depends on the history of the system. It is really not supported out of the box on the ostree based versions.
It’s becoming the “official” workaround to have a distinct /boot/efi partition for the atomic desktop installation. This happens by default IIRC when the OS’s are on different disks, but need to be custom added when installed on the same disk as the other OS.
On one of my systems I’ve recently installed Fedora Silverblue alongside Windows on the same disk, and I’m choosing the non-default OS via the UEFI boot selection menu, as mentioned above by Villy.
At this point it’s better to have the boot order adjusted, so that the OS used more often would be the top entry.
That entry is only available in the traditional Fedora editions, but not there in the Grub list of Fedora atomic desktops.
In your case, try to identify the keyboard shortcut (try the higher Function keys - F8 to F12) of your system to be pressed right after booting up the system, in order for the UEFI boot selection menu to be revealed.
yes if i press F8 then a menu appear and can let me choose to boot either on Cachy OS or on Fedora.
But what i want is to have Cachy OS entry line in the grub of Fedora Kinoite to not have to type F8 each time i want to boot on an OS or an another one.
There might be some, but I don’t know of any such methods that can reliably add and make persistent custom GRUB entries. That’s why the general recommendation seems to be to go via the UEFI boot selection mode.
FWIW, I’ve seen people report success with getting one Grub loader to load another’s configuration by adding a small /boot/grub2/custom.cfg file to the one that normally boots.
Disclaimer, I do not know how likely that is to work in all cases. You might have to load additional modules (e.g. filesystem drivers) in some cases depending on what is available and what is needed.
Edit: Note that you do not need insmod chain when using the configfile .../grub.cfg method of loading the second OS configuration. The user in that other thread left that extra line from an earlier example, but it wasn’t needed.
Yes, I expect that the additional menu option would be most useful on the one that normally boots. However, if you want to be able to change your mind and go back to the first system after “chain loading” the second system, it should work to add a custom menu entry on the secondary system that would use the same concept to reload the first system’s boot menu.
menuentry “Cachy OS” {
insmod chain
insmod ext2
search --no-floppy --fs-uuid --set=root “the UUID XXXXXXX of my cachy OS NVME”
set prefix=($root)/boot/grub
configfile ($root)/boot/grub/grub.cfg
}
Don’t put a space in the custom.cfg filename (I assume that was just a typo).
You don’t need insmod chain if you are not using the chainloader command (which you are not).
ext2 is not Btrfs. Which you will need to use depends on what filesystem the target grub.cfg file is on. lsblk -f will list what filesystems your partitions are formatted with and their UUIDs.
What the OS is installed on doesn’t matter. What filesystem the grub.cfg file is on does matter. Those might be one-and-the-same, or they might not be. So maybe. (But I don’t know what the name of the Btrfs filesystem module/driver is for grub. btrfsseems likely. In all likelihood, the Btrfs driver is already loaded anyway for Fedora, so you probably wouldn’t need to list that one explicitly. Though it wouldn’t hurt.)