Ask Your Question
4

Dualboot Fedora 20 + Windows 8 on separate drives

asked 2014-01-18 14:14:31 -0500

Splork gravatar image

updated 2014-02-13 13:35:06 -0500

mether gravatar image

Well hello there, I have a little problem with my dualboot setup.

So I decided to dualboot Windows (for gaming-puposes) and Fedora (for everything else), and I also decided to give them separate drives - a 120GB SSD for Fedora and a 500GB HDD for Windows.

So I first installed Windows on the HDD (making sure to boot the installer-CD in UEFI-mode), then I installed Fedora on the SSD (again, making sure I was booting in UEFI-mode) - btw I used the auto-partition feature of the installer - and rebooted.

On first glance everything looks fine - GRUB gives me the possibility to boot Fedora, Fedora Rescue Mode, as well a "Windows Bootmanager"

Booting Fedora works fine but if I choose the Windows bootmanager, I get the following error message:

error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found

error: you need to load the kernel first

However, if I set my motherboard to load the Windows Bootmanager directly, Windows starts up fine (doesn't give me the option to start Fedora though), so I assume it's a problem with my GRUB.

Any suggestions?

P.S. my storage mode is set to AHCI - I somewhere read that might make a difference...

edit retag flag offensive close merge delete

Comments

i have the exact same issue. have not found a solution till now

edwinpattam gravatar imageedwinpattam ( 2014-01-18 14:35:09 -0500 )edit

IIUC, you have two EFI partitions, one on each of the drives in the system; so this looks like this question, I think the set root= solution should work.

If it still doesn't work, please post the output of parted -l as root.

Edit: I've tested what @paulb posted in his answer and it works; his method is more robust than using an explicit set root=.

Ahmad Samir gravatar imageAhmad Samir ( 2014-04-09 02:38:31 -0500 )edit
ssieb gravatar imagessieb ( 2014-10-20 20:03:06 -0500 )edit

Yup I think so

abadrinath gravatar imageabadrinath ( 2014-11-13 19:06:54 -0500 )edit

Post your partition layout for both disks. Use sudo parted -l.

cgonz31 gravatar imagecgonz31 ( 2015-02-06 17:54:06 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted
3

answered 2014-04-09 00:09:42 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Locate your /boot/efi partition no. (for me, its /dev/sda2)

add this line to your grub.cfg

menuentry 'Microsoft Windows 8.1' {

set root='hd1,gpt2'

           chainloader /EFI/Microsoft/Boot/bootmgfw.efi
           boot
}

Replace 2 with the number of /boot/efi

edit flag offensive delete link more

Comments

Wouldn't it have to be the number for his Windows EFI partition? Suppose his Fedora SSD is /dev/sda and his Windows HDD is /dev/sdb. His set root line should look like: set root ='hd1,gpt2', correct? The first number is the disk number corresponding to /dev/sdb and the second number is the partition number (/dev/sdb2).

cgonz31 gravatar imagecgonz31 ( 2015-02-06 17:55:12 -0500 )edit

yes. That's right.

abadrinath gravatar imageabadrinath ( 2015-04-03 01:12:18 -0500 )edit
2

answered 2014-03-10 00:18:30 -0500

paulb gravatar image

This should work:

  1. first find out which which partition of your harddisk is your windows EFI system partition using fdisk -l

  2. then find the UUID of that partition using : blkid /dev/sdax (replace x by the appropriate number)

UUID will be like XXXX-XXXX (X can be a digit or an alphabet)

  1. then open the /etc/grub2-efi.cfg file find the menuentry for windows8 you will see a line starting with "chainloader" add a line just before that line as

search --no-floppy --fs-uuid --set=root UUID (replace the UUID with the actual UUID found in the earlier step)

Now shutdown and try to reboot to windows. It should work. Enjoy.

edit flag offensive delete link more
1

answered 2014-11-09 10:13:26 -0500

R Schultz gravatar image

updated 2014-11-09 11:32:55 -0500

Previous answers should work however when you update your kernel, you will likely have to redo the changes. This can be avoided by adding the following to /etc/grub.d/40_custom. You will still have the "bad" Windows loader but you will also have a good one that will stay with updates.

menuentry 'My Working Windows Bootloader' {
    search --no-floppy --fs-uuid --set=root '1234-567A'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    boot
}

After adding it you will need to run the following command.

sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

This assumes a stock FC20 load with all the updates.

edit flag offensive delete link more

Comments

Hello,

I have tried all the above steps but can not start windows. Here are the details of the partition :

 fdisk -l

Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 551C0FD7-FE85-4C73-B2A9-D2E8A41F2D93

Device           Start          End   Size Type
/dev/sda1         2048      1023999   499M Windows recovery environment
/dev/sda2      1024000      1638399   300M EFI System
/dev/sda3      1638400      1900543   128M Microsoft reserved
/dev/sda4      1900544    154824703  72.9G Microsoft basic data
/dev/sda5    453666817    498020352  21.2G Windows recovery environment
/dev/sda6    498020353    500117504     1G Windows recovery environment
/dev/sda7    154824704    206024703  24.4G Microsoft basic data
/dev/sda8    206024704    214216703   3.9G Linux swap
/dev/sda9    214216704    453666815 114.2G Microsoft basic data

The 40_custom is as follows :

#!/bin/sh
exec tail ...
(more)
Dhiraj gravatar imageDhiraj ( 2015-02-06 12:23:44 -0500 )edit
0

answered 2015-02-06 12:22:20 -0500

Dhiraj gravatar image

Hello,

I have tried all the above steps but can not start windows. Here are the details of the partition :

 fdisk -l

Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 551C0FD7-FE85-4C73-B2A9-D2E8A41F2D93

Device           Start          End   Size Type
/dev/sda1         2048      1023999   499M Windows recovery environment
/dev/sda2      1024000      1638399   300M EFI System
/dev/sda3      1638400      1900543   128M Microsoft reserved
/dev/sda4      1900544    154824703  72.9G Microsoft basic data
/dev/sda5    453666817    498020352  21.2G Windows recovery environment
/dev/sda6    498020353    500117504     1G Windows recovery environment
/dev/sda7    154824704    206024703  24.4G Microsoft basic data
/dev/sda8    206024704    214216703   3.9G Linux swap
/dev/sda9    214216704    453666815 114.2G Microsoft basic data

The 40_custom is as follows :

#!/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 'My Working Windows Bootloader' {
    search --no-floppy --fs-uuid --set=root 'FA3C-ACAB'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
    boot
}

However, when I try to boot windows it keeps saying "cannot load image; you need to load the kernel first" Any idea will be much appreciated.

Thanks, Dhiraj

edit flag offensive delete link more

Comments

This isn't an answer. If existing questions don't help you, please open a new question.

randomuser gravatar imagerandomuser ( 2015-02-06 18:32:18 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-01-18 14:14:31 -0500

Seen: 5,886 times

Last updated: Apr 03 '15