Ask Your Question
2

How to dual boot Windows 8.1 and Fedora 20

asked 2014-05-15 16:19:10 -0500

rjusa gravatar image

I am having problems getting Fedora 20 to run on a Windows 8.1 64-bit PC. I am fairly new to Linux, but have been able to get Fedora to run successfully on Windows XP. I think some of the problems involve UEFI, which I do not have experience with, and the documentation for it seems limited.

I shrank my Windows partition and installed Fedora in the remaining space as usual. In order to do so, though, I had to disable Secure Boot (because I was getting a Secure Boot Violation error message), which I don't understand, since Fedora is supposed to work with it enabled. Then I could successfully run Fedora, but only until I ran Windows 8.1 again. After I ran Windows, the GRUB bootloader seems to have gotten overwritten or something. Windows starts up right away and I have no opportunity to select Fedora. If I press the Esc key when my computer first starts up, and then F2 to select a UEFI boot source, Fedora appears on the list. However, if I select it, I get an error message saying that no boot system was found, and Fedora won't start.

How can I dual boot Windows 8.1 and Fedora 20 successfully, with Secure Boot enabled?

Thank you.

-- Timothy

P.S. As far as I know I have the latest firmware updates for my computer (I just checked today).

edit retag flag offensive close merge delete

Comments

The best way from now, is probably just to reinstall. I have Secure Boot enabled on my Win 8.1, and it boots fine with Fedora, as long as you give GRUB the correct place to find the Win 8.1 Bootloader. During install, create a new /boot/efi partition, and after Fedora boots, edit the /etc/grub.d/40_custom file. Add a Windows entry to it that works. The code I have in that file (at the end of it) is:

menuentry 'Microsoft Windows 8' {
set root='hd0,gpt2'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
}

Then, run grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg. Reboot!

abadrinath gravatar imageabadrinath ( 2014-05-16 01:05:40 -0500 )edit

Thanks for your response, hello. I forgot to mention that I couldn't even get the installation CD to run with Secure Boot enabled when I tried it before.

I also tried to put my Live CD in, but it didn't show up on the boot source menu. Maybe I just need to make a new one. I'll have to try that later.

I played around with some BIOS (or is it UEFI?) options, and found that my problem is even weirder than I thought. If I enable Secure Boot, I get a Secure Boot Violation message, even though with it disabled, Windows starts up right away and I have no opportunity to select Fedora. So maybe Windows is still being invoked through GRUB somehow?

The really weird thing is: If I disable Secure Boot again, GRUB shows up when I start my computer and asks me whether ...(more)

rjusa gravatar imagerjusa ( 2014-05-16 15:43:34 -0500 )edit

Have you tried reinstalling? Turn secure boot on and UEFI on during install, and to install (from Windows), use Winkey +c >> Change PC Settings >> Update and Recovery >> Recovery >> Advanced Startup >> USB devices >> EFI DVD/CDROM. This would work for a live cd as well. After install, use my answer below (option 3) to go to Windows (if not working). Sorry for the confusing comment. :)

abadrinath gravatar imageabadrinath ( 2014-05-17 23:05:36 -0500 )edit

Just another thing, in the UEFI boot order, have Fedora first and Windows after that. That should help resolve it.

EDIT: Have you turned off fast startup? Fast startup can be turned off using "Power Options" in the Control Panel. See here for more instructions on how to disable it. Basically, fast startup is like hibernation in order to have a faster startup

abadrinath gravatar imageabadrinath ( 2014-05-17 23:06:19 -0500 )edit

I know Linux can't access my Windows disk if I leave fast startup enabled, but would prefer to keep it enabled if it doesn't cause any problems. Are there any other reasons why I should turn off fast startup?

rjusa gravatar imagerjusa ( 2014-05-19 06:55:14 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-01-23 16:23:07 -0500

rjusa gravatar image

I contacted HP, Microsoft Answer Desk, and Microsoft Pro Answers, but none of them were very helpful, so I finally asked my question on FedoraForum.org. Someone there mentioned that using rEFInd worked for them. Looking into rEFInd helped me to find the solution to my problem, although I didn't need to install it.

I found these two links particularly helpful:

Some PCs with UEFI firmware, especially HP ones, are known to check whether the default boot item is /EFI/Microsoft/Boot/bootmgfw.efi (the Windows bootloader), and if not, to reset it. So, the important thing is to replace bootmgfw.efi with grubx64.efi, which fools UEFI into thinking that the Windows bootloader is the default. I also moved the original bootmgfw.efi file (the Windows bootloader) up one directory, and updated the path to it in /EFI/fedora/grub.cfg so that GRUB can find Windows to boot it, and it finally worked. Yay!

edit flag offensive delete link more
2

answered 2014-05-16 01:16:08 -0500

abadrinath gravatar image

The easiest way to get a dual boot running is editing the GRUB configuration. You can add a custom GRUB entry in /etc/grub.d/40_custom (advised) or edit /boot/efi/EFI/fedora/grub.cfg (avoid editing as said in the file!).

Couple options now:

Option 1: Use the live cd to fix your Fedora installation. Go to Windows, and just boot from the USB or CD with the Live CD on it. Run fsck one time. The most common problem is probably that you deleted /boot/efi or changed it.

Option 2: Reinstall Fedora from scratch using a DVD or a Live CD. You can choose the pre-existing Windows 200 MB boot partition as /boot/efi [NOTE: I don't know if this will actually work]. After install, Windows should work fine, as it will sense the Windows boot file.

Option 3: If you have a seperate /boot/efi partition (not on the Windows), somehow GRUB can't sense the Win 8.1 bootloader. You will have to add it manually to the end of /etc/grub.d/40_custom. The code I used for my Win 8.1 was:

menuentry 'Microsoft Windows 8' {
set root='hd0,gpt2'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
}

Then, execute grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg. After a reboot, you should be boot into either OS without going to the boot menu!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-05-15 16:19:10 -0500

Seen: 18,125 times

Last updated: Jan 23 '15