LinuxQuestions.org
Review your favorite Linux distribution.
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 09-09-2017, 03:17 AM   #1
black-clover
Member
 
Registered: Jun 2017
Distribution: Vector Linux , Debian Buster, NuTyX
Posts: 46

Rep: Reputation: Disabled
Boot Windows 10 in Legacy Mode


Hello,

I installed Fedora 26 from USB on a laptop with Windows 10 already installed (I assume in UEFI Mode) after disabling UEFI from the BIOS menu and booting in Legacy Mode.
I followed the instructions and installed GRUB2 (I assume in MBR).
After I rebooted into Fedora, I edited /etc/grub.d/40_custom to include the following entry:

menuentry "Windows 10" --class windows --class os {
insmod ntfs
search --no-floppy --set=root --fs-uuid 5E64165E6416396B
ntldr /bootmgr
}

When I reboot, Windows 10 appears in the GRUB menu but when I choose it I get this error message:

file /bootmgr not found

How should I proceed to boot Windows 10 with GRUB?

I include the following information, hoping it would be helpful.

[root@localhost ludwi]# blkid
/dev/sda1: LABEL="Recovery" UUID="82A010E5A010E209" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="21560c0d-bec2-4940-8695-dfd575b09bc5"
/dev/sda2: LABEL="ESP" UUID="4613-32A2" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="9307e321-d914-444a-ba4a-786b2971e00f"
/dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="aab1b645-4bf3-4c0f-8941-7d1a74e34f72"
/dev/sda4: LABEL="Acer" UUID="5E64165E6416396B" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="0ef70ce3-a366-4e8b-8b9a-c4d3fa045522"
/dev/sda5: UUID="28E43024E42FF2AC" TYPE="ntfs" PARTUUID="2bd32c2e-e565-4879-9908-f8e1cf7ba405"
/dev/sda6: LABEL="Push Button Reset" UUID="BAE017E9E017AB21" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="7123f5e4-d184-49b4-a530-23b8dafb5074"
/dev/sda7: PARTUUID="71a3b5d3-5d7a-4739-b3ed-ad4f2e3cc2c0"
/dev/sda8: UUID="1f7c43a8-6acf-49e8-86be-6fc6b0ac070b" TYPE="ext4" PARTUUID="deac5fe6-8e9d-4a8b-8c9c-cd560a7a8368"
/dev/sda9: UUID="6J5AeI-5HyF-zX5f-9rKb-UMvZ-WJPc-UuNVHk" TYPE="LVM2_member" PARTUUID="6e1666b0-cf59-464a-b454-cbbcdf45f511"
/dev/mapper/fedora-root: UUID="93c37e22-5801-47a3-b65d-41be7871bcb3" TYPE="ext4"
/dev/mapper/fedora-swap: UUID="67ec3c10-daaf-4683-a87d-1848cec10521" TYPE="swap"

[root@localhost ludwi]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 400M 0 part
├─sda2 8:2 0 300M 0 part
├─sda3 8:3 0 128M 0 part
├─sda4 8:4 0 399.6G 0 part
├─sda5 8:5 0 505M 0 part
├─sda6 8:6 0 16G 0 part
├─sda7 8:7 0 1M 0 part
├─sda8 8:8 0 1G 0 part /boot
└─sda9 8:9 0 47.8G 0 part
├─fedora-root 253:0 0 44.2G 0 lvm /
└─fedora-swap 253:1 0 3.7G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom

[root@localhost ludwi]# grep -i efi /etc/fstab

[root@localhost ludwi]# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): FE40836B-4D02-4FDE-8E2C-DA8848377A53
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2633 sectors (1.3 MiB)

Number Start (sector) End (sector) Size Code Name
1 2048 821247 400.0 MiB 2700 Basic data partition
2 821248 1435647 300.0 MiB EF00 EFI System Partition
3 1435648 1697791 128.0 MiB 0C01 Microsoft reserved ...
4 1697792 839783843 399.6 GiB 0700 Basic data partition
5 942184448 943218687 505.0 MiB 2700
6 943218688 976773119 16.0 GiB 2700 Basic data partition
7 839784448 839786495 1024.0 KiB EF02
8 839786496 841883647 1024.0 MiB 8300
9 841883648 942184447 47.8 GiB 8E00

[root@localhost ludwi]# ls -l /boot/efi/EFI
total 8
drwxr-xr-x. 2 root root 4096 Jul 5 18:21 BOOT
drwxr-xr-x. 4 root root 4096 Sep 8 19:59 fedora
[root@localhost ludwi]#


[root@localhost ludwi]# grep -i efi /etc/fstab
[root@localhost ludwi]#
 
Old 09-09-2017, 03:46 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,001

Rep: Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219
Quote:
Originally Posted by black-clover View Post
I installed Fedora 26 from USB on a laptop with Windows 10 already installed (I assume in UEFI Mode) after disabling UEFI from the BIOS menu and booting in Legacy Mode.
I followed the instructions and installed GRUB2 (I assume in MBR).
Why ?.
If you installed F26, it would normally install grub itself.
Why did you change to "Legacy Mode" - especially if the install was successful. Same question as to why you re-installed grub.

Show a link to the instructions you followed.
 
1 members found this post helpful.
Old 09-09-2017, 04:28 AM   #3
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 517

Rep: Reputation: 245Reputation: 245Reputation: 245
I have some experience with dual booting Windows 10 and Linux distros, and I must say that Legacy mode did not work up to now. You have to swap modes everytime in order to "dual boot". Windows will only boot through its EFI binary and ntldr will not work as for older Windows.

So, I strongly recommend that you scrap the current Fedora install, delete the fedora directory on EFI partition, switch back to UEFI mode as initially, install Fedora in UEFI mode, and everything should be fine. Fedora understands UEFI quite well and it will install GRUB2 automatically for you; even generating the grub.cfg file with a proper entry for booting the Windows 10 EFI binary, which will certainly work.
 
Old 09-09-2017, 06:16 AM   #4
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,728

Rep: Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754
As far as I know, Microsoft requires UEFI secure boot for W10 on i86 platforms. It is a security feature of W10, so it is impossible to non-secure boot W10. Secure boot is only provided by UEFI BIOS.

So dual booting in legacy and therefore non-secure mode is not possible.

Fedora OTOH supports both UEFI and secure boot. So you have to boot Fedora in UEFI secure mode and Windows will be happy again to boot as well.

jlinkels
 
Old 09-09-2017, 08:54 AM   #5
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 365

Rep: Reputation: 135Reputation: 135
I am fairly sure there is/was a way round it. I have W10 on my other machine and multiple boot that with Win7, Puppy Linux and others. I don't have it handy to check but I know I would have removed any secure boot requirement.
 
Old 09-09-2017, 01:30 PM   #6
tofino_surfer
Member
 
Registered: Aug 2007
Posts: 204

Rep: Reputation: 64
Quote:
So, I strongly recommend that you scrap the current Fedora install, delete the fedora directory on EFI partition, switch back to UEFI mode as initially, install Fedora in UEFI mode, and everything should be fine.
This doesn't make sense at all. If there is a fedora directory on the EFI partition it must have been installed in UEFI mode. BIOS/CSM installs don't use the /EFI directory at all of course

If however Fedora was installed as the OP stated after disabling UEFI then GRUB2 would be installed in the MBR with the second stage core.img in a 1 MiB BIOS Boot partition. If Fedora was installed in CSM mode then it would not touch the /EFI directory.

Quote:
I installed Fedora 26 from USB on a laptop with Windows 10 already installed (I assume in UEFI Mode) after disabling UEFI from the BIOS menu and booting in Legacy Mode.
Code:
[root@localhost ludwi]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda7 8:7 0 1M 0 part
├─sda8 8:8 0 1G 0 part /boot
└─sda9 8:9 0 47.8G 0 part
From the lsblk listing:

sda7 is the 1 MiB BIOS Boot partition necessary for BIOS/GPT booting.
sda8 is the 1 GiB Fedora /boot partition
sda9 is the Fedora LVM PV

As this was a CSM install there will be no fedora directory in /EFI.

Last edited by tofino_surfer; 09-09-2017 at 02:44 PM.
 
Old 09-09-2017, 02:09 PM   #7
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 96

Rep: Reputation: 8
Quote:
Originally Posted by jlinkels View Post
As far as I know, Microsoft requires UEFI secure boot for W10 on i86 platforms. It is a security feature of W10, so it is impossible to non-secure boot W10. Secure boot is only provided by UEFI BIOS.

So dual booting in legacy and therefore non-secure mode is not possible.

Fedora OTOH supports both UEFI and secure boot. So you have to boot Fedora in UEFI secure mode and Windows will be happy again to boot as well.

jlinkels
That is not the case. Windows 10 will boot in legacy mode and without secure boot. However, it will ONLY boot to a GPT partitioned disk in UEFI mode. The information provided by the OP shows that his disk is GPT partitioned. With a disk like that, disabling secure boot but using UEFI is the best possible way to set things up. Leaving secure boot enabled limits the range of Linux distros that can be installed, since not many support secure mode.

I have two machines which still have Windows on them for (very occasional) use. Both of them boot in legacy mode and Windows 10 runs as well as it ever does anywhere.

Paul.

Last edited by toothandnail; 09-09-2017 at 02:11 PM.
 
Old 09-09-2017, 02:12 PM   #8
black-clover
Member
 
Registered: Jun 2017
Distribution: Vector Linux , Debian Buster, NuTyX
Posts: 46

Original Poster
Rep: Reputation: Disabled
Maybe I expressed myself poorly.

I disabled fast booting, hibernation in Windows and UEFI from the boot menu in order to install Fedora because otherwise Fedora would crash repeatedly during the install.

I didn't re-install Grub, I just accepted to install Grub to the default location during the install of Fedora.
Since I installed Fedora with UEFI disabled I assume it installed in Legacy mode, there was no option during the install.
Would it be possible to just reinstall Grub in the efi partition of modify the setup to boot both Windows and Fedora in EFI mode?
If I boot I in UEFI node now the Windows boot manager says no system found.
 
Old 09-09-2017, 03:04 PM   #9
toothandnail
Member
 
Registered: Apr 2007
Location: Oxfordshire, UK
Distribution: Arch, Sparky, Salix64
Posts: 96

Rep: Reputation: 8
Quote:
Originally Posted by black-clover View Post
Maybe I expressed myself poorly.

I disabled fast booting, hibernation in Windows and UEFI from the boot menu in order to install Fedora because otherwise Fedora would crash repeatedly during the install.
I would always disable the Windows "fast boot" mode. It just gets in the way of data recovery if something goes wrong with Windows. I'm not sure what you mean by disabling UEFI from the boot menu? Do you mean the firmware menu reached during machine post, or is this from the install menu for Fedora?

Quote:
I didn't re-install Grub, I just accepted to install Grub to the default location during the install of Fedora.
Since I installed Fedora with UEFI disabled I assume it installed in Legacy mode, there was no option during the install.
Would it be possible to just reinstall Grub in the efi partition of modify the setup to boot both Windows and Fedora in EFI mode?
If I boot I in UEFI node now the Windows boot manager says no system found.
It sounds as though something has been damaged by the way you selected to install Fedora. I did a repair on a Win10 machine which was installed to a GPT partition. I couldn't get it to boot from a USB flash drive until I selected Legacy as the boot method. That allowed me to get the customer data off the drive. When I reinstalled Win10, I had to select UEFI boot again, since the machine would not boot from the GPT partitioned drive until I did so.

I've also encountered some machines with UEFI firmware which behaves strangely when you attempt to disable UEFI, which can cause a number of different problems. I wonder if you might not be better to go back, save any data, then reinstall Win10 in UEFI mode, and install Linux in the same way. If Fedora is crashing when attempting to install in UEFI, try another distro to see if it is a machine firmware problem or a Linux installer problem.

Paul.
 
Old 09-09-2017, 05:42 PM   #10
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,728

Rep: Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754Reputation: 754
Quote:
Originally Posted by toothandnail View Post
That is not the case. Windows 10 will boot in legacy mode and without secure boot. However, it will ONLY boot to a GPT partitioned disk in UEFI mode. The information provided by the OP shows that his disk is GPT partitioned.
This is from the Microsoft website:
For logo-certified Windows RT 8.1 and Windows RT PCs, Secure Boot is required to be configured so that it cannot be disabled.
https://docs.microsoft.com/en-us/win...ng-secure-boot

So it might be true that a purchased W10 will boot in non-secure mode. But if you purchased a laptop with W10 pre-installed I assume you cannot disable the secure boot.

I am not sure if Microsoft says here that the secure boot in UEFI cannot be disabled, or that Windows requires the secure boot. Since secure boot is a safety measure I cannot imagine that you simple can disable it reading the statement above.

I have a Dell Inspiron 5957 and I was able to disable secure boot. I can't tell if W10 can boot after that because I wiped W10.

jlinkels
 
Old 09-09-2017, 09:53 PM   #11
black-clover
Member
 
Registered: Jun 2017
Distribution: Vector Linux , Debian Buster, NuTyX
Posts: 46

Original Poster
Rep: Reputation: Disabled
When I say I disabled UEFI from the boot menu I mean the computer set up menu you reach by pressing F2 during startup, or the BIOS I think is called.
There I have the choice to setup either UEFI or Legacy mode for booting the computer.
As for Secure Booting, I was able to disable it from within Windows 10, using Windows utilities.
Now I wiped the 3 partitions created by Fedora during the install and Windows boots normally in UEFI mode.
However, I'd like to make sure about the procedure before doing the install once again, especially because this is a dear friend's computer, not mine ahah.
 
Old 09-12-2017, 01:12 PM   #12
black-clover
Member
 
Registered: Jun 2017
Distribution: Vector Linux , Debian Buster, NuTyX
Posts: 46

Original Poster
Rep: Reputation: Disabled
Reinstalled Fedora booting in UEFI mode and this time it installed without a hitch.
I just had to access the BIOS and select Fedora from the booting options and Windows was there in the Grub menu.

Thanks a lot for your help.
 
Old 09-12-2017, 06:30 PM   #13
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,001

Rep: Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219Reputation: 2219
You can uses efibootmgr to change the default to Fedora - saves ever having to go to the boot selection screen.
 
1 members found this post helpful.
Old 12-05-2017, 12:11 AM   #14
jojolendir
LQ Newbie
 
Registered: Aug 2012
Posts: 9

Rep: Reputation: Disabled
Quote:
Originally Posted by black-clover View Post
Reinstalled Fedora booting in UEFI mode and this time it installed without a hitch.
I just had to access the BIOS and select Fedora from the booting options and Windows was there in the Grub menu.

Thanks a lot for your help.
if im not mistaken, we need to install windows 10 first and then the fedora

Last edited by jojolendir; 12-07-2017 at 12:56 AM.
 
  


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
PCs with no legacy mode jjanderson5 Linux - Newbie 7 07-23-2017 02:15 AM
[SOLVED] dual boot win7/slackware 14.2 64bit in legacy mode on gpt disk timsoft Slackware 14 12-11-2016 06:14 PM
Dual boot windows (EFI) Slackware (Legacy). MattFly Linux - Laptop and Netbook 14 05-24-2015 08:39 PM
Grub Legacy Windows boot menu theKbStockpiler Linux - General 3 02-06-2013 05:38 PM

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

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