[lug] Grub2 core.img too large to embed.

David L. Anselmi anselmi at anselmi.us
Tue Aug 27 16:10:06 MDT 2013

I ran into a case where the grub2 core.img is bigger than the 32kB gap between the MBR and first
partition.  There are lots of discussions about making the gap bigger.

Does anyone know how to make the core.img smaller?  Or is it already optimized?

I haven't found a way to control what modules are included in it.

 From grub-install --debug I found the mkimage command:

/usr/bin/grub-mkimage -d /usr/lib/grub/i386-pc -O i386-pc --output=/boot/grub/i386-pc/core.img
--prefix='(lvm/vg0-root)/boot/grub' biosdisk ext2 part_msdos part_msdos lvm

If the list at the end are the only modules included then it seem unlikely it can be shrunk.  Using
various values of -C didn't change the core.img size.


More information about the LUG mailing list