LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-03-2020, 11:35 PM   #31
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,327

Rep: Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481

Quote:
Originally Posted by mrmazda View Post
If you provide more info we can probably better determine what's going on. We don't know if the Fedora installation changed the partitioning, which may be why the BIOS shows Fedora twice.
Code:
sudo parted -l
sudo efibootmgr -v
I am not certain he has an issue with fedora being shown twice in bios. On my system bios shows each bootable partition twice, once as uefi and once without uefi. Even though I have never used anything but UEFI on this system.

When I boot the live image I see the USB stick twice, once as UEFI and once without UEFI since it can be booted for either UEFI install or MBR install.
 
1 members found this post helpful.
Old 11-04-2020, 01:57 AM   #32
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,788
Blog Entries: 1

Rep: Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065
Quote:
Originally Posted by computersavvy View Post
On my system bios shows each bootable partition twice, once as uefi and once without uefi.
What I see is more or less as you describe, but depends on motherboard firmware, no two varieties of which seem to match in behavior. Mostly what I see in BBS menu is:
  • UEFI built-in shell
  • UEFI OS (<disk>, e.g. "P0: SPCCSolidSta")
  • AHCI (<disk>, e.g. "P0: SPCCSolidStateDisk)
  • distroname (from /etc/default/grub's GRUB_DISTRIBUTOR= and /boot/efi/EFI/) "P0: SPCCSolidSta"
matching (names, yes; order, not)
Code:
# efibootmgr
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0003,0002,0004
Boot0000* <distroname>
Boot0002  UEFI: Built-in EFI Shell
Boot0003* UEFI OS
Boot0004  Hard Drive
Quote:
When I boot the live image I see the USB stick twice, once as UEFI and once without UEFI since it can be booted for either UEFI install or MBR install.
As I.

I question why only Fedora has two entries while Ubuntu has only one.

I avoid boot confusion by allowing only the OS I wish to be in control by keeping other entries out of the BIOS using efibootmgr and/or BIOS setup, and very purposely not allowing the ESP partition to be mounted to /boot/efi/ except by the OS I wish to be in control.
 
Old 11-04-2020, 03:08 AM   #33
whois1230
Member
 
Registered: Sep 2018
Posts: 214

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
boot ubuntu open a terminal
Code:
 sudo nano /etc/grub.d/40_custom
add this to it
Code:
menuentry 'fedora config file'{
configfile (hd0,?)/grub2/grub.cfg
}
The ? will be the partition number of fedora boot partition, (hd0,5) is what it was originally.
you may be able to look at fedora /etc/fstab to see which partition is fedora /boot.
Code:
sudo update-grub
I ran the commands from your post and now it looks like this:
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'{
configfile (hd0,?)/grub2/grub.cfg
}
A new grub entry appeared, called "fedora config file". When I click on it, nothing happens, I get sent back to the grub menu
 
Old 11-04-2020, 03:10 AM   #34
whois1230
Member
 
Registered: Sep 2018
Posts: 214

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
If you provide more info we can probably better determine what's going on. We don't know if the Fedora installation changed the partitioning, which may be why the BIOS shows Fedora twice.
Code:
sudo parted -l
sudo efibootmgr -v
Code:
user@Lenovo-ideapad-110-17IKB:~$ sudo parted -l
Model: ATA WDC WD10JPCX-24U (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system  Name                          Flags
 1      1049kB  274MB  273MB   fat32        EFI System Partition          boot, esp
 2      274MB   290MB  16,8MB               Microsoft reserved partition  msftres
 3      290MB   331GB  330GB   ntfs         Basic data partition          msftdata
 5      331GB   332GB  1074MB  ext4
 4      332GB   333GB  1074MB  ext4
10      333GB   650GB  317GB   btrfs
 9      650GB   957GB  307GB   ext4
 6      957GB   984GB  26,8GB  ntfs         Basic data partition          msftdata
 7      984GB   985GB  1049MB  ntfs         Basic data partition          hidden, diag
 8      985GB   999GB  14,2GB  ntfs         Basic data partition          hidden, diag


user@Lenovo-ideapad-110-17IKB:~$ sudo efibootmgr -v
BootCurrent: 0006
Timeout: 0 seconds
BootOrder: 0006,0002,0000,0005,2003,2001,2002
Boot0000* Windows Boot Manager	HD(1,GPT,bbca276a-71b2-44d4-8063-c1737eb0e017,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0002* Fedora	HD(1,GPT,bbca276a-71b2-44d4-8063-c1737eb0e017,0x800,0x82000)/File(\EFI\fedora\shimx64.efi)
Boot0003* EFI Network 0 for IPv4 (54-E1-AD-0B-AF-B6) 	PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(54e1ad0bafb6,0)/IPv4(0.0.0.00.0.0.0,0,0)RC
Boot0004* EFI Network 0 for IPv6 (54-E1-AD-0B-AF-B6) 	PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(54e1ad0bafb6,0)/IPv6([::]:<->[::]:,0,0)RC
Boot0005* Fedora	HD(1,GPT,bbca276a-71b2-44d4-8063-c1737eb0e017,0x800,0x82000)/File(\EFI\fedora\shim.efi)RC
Boot0006* ubuntu	HD(1,GPT,bbca276a-71b2-44d4-8063-c1737eb0e017,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)RC
Boot0007* EFI Network 0 for IPv4 (54-E1-AD-0B-AF-B6) 	PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(54e1ad0bafb6,0)/IPv4(0.0.0.00.0.0.0,0,0)RC
Boot0008* EFI Network 0 for IPv6 (54-E1-AD-0B-AF-B6) 	PciRoot(0x0)/Pci(0x1c,0x0)/Pci(0x0,0x0)/MAC(54e1ad0bafb6,0)/IPv6([::]:<->[::]:,0,0)RC
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC
Boot2003* EFI Network	RC
user@Lenovo-ideapad-110-17IKB:~$
 
Old 11-04-2020, 03:17 AM   #35
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,788
Blog Entries: 1

Rep: Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065
Quote:
Originally Posted by whois1230 View Post
A new grub entry appeared, called "fedora config file". When I click on it, nothing happens, I get sent back to the grub menu
You didn't complete the instructions provided. The ? must be replaced with the appropriate number.
 
1 members found this post helpful.
Old 11-04-2020, 03:50 AM   #36
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,788
Blog Entries: 1

Rep: Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065
Quote:
Originally Posted by whois1230 View Post
Code:
...
Boot0002* Fedora	HD(1,GPT,bbca276a-71b2-44d4-8063-c1737eb0e017,0x800,0x82000)/File(\EFI\fedora\shimx64.efi)
...
Boot0005* Fedora	HD(1,GPT,bbca276a-71b2-44d4-8063-c1737eb0e017,0x800,0x82000)/File(\EFI\fedora\shim.efi)RC
...
Does /boot/efi/EFI/fedora/shimx64.efi actually exist?
Does /boot/efi/EFI/fedora/shim.efi actually exist?
 
1 members found this post helpful.
Old 11-04-2020, 04:00 AM   #37
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,788
Blog Entries: 1

Rep: Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065
Quote:
Originally Posted by colorpurple21859 View Post
Code:
menuentry 'fedora config file'{
configfile (hd0,?)/grub2/grub.cfg
}
Likely that configfile on (hd0,whatever) won't be readable without a line "insmod btrfs" above the configfile line.
 
1 members found this post helpful.
Old 11-04-2020, 05:37 AM   #38
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,330

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
boot into fedora open a terminal and run
Code:
df -h
to see what /dev/sda? is mounted at /boot
Boot back into ubuntu,
If it is /dev/sda4, it will look like this
Code:
menuentry 'fedora config file'{
insmod btrfs
configfile (hd0,4)/grub2/grub.cfg
}
Change to 5 if it is /dev/sda5,
added the "insmod btrfs" as mrmazda suggested.
Remember to rerun "sudo update-grub" after making changes.

Last edited by colorpurple21859; 11-04-2020 at 10:01 AM.
 
1 members found this post helpful.
Old 11-04-2020, 12:50 PM   #39
whois1230
Member
 
Registered: Sep 2018
Posts: 214

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
boot into fedora open a terminal and run
Code:
df -h
to see what /dev/sda? is mounted at /boot
Boot back into ubuntu,
If it is /dev/sda4, it will look like this
Code:
menuentry 'fedora config file'{
insmod btrfs
configfile (hd0,4)/grub2/grub.cfg
}
Change to 5 if it is /dev/sda5,
added the "insmod btrfs" as mrmazda suggested.
Remember to rerun "sudo update-grub" after making changes.
Code:
[user@localhost ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        3.9G     0  3.9G   0% /dev
tmpfs           3.9G   51M  3.8G   2% /dev/shm
tmpfs           1.6G  1.9M  1.6G   1% /run
/dev/sda10      296G  6.0G  288G   3% /
tmpfs           3.9G   52K  3.9G   1% /tmp
/dev/sda10      296G  6.0G  288G   3% /home
/dev/sda4       976M  234M  676M  26% /boot
/dev/sda1       256M   54M  203M  21% /boot/efi
tmpfs           786M  172K  786M   1% /run/user/1000
[user@localhost ~]$
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,4)/grub2/grub.cfg
}
There is a grub entry called "fedora config file" and when I click on it, nothing happens.

Last edited by whois1230; 11-04-2020 at 12:51 PM.
 
Old 11-04-2020, 01:08 PM   #40
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,330

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
make sure there is a grub.cfg at that location,
open a terminal in ubuntu,
Code:
sudo mount /dev/sda4 /mnt
ls /mnt/grub2/grub.cfg
 
1 members found this post helpful.
Old 11-04-2020, 01:30 PM   #41
whois1230
Member
 
Registered: Sep 2018
Posts: 214

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
make sure there is a grub.cfg at that location,
open a terminal in ubuntu,
Code:
sudo mount /dev/sda4 /mnt
ls /mnt/grub2/grub.cfg
Code:
user@Lenovo-ideapad-110-17IKB:~$ sudo mount /dev/sda4 /mnt
[sudo] password for user: 
Sorry, try again.
[sudo] password for user: 
user@Lenovo-ideapad-110-17IKB:~$ sudo mount /dev/sda4 /mnt
mount: /mnt: /dev/sda4 already mounted on /mnt.
user@Lenovo-ideapad-110-17IKB:~$ ls /mnt/grub2/grub.cfg
ls: cannot access '/mnt/grub2/grub.cfg': Permission denied
user@Lenovo-ideapad-110-17IKB:~$ su
Password: 
root@Lenovo-ideapad-110-17IKB:/home/user# sudo mount /dev/sda4 /mnt
mount: /mnt: /dev/sda4 already mounted on /mnt.
root@Lenovo-ideapad-110-17IKB:/home/user# ls /mnt/grub2/grub.cfg
ls: cannot access '/mnt/grub2/grub.cfg': No such file or directory
root@Lenovo-ideapad-110-17IKB:/home/user# exit
exit
user@Lenovo-ideapad-110-17IKB:~$
 
Old 11-04-2020, 02:53 PM   #42
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,330

Rep: Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579Reputation: 1579
What is ouput of
Code:
ls /mnt

Last edited by colorpurple21859; 11-04-2020 at 02:58 PM.
 
1 members found this post helpful.
Old 11-04-2020, 03:36 PM   #43
whois1230
Member
 
Registered: Sep 2018
Posts: 214

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
What is ouput of
Code:
ls /mnt
Code:
user@Lenovo-ideapad-110-17IKB:~$ ls /mnt
config-5.8.15-301.fc33.x86_64
config-5.8.17-300.fc33.x86_64
efi
elf-memtest86+-5.31
extlinux
grub2
initramfs-0-rescue-b2bd53fa4244418a9a67e2a1c7d9af31.img
initramfs-5.8.15-301.fc33.x86_64.img
initramfs-5.8.17-300.fc33.x86_64.img
loader
lost+found
memtest86+-5.31
System.map-5.8.15-301.fc33.x86_64
System.map-5.8.17-300.fc33.x86_64
vmlinuz-0-rescue-b2bd53fa4244418a9a67e2a1c7d9af31
vmlinuz-5.8.15-301.fc33.x86_64
vmlinuz-5.8.17-300.fc33.x86_64
user@Lenovo-ideapad-110-17IKB:~$
 
Old 11-04-2020, 03:51 PM   #44
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,327

Rep: Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481Reputation: 1481
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
}
 
1 members found this post helpful.
Old 11-04-2020, 05:00 PM   #45
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,788
Blog Entries: 1

Rep: Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065Reputation: 2065
Quote:
Originally Posted by colorpurple21859 View Post
ls /mnt/grub2/grub.cfg[/CODE]
/boot/grub2/grub.cfg would be for a Fedora installation. In any Debian derivative (e.g. Ubuntu) there is only /boot/grub/grub.cfg.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:29 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