Is lack some package or lack some other options? or just a bug of grub-mkresuce? Is some example for the --core-compress= option?

$ grub-mkrescue --core-compress=xz --compress=xz -o grub.iso ./iso
grub-mkrescue: --core-compress: (PROGRAM ERROR) Option should have been recognized!?
Try 'grub-mkrescue --help' or 'grub-mkrescue --usage' for more information.
  • You don't have much of a question in this Question. The current answer seems to be "that's right, it didn't seem to accept that option". Perhaps the xz compression tool is not available?
    – Jeff Schaller
    Sep 3, 2018 at 12:28
  • But grub-mkrescue --help explicit say it accept this "--core-compress=xz",and some error possible not a bug of grub-mkrescue self,that is lack some packge,for example grub-pc-bin and xorriso. and the --compress=xz option is work. @JeffSchaller
    – illiterate
    Sep 3, 2018 at 12:51
  • 1
    The question to ask at [email protected]. would be where GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS is interpreted. Its help text neighbors are in util/grub-install-common.c Sep 4, 2018 at 18:04

1 Answer 1


It seems that option --core-compress is declared but not implemented. If you use an option unknown to grub-mkrescue and its helpers, then this option gets forwarded to xorriso, which will complain if it does not know the option either:

xorriso : FAILURE : -as mkisofs: Unrecognized option '--XYZ-compress=xz'

But you see a GRUB "PROGRAM ERROR", because include/grub/util/install.h has

      "xz|none|auto",                                           \
      0, N_("choose the compression to use for core image"), 2},        \

If you use the option, it gets translated into the number code GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS. Now GRUB should somewhere have a piece of code which recognizes that number, reads the argument "xz", and registers the user's wish.

It is done with "--compress=xz". install.h has:

  { "compress", GRUB_INSTALL_OPTIONS_INSTALL_COMPRESS,            \
    "no|xz|gz|lzo", 0,                            \
    N_("compress GRUB files [optional]"), 1 },                            \

and util/grub-install-common.c has:

      if (strcmp (arg, "no") == 0
      if (strcmp (arg, "gz") == 0)
      if (strcmp (arg, "xz") == 0)

But for GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS, there is no such code nowhere.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .