For grub2-mkimage (both memdisk and regular invocation), and for grub2-mkstandalone wrapper, --compression apparently has no effect (files are never compressed): # grub2-mkstandalone -O x86_64-efi -C xz -o BOOTx64.EFI # ls -l BOOTx64.EFI -rw-r--r-- 1 root root 2338816 Jul 2 16:39 BOOTx64.EFI # grub2-mkstandalone -O x86_64-efi -C none -o BOOTx64.EFI # ls -l BOOTx64.EFI -rw-r--r-- 1 root root 2338816 Jul 2 16:39 BOOTx64.EFI
I'm not sure how the compression flag is actually supposed to work. I suggest asking in upstream support channels. If you need a patch backported, feel free to reopen.
It seems that compression is only supported for select architectures, with *-efi not among those supported -- see PLATFORM_FLAGS_DECOMPRESSORS in util/grub-mkimage.c.
Feature request submitted: https://savannah.gnu.org/bugs/index.php?36770.
> If you need a patch backported, feel free to reopen. Hi, there is a patch that fixes transparent decompression of individual modules: https://savannah.gnu.org/bugs/index.php?36770 https://savannah.gnu.org/support/download.php?file_id=26165 Is it possible to backport it?
(In reply to comment #4) That patch has not yet been committed upstream. Please work with upstream to test it and get it merged, then I can try to backport it.
(In reply to comment #5) > That patch has not yet been committed upstream. > > Please work with upstream to test it and get it merged, then I can try to > backport it. The patch has been committed: http://bzr.savannah.gnu.org/lh/grub/trunk/grub/revision/4555?remember=4555&compare_revid=4553
Fixed in the tree. + 07 Jan 2013; Mike Gilbert <floppym@gentoo.org> + +files/grub-2.00-compression.patch, grub-2.00-r1.ebuild: + Include patch to fix module decompression, #424527 by Maxim Kammerer.