Discussion:
grub-mkrescue: Option --core-compress is in help text but not recognized
(too old to reply)
Thomas Schmitt
2018-09-04 20:22:23 UTC
Permalink
Hi,

on occasion of
https://unix.stackexchange.com/questions/466495
i wonder whether it is a mistake that grub-mkrescue option --core-compress=
is declared in include/grub/util/install.h, or whether it is a mistake
that there is no code to see anywhere which would recognize the associated
key GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS.

(I'd expect it in util/grub-install-common.c where other options from
install.h have their key interpreted.)

I have no idea what the problem poster hopes to achieve by his options.
It's just that --core-compress is listed in the help text and leads to
a self-accusation of grub-mkrescue if it is used:

$ grub-mkrescue -o output.iso minimal_dir --core-compress=xz

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

A run of grub-mkrescue --usage, too, mentions the option.


Have a nice day :)

Thomas
Thomas Schmitt
2018-09-04 21:17:22 UTC
Permalink
Hi,

can it be that in commit f23bc65103d045f899f02ade6dd9d1f964cdb707
"Transform -C option to grub-mkstandalone to --core-compress available"
it was forgotten to change the old 'C' to
GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS in grub_install_parse() of
util/grub-install-common.c ?

At least the function understands the arguments of --core-compress but
only if key is 'C' rather than GRUB_INSTALL_OPTIONS_INSTALL_CORE_COMPRESS.
The function recognizes the other options by their long enum names.


Have a nice day :)

Thomas

Continue reading on narkive:
Loading...