LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-08-2024, 08:49 PM   #1
jonrpick
Member
 
Registered: Mar 2007
Distribution: Debian, Mint, Fedora
Posts: 117

Rep: Reputation: 15
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.

What am I doing wrong here?

Thanks in advance...
 
Old 05-08-2024, 09:02 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,361
Blog Entries: 28

Rep: Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148Reputation: 6148
Have you tried running update grub?
 
Old 05-08-2024, 09:18 PM   #3
jonrpick
Member
 
Registered: Mar 2007
Distribution: Debian, Mint, Fedora
Posts: 117

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by frankbell View Post
Have you tried running update grub?
"update-grub" does not exist in Fedora.

The article you linked lists:

Code:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Which is the Fedora version of "update-grub"

Code:
$ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
I'm getting the same result, either way...

Last edited by jonrpick; 05-08-2024 at 09:19 PM.
 
Old 05-08-2024, 09:20 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
set GRUB_ENABLE_BLSCFG=false in /etc/default/grub and rerun grub2-mkconfig

Last edited by colorpurple21859; 05-08-2024 at 09:26 PM.
 
Old 05-08-2024, 09:42 PM   #5
jonrpick
Member
 
Registered: Mar 2007
Distribution: Debian, Mint, Fedora
Posts: 117

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by colorpurple21859 View Post
set GRUB_ENABLE_BLSCFG=false in /etc/default/grub and rerun grub2-mkconfig
That did...something.

Code:
$ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Now showed this:

Code:
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.

But still no Xfce option.
 
Old 05-09-2024, 05:00 AM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
have this in /etc/default/grub, and rerun grub2-mkconfig

Code:
GRUB_DISABLE_OS_PROBER=false
 
Old 05-09-2024, 05:06 PM   #7
jonrpick
Member
 
Registered: Mar 2007
Distribution: Debian, Mint, Fedora
Posts: 117

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by colorpurple21859 View Post
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.
 
Old 05-09-2024, 05:19 PM   #8
jonrpick
Member
 
Registered: Mar 2007
Distribution: Debian, Mint, Fedora
Posts: 117

Original Poster
Rep: Reputation: 15
Code:
$ sudo grep menuentry /boot/grub2/grub.cfg
yields

Code:
menuentry 'Fedora' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-simple-c20285c1-ed0d-4e74-992e-1f703981f455' {
submenu 'Advanced options for Fedora' $menuentry_id_option 'gnulinux-advanced-c20285c1-ed0d-4e74-992e-1f703981f455' {
        menuentry 'Fedora Linux (6.8.8-300.fc40.x86_64) 40 (KDE Plasma)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-6.8.8-300.fc40.x86_64-advanced-c20285c1-ed0d-4e74-992e-1f703981f455' {
        menuentry 'Fedora Linux (6.8.8-300.fc40.x86_64) 40 (KDE Plasma) (recovery mode)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-6.8.8-300.fc40.x86_64-recovery-c20285c1-ed0d-4e74-992e-1f703981f455' {
        menuentry 'Fedora Linux (6.8.5-301.fc40.x86_64) 40 (KDE Plasma)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-6.8.5-301.fc40.x86_64-advanced-c20285c1-ed0d-4e74-992e-1f703981f455' {
        menuentry 'Fedora Linux (6.8.5-301.fc40.x86_64) 40 (KDE Plasma) (recovery mode)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-6.8.5-301.fc40.x86_64-recovery-c20285c1-ed0d-4e74-992e-1f703981f455' {
        menuentry 'Fedora Linux (0-rescue-a07923d2c524436688708621f98c6e90) 40 (KDE Plasma)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-a07923d2c524436688708621f98c6e90-advanced-c20285c1-ed0d-4e74-992e-1f703981f455' {
        menuentry 'Fedora Linux (0-rescue-a07923d2c524436688708621f98c6e90) 40 (KDE Plasma) (recovery mode)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-a07923d2c524436688708621f98c6e90-recovery-c20285c1-ed0d-4e74-992e-1f703981f455' {
        menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
Edit: It may be of interest to note that in the UEFI boot menu, there are two Fedora options, and both boot to KDE. No other options are available.

Last edited by jonrpick; 05-09-2024 at 05:27 PM.
 
Old 05-09-2024, 06:34 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,549

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
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.

https://fedoraproject.org/wiki/GRUB_2

Last edited by yancek; 05-10-2024 at 07:12 AM. Reason: correction
 
Old 05-09-2024, 10:23 PM   #10
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Assuming /dev/sda2 is the boot partition for the xfce fedora add this to /etc/grub.d/40_custom:
Code:
menuentry 'fedora xfce' {
set root=(hd0,2)
configfile /grub2/grub.cfg
}
The other changes you made to /etc/default/grub can be reverted if you so desire.
rerun grub2-mkconfig

Last edited by colorpurple21859; 05-09-2024 at 10:26 PM.
 
Old 05-10-2024, 04:33 PM   #11
jonrpick
Member
 
Registered: Mar 2007
Distribution: Debian, Mint, Fedora
Posts: 117

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by colorpurple21859 View Post
Assuming /dev/sda2 is the boot partition for the xfce fedora add this to /etc/grub.d/40_custom:
Code:
menuentry 'fedora xfce' {
set root=(hd0,2)
configfile /grub2/grub.cfg
}
The other changes you made to /etc/default/grub can be reverted if you so desire.
rerun grub2-mkconfig
This worked! I chose the Xfce option and it then went to a sub menu listing the installed kernel versions as well as a recovery option.

I'm just curious as to why the Xfce wouldn't appear otherwise.
 
Old 05-10-2024, 08:09 PM   #12
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
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.
 
Old 05-11-2024, 12:26 PM   #13
jonrpick
Member
 
Registered: Mar 2007
Distribution: Debian, Mint, Fedora
Posts: 117

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by colorpurple21859 View Post
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...
 
Old 05-11-2024, 03:57 PM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
Quote:
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't ping or ssh to the cirros instance of the openstack instance visuharsha Linux - Networking 0 12-21-2017 01:44 PM
Postfix multiple instance only default instance work Dante K Linux - Server 0 09-05-2017 09:45 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] Switch to instance instead of creating a new instance of a program javascriptninja Linux - Newbie 8 01-28-2012 03:39 PM
how to install 2nd debian instance from .deb file, showing up as separate grub entry bweaver Linux - Newbie 4 11-15-2011 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 10:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration