LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-17-2018, 10:25 PM   #1
etcetera
Member
 
Registered: Aug 2004
Posts: 245

Rep: Reputation: 16
How to convert Windows bootloader multiboot configuration to Grub2 syntax


My system is UEFI and it does not support either easyBCD's option to add a new entry using Linux option (It's grayed out) or any way to add Linux as one of the options with the bcdedit command.

I can replace the default Windows bootloader /EFI/Microsoft/Boot/bootmgfw.efi with grub2 boot manager but I also want to preserve my current configuration where Disk1 has Windows 10, Disk2 also has its clone, Windows 10 and Disk3 has Fedora, I want to chose one during the boot phase. There are 3 different boot choices.
In other words, I want the following output or functionality of bcdedit translated into Grub2 syntax.
And where do I get the /EFI/Fedora/grubx64.efi file? Boot into Linux and download the latest-greatest Grub2 version I suppose.


At this point I can only boot into Fedora by hitting F11 and selecting the correct boot device.

$ bcdedit

Windows Boot Manager
--------------------
identifier {bootmgr}
device partition=\Device\HarddiskVolume13
path \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
description Windows Boot Manager
locale en-US
inherit {globalsettings}
default {current}
resumeobject {c493784b-8d04-11e8-b35e-aa5efca42955}
displayorder {5a54b057-e091-11e8-9ddb-806e6f6e6963}
{74c62865-b834-11e7-9c4e-806e6f6e6963}
{822ef5dc-f383-11e8-9dfb-806e6f6e6963}
{822ef5dd-f383-11e8-9dfb-806e6f6e6963}
{822ef5de-f383-11e8-9dfb-806e6f6e6963}
{current}
{c493784c-8d04-11e8-b35e-aa5efca42955}
{c493784d-8d04-11e8-b35e-aa5efca42955}
toolsdisplayorder {memdiag}
timeout 9
displaybootmenu Yes

Firmware Application (101fffff)
-------------------------------
identifier {74c62865-b834-11e7-9c4e-806e6f6e6963}
description Windows Boot Manager
custom:250000c2 0

Windows Boot Loader
-------------------
identifier {current}
device partition=C:
path \Windows\system32\winload.efi
description Windows 10
locale en-US
osdevice partition=C:
systemroot \Windows
resumeobject {dcc848eb-f383-11e8-9dfb-806e6f6e6963}
nx OptIn

Windows Boot Loader
-------------------
identifier {c493784c-8d04-11e8-b35e-aa5efca42955}
device partition=G:
path \Windows\system32\winload.efi
description Windows 10 - backup PM951 - November 28, 2018
locale en-us
inherit {bootloadersettings}
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=G:
systemroot \Windows
resumeobject {c493784b-8d04-11e8-b35e-aa5efca42955}
nx OptIn
bootmenupolicy Standard

Windows Boot Loader
-------------------
identifier {c493784d-8d04-11e8-b35e-aa5efca42955}
device partition=X:
path \Windows\system32\winload.efi
description Linux
locale en-US
osdevice partition=X:
systemroot \Windows
nx OptIn





bcdedit /enum firmware

Firmware Boot Manager
---------------------
identifier {fwbootmgr}
displayorder {1664b7f5-00d7-11e9-9e26-806e6f6e6963}
{bootmgr}
{227c7407-fffd-11e8-9e24-806e6f6e6963}
{a303d08d-f995-11e8-9e09-806e6f6e6963}
{a303d08c-f995-11e8-9e09-806e6f6e6963}
{2ff3188d-f68a-11e8-9e0b-806e6f6e6963}
{227c7408-fffd-11e8-9e24-806e6f6e6963}
{74c62865-b834-11e7-9c4e-806e6f6e6963}
timeout 1

Windows Boot Manager
--------------------
identifier {bootmgr}
device partition=\Device\HarddiskVolume13
path \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
description Windows Boot Manager
locale en-US
inherit {globalsettings}
default {current}
resumeobject {c493784b-8d04-11e8-b35e-aa5efca42955}
displayorder {5a54b057-e091-11e8-9ddb-806e6f6e6963}
{74c62865-b834-11e7-9c4e-806e6f6e6963}
{822ef5dc-f383-11e8-9dfb-806e6f6e6963}
{822ef5dd-f383-11e8-9dfb-806e6f6e6963}
{822ef5de-f383-11e8-9dfb-806e6f6e6963}
{current}
{c493784c-8d04-11e8-b35e-aa5efca42955}
{c493784d-8d04-11e8-b35e-aa5efca42955}
toolsdisplayorder {memdiag}
timeout 9
displaybootmenu Yes

Firmware Application (101fffff)
-------------------------------
identifier {1664b7f5-00d7-11e9-9e26-806e6f6e6963}
device partition=D:
description UEFI: SanDisk Cruzer Blade 1.26, Partition 1

Firmware Application (101fffff)
-------------------------------
identifier {227c7407-fffd-11e8-9e24-806e6f6e6963}
device partition=\Device\HarddiskVolume9
path \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
description Windows Boot Manager

Firmware Application (101fffff)
-------------------------------
identifier {227c7408-fffd-11e8-9e24-806e6f6e6963}
device partition=C:
path \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
description Windows Boot Manager

Firmware Application (101fffff)
-------------------------------
identifier {2ff3188d-f68a-11e8-9e0b-806e6f6e6963}
device partition=G:
path \EFI\MICROSOFT\BOOT\BOOTMGFW.EFI
description Windows Boot Manager

Firmware Application (101fffff)
-------------------------------
identifier {74c62865-b834-11e7-9c4e-806e6f6e6963}
description Windows Boot Manager
custom:250000c2 0

Firmware Application (101fffff)
-------------------------------
identifier {a303d08c-f995-11e8-9e09-806e6f6e6963}
device partition=\Device\HarddiskVolume6
path \EFI\FEDORA\SHIMX64.EFI
description Fedora

Firmware Application (101fffff)
-------------------------------
identifier {a303d08d-f995-11e8-9e09-806e6f6e6963}
device partition=\Device\HarddiskVolume6
path \EFI\BOOT\BOOTX64.EFI
description UEFI OS
 
Old 12-18-2018, 05:20 AM   #2
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,402

Rep: Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782
Quote:
And where do I get the /EFI/Fedora/grubx64.efi file?
It should be located on your efi partition.

Is this a continuation of this thread where your having trouble duel booting fedora and windows?
https://www.linuxquestions.org/quest...os-4175643786/

if so download the boot repair iso, boot it, and post the output of the boot-info summary.
https://sourceforge.net/p/boot-repair-cd/home/Home/
 
Old 12-18-2018, 06:17 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,059

Rep: Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937
In your other thread at the link below, in post 15 you show the Fedora drive which has an EFI partition, a separate boot partition as well as LVM. So you have an EFI partition on your windows drive as well as on your Fedora drive so you need to tell the system which EFI partition to use. Since you indicated in your other thread that you were able to boot Fedora from the BIOS, do that and look at the contents of the grub.cfg file there. It should have an entry for windows.

https://www.linuxquestions.org/quest...ux-4175644308/

Quote:
And where do I get the /EFI/Fedora/grubx64.efi file?
According to the information posted in your other thread, it is on /dev/sdb3 which is your EFI partition on the Fedora disk. Mount it and take a look.

Last edited by yancek; 12-18-2018 at 06:22 AM.
 
Old 12-27-2018, 01:56 AM   #4
etcetera
Member
 
Registered: Aug 2004
Posts: 245

Original Poster
Rep: Reputation: 16
I boot into Linux just fine by going into F11 during splash screen and then selecting the Fedora device.


Maybe this visual diagram will help with understanding which disks are involved. Windows is a dead-end, when I fire up bcdedit, it doesn't even show the Linux option at all. So I must use grub2 and represent these 3 disks there as 3 different boot options.



Last edited by etcetera; 12-27-2018 at 02:00 AM.
 
Old 12-27-2018, 06:49 AM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,059

Rep: Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937
Quote:
when I fire up bcdedit, it doesn't even show the Linux option at all
That seems to be explained in the link in post 10 of your other thread.

Have you updated Grub2 when booted into Fedora using the command posted in post 19 in your other thread? If so, what was the result? If not, try that. Also, you might read through the link in that post to the Fedora Project with some details on Grub in Fedora.

Post 16 in your other thread shows the output of efibootmgr which shows Fedora as Boot0001 so you should be able to set it to the first option with the command, run as root from Fedora:

Quote:
efibootmgr -o 0001
That's a lower case Letter O in the command for order and you can list the other options in the order you want them also.
You have an EFI partition on your windows drive and an EFI partition on your Fedora drive (at least this showed in your earlier posts?) so if you run the grub2-mkconfig command and see a windows entry/entries in the output, set the Fedora drive to first boot priority in the BIOS. You may need to set the EFI partition on the Fedora drive to active/bootable which you can do with GParted.
 
Old 12-27-2018, 05:08 PM   #6
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 989

Rep: Reputation: 261Reputation: 261Reputation: 261
Quote:
Originally Posted by yancek View Post
Post 16 in your other thread shows the output of efibootmgr which shows Fedora as Boot0001 so you should be able to set it to the first option with the command, run as root from Fedora:
That won't work on an MSI computer. The UEFI firmware on an MSI is designed to only boot Windows by default. I have an MSI and figured this out long time ago.

This is the third thread by etcetera in attempts to try reviving a dead hoarse.
Here are the other two:
https://www.linuxquestions.org/quest...ux-4175644308/
https://www.linuxquestions.org/quest...os-4175643786/

As I mentioned before, on an EFI system, Microsoft has blocked the loading of legacy or non-Windows operating systems from the BCD menu, the bootloader will block any attempts to load non-Microsoft-signed kernels, so playing with the BCD menu is also a dead end.

This system configuration is also quite messed up, there should only be one EFI system partition on the drive designated as DRIVE 0, all these other EFI partitions are a waste of space on this MSI
 
Old 12-27-2018, 06:03 PM   #7
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 989

Rep: Reputation: 261Reputation: 261Reputation: 261
And most if not all MSI laptops have SteelSeriesEngine, where the keyboard can be all lit up in many user defined colour schemes by holding down the FN key and tapping the hyphen or plus key on the number pad, meaning it's easy to see the F11 key in the dark.

What's so hard about hitting that one key to get a menu that someone would spend weeks beating a dead horse?
 
Old 12-27-2018, 06:19 PM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,059

Rep: Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937
I don't and have never used MSI so don't have any opinion on that.

It is a bit unusual to have 3 EFI partitions, one on each drive. Should only need one but having one on each drive and selecting that drive from the BIOS should access the boot files on that specific drive EFI partition, if it is vfat and marked active. Actually, it does as the OP states that's how he boots.

From the last post, the OP does seem to have given up on using BCD and if s/he can boot Fedora by selecting a key on boot, that seems simple enough.
 
Old 12-27-2018, 06:35 PM   #9
etcetera
Member
 
Registered: Aug 2004
Posts: 245

Original Poster
Rep: Reputation: 16
I would still like to know how to configure grub2 on the Linux side
 
Old 12-27-2018, 06:37 PM   #10
etcetera
Member
 
Registered: Aug 2004
Posts: 245

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by Brains View Post
And most if not all MSI laptops have SteelSeriesEngine, where the keyboard can be all lit up in many user defined colour schemes by holding down the FN key and tapping the hyphen or plus key on the number pad, meaning it's easy to see the F11 key in the dark.

What's so hard about hitting that one key to get a menu that someone would spend weeks beating a dead horse?
Has it occurred to you I am using an external keyboard without LEDs? Along with an external mouse and monitors. Just a wild thought.
 
Old 12-27-2018, 06:45 PM   #11
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 4,402

Rep: Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782Reputation: 782
Quote:
That won't work on an MSI computer. The UEFI firmware on an MSI is designed to only boot Windows by default. I have an MSI and figured this out long time ago.
A possible work around is to copy sd3 /EFI/Fedora/grubx64.efi file to sd3 /EFI/Boot/bootx64.efi then select sd3 to boot in boot in bios
 
Old 12-28-2018, 06:52 AM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 9,059

Rep: Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937Reputation: 1937
Quote:
I would still like to know how to configure grub2 on the Linux side
I'm not sure what you want to configure? You indicate in your other post that if you use the F11 key, you can boot Fedora, correct? Do you want to have a windows boot entry in the menu? Did you check the /boot/grub (grub2) directory on Fedora? Have you run the grub2-mkconfig command? Simple to try although I don't know how that will work with 3 EFI partitions.

Best source of information on Grub2 is the online manual.

https://www.gnu.org/software/grub/manual/grub/grub.html
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to install grub2 on the first section of a partition and then how to chainload to this grub2 bootloader? centguy Linux - Software 9 09-14-2017 10:03 AM
[SOLVED] GRUB bootloader "issues" on Debian Wheezy 7.5 (multiboot with Windows 7) vvladimir Linux - Newbie 3 06-01-2014 08:35 AM
[SOLVED] OpenSuSe12.3 - Help Fix Grub2 Syntax Errors (was - Replace Grub2 w/ Lilo) enorbet SUSE / openSUSE 9 12-08-2013 04:09 AM
grub2 can't see my win 7 partition and yast2 bootloader can't reinstall grub2 jjrojaspy SUSE / openSUSE 5 07-07-2013 10:38 PM
[SOLVED] How to start Grub2-bootloader from extlinux-bootloader? floppy_stuttgart Linux - Newbie 13 11-13-2011 06:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration