help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grub2 not using linux cmdline as verbatim


From: Jiri Jaburek
Subject: grub2 not using linux cmdline as verbatim
Date: Thu, 04 Jun 2015 19:24:51 +0200

Hello,
the documentation [1] for linux / linux16 mentions that

  "The rest of the line is passed verbatim as the kernel command-line."

which is false, I was able to cause

  error: syntax error.
  error: Incorrect command.
  error: syntax error.

by specifying & (ampersand character) on the command line.
(Yes, grub2.cfg, not the shell generation logic.)

Quoting the character seems to help, but that further proves that
grub doesn't treat even the quotes as verbatim text.

Since I have all this as part of a more complex infrastructure,
it's impossible to hand-edit every such occurrence - could you please
tell me which characters have special meaning (aside from newline)
and/or confirm that the current behavior (not treating text as
verbatim) is a bug?

If it is a feature, what would be the easiest way to make grub
treat unknown (external) kernel cmdline as valid? Quoting the entire
cmdline (after kernel filename) seems to leave the quotes intact and
take the cmdline as verbatim, but I don't want the extra quotes to
be there if I need them to make grub treat the cmdline as verbatim
in the first place.

TL;DR:

- this works:
  linux16 /somekernel opt1 opt2 opt3

- this triggers syntax error:
  linux16 /somekernel opt1 opt2&opt3

- this works, but removes the quotes:
  linux16 /somekernel opt1 "opt2&opt3"

- this also works, but leaves the quotes intact:
  linux16 /somekernel "opt1 opt2&opt3"

Reproducible with grub-2.02 on x86 and powerpc at least, on
RHEL/Fedora, but reproduced with Super Grub Disk, so it's not
downstream-specific.

Thanks,
Jiri


[1]: http://www.gnu.org/software/grub/manual/grub.html#linux



reply via email to

[Prev in Thread] Current Thread [Next in Thread]