bugGNU GRUB - Bugs: bug #60067, grub-install --core-compress...


You are not allowed to post comments on this tracker with your current authentication level.

bug #60067: grub-install --core-compress option broken (trivial fix)

Submitted by:  ratter
Submitted on:  Tue 16 Feb 2021 03:52:43 PM UTC  
Category:  Installation Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release: 
Release:  2.02 Reproducibility:  Every Time
Planned Release:  None

Fri 24 Sep 2021 10:57:05 PM UTC, comment #1: 

Yep, you'll be happy to hear this has been known for at least 3 years along with the solution. See: https://lists.gnu.org/archive/html/grub-devel/2018-09/msg00018.html

I actually created a patch many months ago implemented similar to what you describe, but haven't sent it to the mailing list yet. May be I'll get around to it soon.

Tue 16 Feb 2021 03:52:43 PM UTC, original submission:  

Invoking ‘grub-install’ with “--core-compress <anything>” produces the error message “Option should have been recognized!?”.

$ grub-install --core-compress none

  grub-install: --core-compress: (PROGRAM ERROR) Option should have been recognized!?
  Try 'grub-install --help' or 'grub-install --usage' for more information.

$ grub-install --core-compress bogus

  grub-install: --core-compress: (PROGRAM ERROR) Option should have been recognized!?
  Try 'grub-install --help' or 'grub-install --usage' for more information.

Fix: In the file ‘util/grub-install-common.c’, at the beginning of the function ‘grub_install_parse()’, replace the character constant ‘C’ in the ‘case’ statement with the macro ‘GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS’.

grub_install_parse (int key, char *arg)
  switch (key)
    /* case 'C': */

Program output after the fix, with the same command line as before:

$ grub-install --core-compress bogus

  grub-install: error: Unknown compression format bogus.

(Passing “--core-compress bogus” was just the quickest way of demonstrating that the option parsing error was fixed.  It also seems to be functioning as intended:

$ grub-install --core-compress none --verbose <other-options…> <device>

…invokes “grub-mkimage --compression none”, as expected.)



No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by g10 (Posted a comment)
  • -email is unavailable- added by ratter (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.7