В Mon, 5 Aug 2013 13:30:04 -0400 Alexei Podtelezhnikov <[email protected]> пишет:
> Hi all, > > Thanks to ideas in [1], I managed to chainload GRUB2 core.img from Windows > 7 BOOTMGR. Here is the three steps. > > 1) Create core.img with **full** direct unmounted path to grub directory > starting from partition, for example > > grub2-mkimage --output=./core.img --format=i386-pc --prefix=*(hd0,1)*/grub2 > biosdisk part_msdos ext2 > More robust is to use embedded config to search for partition UUID. Hard disk enumeration may change between reboots. > 2) Concatenate lnxboot.img > > cat /boot/grub2/i386-pc/lnxboot.img ./core.img > ./grub2.img > > 3) Place ./grub2.img onto windows boot partition and configure BCD with > bcdedit.exe under Windows to load the file as a BOOTSECTOR application. > > It turns out that ./grun2.img can be larger than 512 bytes. BOOTMGR will > load it just fine. Now, to be honest, the second step is just annoying. Do > you have a format option for grub2-mkimage that would automatically include > lnxboot.img? It would make the whole process so much smoother and more > logical. Just a suggestion. > Adding something like i386-pc-lnx is relatively trivial from technical PoV. The main problem is that we need to keep boot code and /boot/grub directory in think - i.e. both must be updated in one step. Does BCD configuration need update after grub2.img gets updated? > Thanks, > Alexei > > > [1] > http://blog.mudy.info/2010/08/boot-grub2-stage2-directly-from-windows-bootmgr-with-grub4dos-stage1/ _______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
