Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

How to boot Windows 10 partition by grub2

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
pd1986
Guru
Guru
Posts: 404
Joined: Sun Feb 19, 2012 9:38 am
Location: Paris

How to boot Windows 10 partition by grub2

  • Quote

Post by pd1986 » Sun Jan 31, 2016 1:47 pm

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
Top
charles17
Advocate
Advocate
Posts: 3686
Joined: Sun Mar 02, 2008 3:20 pm

  • Quote

Post by charles17 » Sun Jan 31, 2016 2:53 pm

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?
Top
Logicien
Veteran
Veteran
User avatar
Posts: 1555
Joined: Fri Sep 16, 2005 8:04 am
Location: Montréal

  • Quote

Post by Logicien » Sun Jan 31, 2016 3:08 pm

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
Top
pd1986
Guru
Guru
Posts: 404
Joined: Sun Feb 19, 2012 9:38 am
Location: Paris

  • Quote

Post by pd1986 » Mon Feb 01, 2016 12:09 am

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.
Top
pd1986
Guru
Guru
Posts: 404
Joined: Sun Feb 19, 2012 9:38 am
Location: Paris

  • Quote

Post by pd1986 » Mon Feb 01, 2016 12:13 am

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.
Top
pd1986
Guru
Guru
Posts: 404
Joined: Sun Feb 19, 2012 9:38 am
Location: Paris

  • Quote

Post by pd1986 » Wed Feb 03, 2016 2:10 pm

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
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
Top
v_andal
Guru
Guru
Posts: 549
Joined: Tue Aug 26, 2008 4:25 pm
Location: Germany

  • Quote

Post by v_andal » Thu Feb 04, 2016 8:24 am

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: Select all

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 :)
Top
Post Reply

7 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic