I have multiple systems installed; first, chronologically, Windows 10, then Kubuntu 20.04, then Fedora 34 KDE, and then KaOS. Fedora is alone on a second drive, with its separate EFI, but shares that with KaOS.
The configuration is thus:
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 739327 737280 360M EFI System
/dev/nvme0n1p2 739328 1001471 262144 128M Microsoft reserved
/dev/nvme0n1p3 1001472 457750527 456749056 217,8G Microsoft basic data
/dev/nvme0n1p4 457750528 459757567 2007040 980M Windows recovery environment
/dev/nvme0n1p5 459757568 500107263 40349696 19,2G Microsoft basic data
/dev/nvme0n1p6 500107264 644737022 144629759 69G Linux filesystem
/dev/nvme0n1p7 644737023 976773134 332036112 158,3G Linux filesystem
Device Start End Sectors Size Type
/dev/sda1 2048 1230847 1228800 600M EFI System
/dev/sda2 251660288 1258293247 1006632960 480G Linux filesystem
/dev/sda3 1258293248 1875384319 617091072 294,3G Microsoft basic data
/dev/sda4 1230848 3327999 2097152 1G Linux filesystem
/dev/sda5 3328000 251660287 248332288 118,4G Linux filesystem
![enter image description here](https://i.stack.imgur.com/SqIvq.png)
![enter image description here](https://i.stack.imgur.com/mpzPY.png)
/dev/nvme0n1p1
is the EFI partition for Windows (installed on /dev/nvme0n1p2
to 5
) and Ubuntu (installed on nvme0n1p6
),
/dev/sda1
is the EFI for Fedora (/dev/sda4
and 5
) and KaOS (/dev/nvme0n1p7
)
This odd choice is related to the fact that past installation of a other Linux, beside Kubuntu, using the same EFI as Windows, has resulted in corruption of Windows boot; that was fixed by re-installing Kubuntu, which added Windows to its boot menu; I wanted to avoid such interference with Windows and therefore I have installed Fedora on a separate drive with its own EFI, and then, when I have installed KaOS on the same drive as Windows, I have selected to use the EFI from the other drive, sharing it with Fedora.
After installing KaOS its boot menu (run by systems-boot
, not grub
) didn't show the other systems.
Fedora's and Ubuntu's boot menus were hidden in the Firmware UEFI interface. Fedora's included all systems. kUbuntu's boot menu included all except Fedora.
I have used boot repair trying to make Fedora's boot menu the default one because it was the most complete (by installing grub on sda1
) but there wasn't a option to "boot first" Fedora: so, I selected Kubuntu. This resulted in Kubuntu's boot menu becoming the default, missing only Fedora.
Given that Kubuntu grub is now in control I would like to use that and just add Fedora to it. Updating grub does not help.
EDIT-1, after comments by @oldfred:
boot-repair report on pastebin -also HERE (asked in comments)
EDIT-2, after answer by @oldfred:
I have looked up the Kubuntu grub.cfg files and found that the Kubuntu boot list is determined by the file boot/grub/grub.cfg
by adding a menuentry there.
Looking at Fedora’s own grub.cfg file that I could find: there, Fedora entries are missing, only the rest of the systems are listed. Only these are also seen in Grub Customizer on Fedora: Fedora entries in its own boot list seem determined by the separate files in /loader/entries/
from its 1 GB root ext4 partition (sda4). Copying those on Kubuntu’s /boot/efi/loader/entries/ has no effect.
Being without Fedora’s own model for an entry in Kubuntu’s boot/grub/grub.cfg
, I have copied and modified the lines that I find there for KaOS — by adding Fedora’s specifications, namely the UUID. I am not sure the formatting is correct, it is exactly that for KaOS in that file, with only the name of distribution and UUID adjusted:
menuentry 'Fedora 34 KDE' --class Fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4834b108-13c9-406c-8a7b-a9c53440283c' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 F4F4-1172
else
search --no-floppy --fs-uuid --set=root F4F4-1172
fi
echo 'Loading Linux linux ...'
linux /vmlinuz-linux root=UUID=4834b108-13c9-406c-8a7b-a9c53440283c rw quiet
echo 'Loading initial ramdisk ...'
initrd /initramfs-linux.img
}
In this way Fedora name is added to the boot list of course, but doesn’t work:
with the UUID of the bfrs
partition (sda5
) I get the message:
mount: new/-root: unknown filesystem type ‘btrfs’
I have tried, just in case, with the UUID of the “root” Fedora partition (sda4
), and I get the message:
Error: root device mounted successfully but sbin/init does not exist
The correct way to go is, I think, to add the UUID of the sda5
partition; that it is the one specified in all three files aforementioned on Fedora’s /loader/entries/
It seems grub doesn’t recognize btrfs.
I have installed all “btrfs” related files that I could find using Apper, about 30 packages, but the same happens.
EDIT-3
From farther comments I understand I must not edit boot/grub/grub.cfg
but edit the file etc/grub.d/40_custom
and copy there parts of other files. But I don't understand what files should I use. I couldn't find on Fedora's own partitions something related to its own boot and its own entry in the boot list other than files in ext4
- /loader/entries
. So is it from one of those that I should copy?
Is it something like this copied from /media/root/651b659a-8fc5-46d6-b291-22b3b523ebaf/loader/entries/a037a4898b9540bfbc52f3f377b2ff4d-5.13.19-200.fc34.x86_64.conf
(that is from Fedora's 1GB ex4 partition sda4):
title Fedora (5.13.19-200.fc34.x86_64) 34 (KDE Plasma)
version 5.13.19-200.fc34.x86_64
linux /vmlinuz-5.13.19-200.fc34.x86_64
initrd /initramfs-5.13.19-200.fc34.x86_64.img
options root=UUID=4834b108-13c9-406c-8a7b-a9c53440283c ro rootflags=subvol=root rhgb quiet
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel
Or is it something like the entry for KaOS in Kubununtu's file boot/grub/grub.cfg
posted under EDIT-2 above?