LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-04-2020, 05:09 PM   #46
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588

@ mrmazda, attempting to create a menuentry to load fedora grub.cfg within ubuntu grub menu.
 
Old 11-04-2020, 05:14 PM   #47
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,342

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by mrmazda View Post
/boot/grub2/grub.cfg would be for a Fedora installation. In any Debian derivative (e.g. Ubuntu) there is only /boot/grub/grub.cfg.
That is true for a Fedora install using MBR. When using uefi on Fedora it is /boot/efi/EFI/fedora/grub.cfg
 
Old 11-04-2020, 05:17 PM   #48
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by colorpurple21859 View Post
@ mrmazda, attempting to create a menuentry to load fedora grub.cfg within ubuntu grub menu.
Grub.cfg won't be found looking in a grub2 directory on a Ubuntu installation, just like grub.cfg won't be found looking in a grub directory on a Fedora installation.
 
Old 11-04-2020, 05:26 PM   #49
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
Quote:
When using uefi on Fedora it is /boot/efi/EFI/fedora/grub.cfg
I didn't know that fedora had moved it to the efi partition, that was going to be my next step.
 
Old 11-04-2020, 05:28 PM   #50
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Quote:
Originally Posted by computersavvy View Post
When using uefi on Fedora it is /boot/efi/EFI/fedora/grub.cfg
Not on my UEFI Fedoras. On mine only *.efi and BOOTX64.CSV live there.
Code:
# inxi -S
System:    Host: asa88 Kernel: 5.10.0-0.rc1.20201028gited8780e3f2ec.57.fc34.x86_64 x86_64 bits: 64 Console: tty 2
           Distro: Fedora release 34 (Rawhide)
# ls -l /boot/efi/EFI/fedora/
total 6902
-rwx------ 1 root root     110 Oct  2  2018 BOOTX64.CSV
-rwx------ 1 root root 2271560 Dec  5  2019 grubx64.efi
-rwx------ 1 root root 1159560 Oct  2  2018 mmx64.efi
-rwx------ 1 root root 1210776 Oct  2  2018 shim.efi
-rwx------ 1 root root 1210776 Oct  2  2018 shimx64.efi
-rwx------ 1 root root 1204496 Oct  2  2018 shimx64-fedora.efi
 
Old 11-04-2020, 05:30 PM   #51
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
Quote:
Not on my UEFI Fedoras. On mine only *.efi and BOOTX64.CSV live there.
It must have been something that has changed recently, my installs of fedora are the same as yours.
 
Old 11-04-2020, 07:11 PM   #52
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,342

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by mrmazda View Post
Not on my UEFI Fedoras. On mine only *.efi and BOOTX64.CSV live there.
Code:
# inxi -S
System:    Host: asa88 Kernel: 5.10.0-0.rc1.20201028gited8780e3f2ec.57.fc34.x86_64 x86_64 bits: 64 Console: tty 2
           Distro: Fedora release 34 (Rawhide)
# ls -l /boot/efi/EFI/fedora/
total 6902
-rwx------ 1 root root     110 Oct  2  2018 BOOTX64.CSV
-rwx------ 1 root root 2271560 Dec  5  2019 grubx64.efi
-rwx------ 1 root root 1159560 Oct  2  2018 mmx64.efi
-rwx------ 1 root root 1210776 Oct  2  2018 shim.efi
-rwx------ 1 root root 1210776 Oct  2  2018 shimx64.efi
-rwx------ 1 root root 1204496 Oct  2  2018 shimx64-fedora.efi
You are running rawhide which is in development and does not always comply with the standard usage in the released versions.

[root@laptop lib]# inxi -S
System: Host: laptop.home.domain Kernel: 5.8.16-200.fc32.x86_64 x86_64 bits: 64 Desktop: GNOME 3.36.7
Distro: Fedora release 32 (Thirty Two)
[root@laptop lib]# ls -l /boot/efi/EFI/fedora/
total 15592
-rwx------. 1 root root 112 Oct 2 2018 BOOTIA32.CSV
-rwx------. 1 root root 110 Oct 2 2018 BOOTX64.CSV
drwx------. 2 root root 4096 Sep 23 15:38 fonts
-rwx------. 1 root root 1598728 Sep 15 08:05 gcdia32.efi
-rwx------. 1 root root 2528520 Sep 15 08:05 gcdx64.efi
-rwx------. 1 root root 6075 Dec 23 2019 grub.cfg
-rwx------. 1 root root 1024 Nov 4 15:36 grubenv
-rwx------. 1 root root 1598728 Sep 15 08:05 grubia32.efi
-rwx------. 1 root root 2528520 Sep 15 08:05 grubx64.efi
-rwx------. 1 root root 927824 Oct 2 2018 mmia32.efi
-rwx------. 1 root root 1159560 Oct 2 2018 mmx64.efi
-rwx------. 1 root root 1210776 Oct 2 2018 shim.efi
-rwx------. 1 root root 975536 Oct 2 2018 shimia32.efi
-rwx------. 1 root root 969264 Oct 2 2018 shimia32-fedora.efi
-rwx------. 1 root root 1210776 Oct 2 2018 shimx64.efi
-rwx------. 1 root root 1204496 Oct 2 2018 shimx64-fedora.efi

Some of those are left over from a couple upgrades, but that is where grub.cfg lives.
 
Old 11-04-2020, 09:52 PM   #53
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
I'm running lots of Fedoras on lots of PCs. The one currently booted to Rawhide has 32 and 33 as well, where neither have grub.cfg in /boot/efi/EFI/fedora/.

Regardless, it's not necessary for OP to find Fedora's grub.cfg. OP wants Ubuntu to have priority, so Fedora need not have grub* installed. He only needs UEFI to give priority to Ubuntu's installation and as a result its Grub, while Ubuntu's os-prober ought to be able to find Fedora's kernels and initrds as long as lsmod shows the BTRFS kernel module is loaded when Ubuntu's grub-mkconfig (normally as update-grub on Ubuntu) is run.
 
Old 11-05-2020, 07:16 PM   #54
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
Quote:
while Ubuntu's os-prober ought to be able to find Fedora's kernels and initrds as long as lsmod shows the BTRFS kernel module is loaded when Ubuntu's grub-mkconfig (normally as update-grub on Ubuntu) is run.
That is the problem ubuntu's grub isn't picking up fedora's kernels off the boot partition. My ubuntu doesn't pick it up either, even if I mount fedora filesystem along with fedora boot partition, ubuntu grub still doesn't pick it up.
 
Old 11-05-2020, 07:28 PM   #55
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
I think I have a solution,
boot into fedora open a terminal
Code:
sudo nano /etc/default/grub
set this line to this if it is set to true or commented out.
Code:
GRUB_ENABLE_BLSCFG=false
Code:
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
exit out boot into ubuntu, If you edited /etc/40_custom as per computersavvy in post 44, I think fedora grub menu will come up allowing you to boot fedora from ubuntu.
 
1 members found this post helpful.
Old 11-06-2020, 03:26 PM   #56
whois1230
Member
 
Registered: Sep 2018
Posts: 214

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
I think I have a solution,
boot into fedora open a terminal
Code:
sudo nano /etc/default/grub
set this line to this if it is set to true or commented out.
Code:
GRUB_ENABLE_BLSCFG=false
Code:
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
exit out boot into ubuntu, If you edited /etc/40_custom as per computersavvy in post 44, I think fedora grub menu will come up allowing you to boot fedora from ubuntu.
It didn't work.
Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'fedora config file'{
insmod btrfs
configfile (hd0,1)/EFI/fedora/grub.cfg
}
 
Old 11-06-2020, 03:29 PM   #57
whois1230
Member
 
Registered: Sep 2018
Posts: 214

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by computersavvy View Post
do "sudo ls /mnt/efi/fedora"
if it fails then you need to mount your efi partition at /mnt/efi with "sudo mount /dev/sda1 /mnt/efi"
then "sudo ls /mnt/efi/fedora" to verify you see the grub.cfg file there.

Then the previous code from post #39 would be changed as
Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'fedora config file'{
insmod btrfs
configfile (hd0,1)/EFI/fedora/grub.cfg
}
Code:
user@Lenovo-ideapad-110-17IKB:~$  sudo nano /etc/grub.d/40_custom
[sudo] password for user: 
user@Lenovo-ideapad-110-17IKB:~$ sudo ls /mnt/efi/fedora
ls: cannot access '/mnt/efi/fedora': No such file or directory
user@Lenovo-ideapad-110-17IKB:~$ sudo mount /dev/sda1 /mnt/efi
mount: /mnt/efi: mount point does not exist.
user@Lenovo-ideapad-110-17IKB:~$ sudo ls /mnt/efi/fedora
ls: cannot access '/mnt/efi/fedora': No such file or directory
user@Lenovo-ideapad-110-17IKB:~$
 
Old 11-06-2020, 06:25 PM   #58
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,345

Rep: Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588Reputation: 1588
post the contents of fedora /etc/default/grub
post the contents of EFI/fedora/grub.cfg on the efi partition.
post the contents of ubuntu /etc/grub.d/40_custom

Last edited by colorpurple21859; 11-06-2020 at 06:27 PM.
 
1 members found this post helpful.
Old 11-06-2020, 07:10 PM   #59
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,342

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by colorpurple21859 View Post
I didn't know that fedora had moved it to the efi partition, that was going to be my next step.
It has been at that location as long as I have been using UEFI with fedora. At least for the last 6 or more years.
 
Old 11-06-2020, 07:30 PM   #60
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,799
Blog Entries: 1

Rep: Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066Reputation: 2066
Interesting finding such a difference between Fedora & openSUSE, since I've been using both for 14 years.
 
  


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
After installing Mint 20 for dual boot, Windows 10 Home won't boot abover Linux - Newbie 8 10-15-2020 06:59 AM
[SOLVED] Dual boot Fedora and Windows 10. After reinstalling Fedora Windows 10 entry is gone from bootloader. bkone Linux - Newbie 4 01-05-2019 12:21 AM
Dual Boot: linux after windows 10. Windows won't boot edhe1 Linux Mint 1 05-08-2018 05:01 PM
fedora won't boot after Windows 8/triple boot Windows 7/8 Fedora 15 - no grub? idilly Linux - Laptop and Netbook 11 10-04-2011 11:38 PM
Windows 7 wont boot up after installing Fedora 15 (Windows 7 already installed)? ranger149 Fedora 6 09-02-2011 09:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:42 PM.

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