Hide Forgot
I'm not sure if this is a lack of documentation or an actual bug. I've found a lot about loading grub2->windows, but I haven't found anything about loading windows->grub2. With grub-legacy, I would do something like this: # dd if=/dev/sdb of=/mnt/ntfs/Boot/FedoraLDR bs=512 count=1 I would setup Windows to point to C:\Boot\FedoraLDR, and I would be able to boot into grub-legacy from the Windows boot menu. I tried that on grub2, but all I got after the Windows boot menu was: GURB _ (where _ was the blinking cursor). I also tried the core.img file off of /boot, but all I got after the Windows boot menu was 1 1/2 lines of garbage. In order to support this configuration in grub-legacy, I had to manually run 'install' with the d option, because it wasn't installed to the current drive: http://www.gnu.org/software/grub/manual/legacy/grub.html#install Do I have to do something like that for grub2? What am I missing? My partiton info is: GPT /dev/sda1 windows /dev/sdb1 bios-boot 2mb /dev/sdb2 /boot 512mb /dev/sdb3 everything else Any help would be greatly appreciated. Thank you.
I followed the steps here, and I was able to boot into the grub2 recovery console. http://blog.mudy.info/2010/08/boot-grub2-stage2-directly-from-windows-bootmgr-with-grub4dos-stage1/ However, it still gave me a message about not being able to find a partition.
"chainloading" from the windows boot loader to Fedora is not "supported". Grub2 is different from grub "1"; it has a lot of advantages but also some regressions - that's just how it is. You will probably have more luck getting help upstream or in some kind of forum - this is just a bug tracker. One reason it doesn't work could be that grub2 uses more than the 1st sector. Something like count=2048 would perhaps make a difference. Alternatively you could install Fedora grub2 to a partition (using grub2-install -f). It seems like you are pushing the windows boot loader to its limits (and above). The best advice might be to use a different boot loader.
Although chainloading from the Windows boot loader to grub2 is not supported, I wanted to document my experience here to help others who might be in a similar situation. It seems that grub2, like grub-legacy, uses a relative path in its boot image. Specifically, gurb2 uses the current drive, not the drive it was installed on. This means that if you need to move the boot image to another drive -- like your C: drive -- then grub2 will use your the current drive to try to find its grub2 files, not the drive it was installed on, which will of course fail. To workaround this issue, you need to manually create a boot image after grub2 has been installed and configured. Complicating this process is an apparent limitation of the Windows boot loader to images of 32k or less. I'm not sure if this limitation varies based upon the cluster size of your NTFS file system (mine is 4k) or if this limitation is hard coded. If you are over the limit, you will receive an error message from the Windows boot loader saying that the boot image you are trying to load is corrupt. If you are unable to boot, try using a LiveCD and follow these instructions under the ChRoot section to install grub2: https://help.ubuntu.com/community/Grub2#ChRoot Note, if you have a separate /boot partition, mount it *after* the chroot command to ensure that grub2 will recognize it during the install process. After installing grub2 (using the grub2-install command), you need to generate your custom image using grub2-mkimage. For me, I used the command: # grub2-mkimage --prefix="(hd2,gpt2)/grub2" \ -o /tmp/grub2/core.img \ --format=i386-pc \ biosdisk part_gpt ext2 Your exact prefix may vary depending on which drive and partition grub2 is installed on. I am using x86 on BIOS, but your format option will be different if you use EFI or a different processor. Finally, you might also need different module options, like part_msdos instead of part_gpt. However, please keep in mind the 32k size limit I mentioned earlier. The core.img is not a complete, bootable image. You need to merge it with lnxboot.img (it has to be this one) to create a complete image. I used the command: # cat /boot/grub2/lnxboot.img /tmp/grub2/core.img > Grub2LDR Then copy Grub2LDR to your C: drive, and configure your Windows boot loader to point to it. Please note, when you try booting, you may get an error message from grub2 saying drive/partition not found, and it may drop you to rescue mode. For some reason, grub2 may not recognize your drives in the order you expected. If this happens, type 'ls' to get the drives and partitions as grub2 sees them, and figure out which one is the correct one to boot. Then use that information to go back and redo the grub2-mkimage step, but this time use the correct prefix as grub2 sees it. I hope this has been helpful.