Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to boot Windows 10 partition by grub2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 381
Location: Paris

PostPosted: Sun Jan 31, 2016 1:47 pm    Post subject: How to boot Windows 10 partition by grub2 Reply with quote

Actually, the objective is to boot the Windows 10 partition to continue the installation, which means that the installation of my Windows 10 has not finished. Here is the thing:

I installed Gentoo in a removal HDD with UEFI boot. I also want to install the Windows 10 in the same removal HDD. I used a tool to start the installation of Windows 10 in the removal HDD by using a laptop running Windows 8 (Borrowed from my friend). However due to the limited time, the installation has not finished. I only finished the first step in copying the necessary files to the partition. All I need to do is to reboot the laptop and boot the windows 10 partition to continue the installation.

Issue is, I am running the grub2 as the bootloader. All I found from internet is to install a tool in gentoo to detect the Windows partition automatically. However it doesn't work. Probably because the installation has not finished.

So the question is, How to boot the Windows 10 partition by grub2 to continue the installation of Windows 10? Thanks
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2613

PostPosted: Sun Jan 31, 2016 2:53 pm    Post subject: Reply with quote

So you've installed sys-boot/os-prober and did "grub2-mkconfig -o /boot/grub/grub.cfg" again?
And, did it find some MS stuff?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1368
Location: Montréal

PostPosted: Sun Jan 31, 2016 3:08 pm    Post subject: Reply with quote

I would try first to boot Windows 10 from the EFI boot menu unless there is no Windows entry there.

In a BIOS mode installation, Grub can chainload the Windows boot partition to make it boot. In an EFI mode installation I have never try to chainload anything. All depend if the Windows 10 bootloader have been install before you stop the installation. I think it is better to finish the Windows installation before to try to boot it with the EFI or the Grub menus.
_________________
Paul
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 381
Location: Paris

PostPosted: Mon Feb 01, 2016 12:09 am    Post subject: Reply with quote

charles17 wrote:
So you've installed sys-boot/os-prober and did "grub2-mkconfig -o /boot/grub/grub.cfg" again?
And, did it find some MS stuff?


Yes, I installed. It didn't find anything.
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 381
Location: Paris

PostPosted: Mon Feb 01, 2016 12:13 am    Post subject: Reply with quote

Logicien wrote:
I would try first to boot Windows 10 from the EFI boot menu unless there is no Windows entry there.

In a BIOS mode installation, Grub can chainload the Windows boot partition to make it boot. In an EFI mode installation I have never try to chainload anything. All depend if the Windows 10 bootloader have been install before you stop the installation. I think it is better to finish the Windows installation before to try to boot it with the EFI or the Grub menus.


The point is how to finish the installation. it's installed on the removal HDD, connected by USB.
I will try chainload at first. I never tried before either.
Back to top
View user's profile Send private message
pd1986
Guru
Guru


Joined: 19 Feb 2012
Posts: 381
Location: Paris

PostPosted: Wed Feb 03, 2016 2:10 pm    Post subject: Reply with quote

Logicien wrote:
I would try first to boot Windows 10 from the EFI boot menu unless there is no Windows entry there.

In a BIOS mode installation, Grub can chainload the Windows boot partition to make it boot. In an EFI mode installation I have never try to chainload anything. All depend if the Windows 10 bootloader have been install before you stop the installation. I think it is better to finish the Windows installation before to try to boot it with the EFI or the Grub menus.


It doesn't work. Either it says no EFI file or ntldr mod

I found some interesting information in the following link:
https://wiki.gentoo.org/wiki/GRUB2/Chainloading

where it says

Quote:
An entry for a GPT hybrid MBR works a bit different than the previous BIOS-MBR examples. Booting multiple versions of Windows can be achieved with remapping and/or hiding partitions with GRUB2's parttool option:

Example for GPT hybrid MBR

FILE /boot/grub/grub.cfg

menuentry "Windows 7 BIOS MBR" {
insmod part_msdos
insmod chain
parttool hd1,msdos1 hidden+ boot-
parttool hd1,msdos2 hidden- boot+
chainloader (hd1,msdos2)+1
}


But I don't know how to make the right number for the harddisk,

my windows is located in hd1,gpt5

Could you help me to fix it? Thanks
Back to top
View user's profile Send private message
v_andal
Guru
Guru


Joined: 26 Aug 2008
Posts: 523
Location: Germany

PostPosted: Thu Feb 04, 2016 8:24 am    Post subject: Reply with quote

I can be completely wrong, but I suspect that your problem is in missing boot files for windows 10.

Normally, windows is booted by file EFI/Microsoft/Boot/bootmgfw.efi The file is located on the UEFI partition. Normally it is first partition (/dev/sda1), but it can be any other. I don't know what happens during installation to removable disks, that partition can be created on removable disk, or on the first internal disk. You have to find it yourself.

Your goal is to point either Grub or UEFI to the appropriate EFI/Microsoft/Boot/bootmgfw.efi , that is if your aborted installation has created that file.

Normally, if the file is there, then the following grub config entry should allow booting it

Code:

menuentry "Windows" {
    insmod part_gpt
    insmod chain
    set root='(hd0,gpt1)'
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}


You just have to adjust the "set root" to point to correct EFI partition. In the example it is disk 1 (hd0) and partition 1 (gpt1)

Personally, I like rEFInd bootloader. It is easier to use because it automatically finds all bootable files on all disks. With it, one usually works on hiding undesired options :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum