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)

Submitter:  ratter
Submitted:  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:  2.02
Release:  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.

g10
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’.


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


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.)

ratter

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code