Grub2: Is it possible to boot in window-8 by directly loading the bootmgr without having to chainload the "volume boot code"
For me it worked. I did something like this:
You can adding a suitable entry to /etc/grub.d/40_custom
and then doing a sudo update-grub
. An entry might look something like those:
if you find a EFI partition
menuentry "Win 8" {
set root='(hd0,gpt1)'
chainloader /EFI/microsoft/BOOT/bootmgfw.efi
}
although if you find the bootmgr file
menuentry "Win 8" {
set root='(hd0,msdos1)'
ntldr /bootmgr
boot
}
(hd0,msdos1)
are my disk and my partition where win 8 is installed. To find the right settings for set root='(hd0,gpt1)'
you can do as followed:
- When GRUB starts: press
c
to enter in command line mode - write the command
ls
to get the list of all (disk,partitions) entry like(hd0,gpt1)
etc. - Type
ls (hd0,gpt1)
and try also the others to find the right one, where win 8 is installed. - When you find the right one you can type
ls (hd0,gpt1)/
to list the content of the partition. And than look if you have a/EFI/
folder or only a/bootmgr
file
Now you can finally adding the right entry in the /etc/grub.d/40_custom
file!
Related videos on Youtube
curious_kid
Updated on September 18, 2022Comments
-
curious_kid over 1 year
I want to install grub on window partition. Installing grub on the windows partition "C:" will be overwriting the windows "volume boot code" so window-8 will not be able to boot. "chainloader +1" command won't work.
Is there any method that can be used to boot into the window in that case.
From what I have read in this topic it might be possible, by using the "ntldr /boomgr" command. According to that answer"ntldr /bootmgr" will bypass PBR and load "bootmgr" directly.
set root=(hdX,Y) #where bootmgr is located. insmod ntfs # load ntfs module ntldr /bootmgr boot
Any of you have tried this before ?
-
Deryck over 10 yearsThe biggest issue here is A) is the drive in GPT or MBR already and B) is it booting with UEFI? If so, you'll need to install the boot loader to the root partition and use something like EasyBCD to add it to the Windows boot menu. Or just get rid of Windows all together like I did.
-
curious_kid over 10 yearsMy Hard-Drive use MBR partitioning, and system uses BIOS.
-
Deryck over 10 yearsIs that boot partition you're trying to use large? Like over 1GB?
-
curious_kid over 10 yearsI don't have any separate boot partition for window-8. system boots from the drive c:\ where all the boot and other system file are present. I'm trying to install grub2 in this partition. Doing this will render window-8 un-bootable, as window specific "volume boot code" will be overwritten by grub2. So what I wanted to ask was if it is possible to load window boot-manager "bootmgr" directly from grub. I will be using Windows bootloader in the MBR which will be chainloading the grub2 from the c: drive.
-
oldfred almost 9 yearsWindows has to have its boot code and other info in the PBR or boot sector of the partition. It will see partition as RAW if you put grub into PBR. Do you have any other partitions? Grub2 also does not recommend installing to a PBR as it converts to blocklists or hard coded addresses. Then an update or even a fsck may move a file and break grub. You then have to use your Ubuntu live installer to reinstall grub.
-