GRUB not finding 2nd instance of Fedora for multi-boot
FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
GRUB not finding 2nd instance of Fedora for multi-boot
I have two separate instances of Fedora 40 installed (Xfce and KDE) on a drive with several partitions. The reason why is, it's a low-spec laptop, and I wanted to minimize any additional "fluff" on each installation. I was trying not to have multiple DEs installed on the same OS installation.
Xfce was installed first, and worked great. Then I altered the partition sizes, created new ones and installed the KDE spin of F40.
Now, there are no GRUB entries for the Xfce spin--only three for KDE (latest and previous kernel + recovery).
I've tried running os-prober, which does find the Xfce version:
Code:
$ sudo os-prober
/dev/sda3:Fedora Linux 40 (Xfce):Fedora:linux:btrfs:UUID=a5807fe9-f2f6-42b3-b8a2-e0b7ea03bdf0:subvol=root00
Then...
Code:
$ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Generating grub configuration file ...
Found Fedora Linux 40 (Xfce) on /dev/sda3
Adding boot menu entry for UEFI Firmware Settings ...
done
However when I run the following:
Code:
$ sudo cat /boot/efi/EFI/fedora/grub.cfg
grub.cfg does not show the Xfce in the os-prober section:
Code:
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
If I have to give up one or the other, I'd rather have access to the Xfce installation. It "just worked" and the KDE installation is shaky at best on this low-powered laptop. The KDE installation was installed just to see how it would perform, whereas the Xfce installation was set up to my liking.
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.8-300.fc40.x86_64
Found initrd image: /boot/initramfs-6.8.8-300.fc40.x86_64.img
fgrep: warning: fgrep is obsolescent; using grep -F
Found linux image: /boot/vmlinuz-6.8.5-301.fc40.x86_64
Found initrd image: /boot/initramfs-6.8.5-301.fc40.x86_64.img
fgrep: warning: fgrep is obsolescent; using grep -F
Found linux image: /boot/vmlinuz-0-rescue-a07923d2c524436688708621f98c6e90
Found initrd image: /boot/initramfs-0-rescue-a07923d2c524436688708621f98c6e90.img
fgrep: warning: fgrep is obsolescent; using grep -F
Found Fedora Linux 40 (Xfce) on /dev/sda3
Adding boot menu entry for UEFI Firmware Settings ...
done
It found the Xfce installation...
Booting now looks a bit different. My GRUB options are Fedora, Advanced options and UEFI. Advanced Options lists the same two kernels and a recovery, but all three entries now have a separate recovery option.
have this in /etc/default/grub, and rerun grub2-mkconfig
Code:
GRUB_DISABLE_OS_PROBER=false
Done... I am still not sure which grub.cfg file is being used by GRUB, so I've been building both /boot/grub2/grub.cfg and /boot/efi/EFI/fedora/grub.cfg
I've always run os-prober beforehand. When I run 'cat' on either file and examine the contents, the Xfce option isn't listed.
Was the installation of the XFCE version of Fedora an EFI install? If it was a Legacy install and is on the same drive it probably won't boot from an EFI Grub.
What happens when you run: sudo grub2-mkconfig /boot/grub2/grub.cfg
The grub.cfg file generally used on most Linux systems with this command is the one in the /boot/grub2 directory and the grub.cfg file on the EFI partition generally points to this main grub.cfg file which contains the menuentries. You might take a look at the link below to the FedoraProject. I don't use Fedora so don't know what changes they make to Grub.
Grub has problems picking up other distros kernels that have a btrfs file system. I think it has something to do with how the files are organized on a btrfs partition. The sub menu listing is the grub.cfg of the other installed fedora system.
Last edited by colorpurple21859; 05-10-2024 at 10:36 PM.
Grub has problems picking up other distros kernels that have a btrfs file system. I think it has something to do with how the files are organized on a btrfs partition. The sub menu listing is the grub.cfg of the other installed fedora system.
Oddly, while booted into Xfce, The Xfce options do not exist when I look at Grub in grub customizer...
Oddly, while booted into Xfce, The Xfce options do not exist when I look at Grub in grub customize
I think that is because fedora uses something called BLSCFG where grub references config files in /boot/loader/entries to produce grub default menu entries
before running grub-customizer so grub-customizer will pick up the other fedora mount it with a command similar to this:
Code:
mount /dev/sda3 -t btrfs -o subvol=root00,compress=zstd /mnt
will need to edit the entry and add this as a kernel option
Code:
rootflags=subvol=root00
change root00 if needed to match the root subvolume and sda3 to match the system partition you are attempting to add a grub menu.
Last edited by colorpurple21859; 05-11-2024 at 04:11 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.