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]# |
Quote:
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. |
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. |
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 |
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.
|
Quote:
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:
Code:
[root@localhost ludwi]# lsblk 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. |
Quote:
:( 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. |
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. |
Quote:
Quote:
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. |
Quote:
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 |
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. |
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. |
You can uses efibootmgr to change the default to Fedora - saves ever having to go to the boot selection screen.
|
Quote:
|
All times are GMT -5. The time now is 12:32 AM. |