<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1442208937184_2600">There is some interest lately in making a self-contained grub2 boot image - call it pvgrub2, used for booting paravirtual domU in xen where a grub2 config is installed.</div><div id="yui_3_16_0_1_1442208937184_2848"><br></div><div id="yui_3_16_0_1_1442208937184_2757">First attempt</div><div id="yui_3_16_0_1_1442208937184_3177">------------------<br></div><div id="yui_3_16_0_1_1442208937184_3192">I first tried using the grub2*.src.rpm from the C7 vault.</div><div id="yui_3_16_0_1_1442208937184_2756"><br></div><div id="yui_3_16_0_1_1442208937184_2755">I configured as shown below</div><div dir="ltr" id="yui_3_16_0_1_1442208937184_2770"><a id="yui_3_16_0_1_1442208937184_2771" href="https://blog.xenproject.org/2015/01/07/using-grub-2-as-a-bootloader-for-xen-pv-guests/">https://blog.xenproject.org/2015/01/07/using-grub-2-as-a-bootloader-for-xen-pv-guests/</a></div><div id="yui_3_16_0_1_1442208937184_2818" dir="ltr"><br></div><div id="yui_3_16_0_1_1442208937184_2817" dir="ltr">for headers, I used xen-devel, xen-libs, xen-licenses from a recent build I did</div><div id="yui_3_16_0_1_1442208937184_2849" dir="ltr"><a id="yui_3_16_0_1_1442208937184_2850" href="http://107.185.144.55/xen/cent7/dom0/RPMS/stable-4.5/mock/">http://107.185.144.55/xen/cent7/dom0/RPMS/stable-4.5/mock/</a></div><div id="yui_3_16_0_1_1442208937184_2970" dir="ltr"><br></div><div id="yui_3_16_0_1_1442208937184_2901" dir="ltr">this gave a segfault from grub2-mkimage with a cmdline like</div><div id="yui_3_16_0_1_1442208937184_2974" dir="ltr">/usr/bin/grub2-mkimage  -O x86_64-xen   -C auto  -d /usr/lib/grub/x86_64-xen -c ./grub-bootstrap.cfg     -m ./memdisk.tar     -o ./grub2-x86_64-xen.bin -v  ext2 fat file font fshelp gzio halt hashsum help legacycfg linux loadenv loopback part_dvh part_gpt part_msdos part_plan part_sun xfs xnu_uuid xnu_uuid_test xzio</div><div id="yui_3_16_0_1_1442208937184_3072" dir="ltr"><br></div><div id="yui_3_16_0_1_1442208937184_3101" dir="ltr">the image would finish if I cut down the module list to about 8 or less modules. This is not enough for a useful image .<br class="" id="yui_3_16_0_1_1442208937184_2978"><br></div><div id="yui_3_16_0_1_1442208937184_2920" dir="ltr">Second Attempt</div><div dir="ltr">----------------</div><div dir="ltr">In the same build env, I started with the git clone (see link). Now when running grub-mkimage I included all the modules in</div><div dir="ltr">/usr/lib/grub/x86_64-xen/ and the image formed without error and works as expected as a xen bootloader.</div><div dir="ltr"><br></div><div dir="ltr">The only difference in the two builds is the size of grubX-mkimage: one is stripped and the other not.</div><div dir="ltr"> Using the official grub2 C7 packages failed and a rogue build from git worked.</div><div dir="ltr"><br></div><div dir="ltr">regards,</div><div dir="ltr">PryMar56<br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div id="yui_3_16_0_1_1442208937184_2770"><br></div></div></body></html>