All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: grub2: menuentry stanza doesn't accept $ { } in variable substitutions
       [not found] ` <87wt7hhe2x.fsf@gismo.pca.it>
@ 2006-10-03 11:48   ` Luca Capello
       [not found]   ` <8764ex20rb.fsf@gismo.pca.it>
  1 sibling, 0 replies; 3+ messages in thread
From: Luca Capello @ 2006-10-03 11:48 UTC (permalink / raw)
  To: grub-devel


[-- Attachment #1.1: Type: text/plain, Size: 2189 bytes --]

Hello all,

this is my first post on this list :-)

I'm resending my previous mail which was directly rejected: I was
aware of the fact that grub-devel is a subscribed-only list, but I
(erroneously) thought there was a sort of administrator.  Never
mind...

I'm posting here as suggested by Robert Millan, including the original
Debian bug report, available at:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=390473

Thx, bye,
Gismo / Luca

On Tue, 03 Oct 2006 12:46:14 +0200, Luca Capello wrote:
> Hi Robert!
>
> To the grub-devel guys: attached the report of a grub2 bug I
> experienced on Debian (marco_g should already be aware of).  In case
> of replies, please cc: the Debian BTS and myself (I set R-T and M-F-T
> accordingly).
>
> On Mon, 02 Oct 2006 17:10:12 +0200, Robert Millan wrote:
>> Given that this is treated as a syntax error, I don't consider it to
>> be release critical (it is important, though, on the basis that a
>> non-release Debian platform depends on it).
>
> Well, given the definition of critical [1] and the fact that with the
> old menu.lst converted to grub.cfg my system broke, I chose critical.
> However, I agree that mine could be considered a not-so-common case,
> thus I'm fine with important :-)
>
>> I would like not to diverge from upstream, specialy since GNU/Hurd
>> is a platform we expect them to support.  Please, could you resend
>> your report to them ?  (grub-devel@gnu.org).
>
> Done (and marked the Debian bug as forwarded).
>
> I should note that thanks to the help of #hurd and #grub of Freenode
> (mostly marco_g ;-) ), the problem is solved escaping the "bad"
> characters within single quotes.
>
> Anyway, I still consider it an important bug (at least because there's
> no documentation for it).  Waiting for an upstream solution, I'll put
> a note in the README.Debian (or better in the NEWS.Debian, which is
> showed during upgrades).
>
> Thx, bye,
> Gismo / Luca
>
> Footnotes: 
> [1] makes unrelated software on the system (or the whole system)
>     break, or causes serious data loss, or introduces a security hole
>     on systems where you install the package


[-- Attachment #1.2: Debian bug #390473 --]
[-- Type: message/rfc822, Size: 4942 bytes --]

[-- Attachment #1.2.1.1: Type: text/plain, Size: 2299 bytes --]

Package: grub2
Version: 1.94+20060926-1
Severity: critical

Hello,

with the previous grub1 I had a Debian GNU/Hurd entry in my menu.lst:
=====
title		Debian GNU/Hurd
root		(hd0,9)
kernel		/boot/gnumach.gz root=device:hd0s10
module		/hurd/ext2fs.static \
		--multiboot-command-line=${kernel-command-line} \
		--host-priv-port=${host-port} \
		--device-master-port=${device-port} \
		--exec-server-task=${exec-task} \
		-T typed ${root} $(task-create) $(task-resume)
module		/lib/ld.so.1 /hurd/exec $(exec-task=task-create)
boot
=====

The first time I installed grub2 I "converted" that entry into the
grub2 config menu:
=====
menuentry "Debian GNU/Hurd" {
	set root=(hd0,9)
	multiboot /boot/gnumach.gz root=device:hd0s10
	module /hurd/ext2fs.static \
	       --multiboot-command-line=${kernel-command-line} \
	       --host-priv-port=${host-port} \
	       --device-master-port=${device-port} \
	       --exec-server-task=${exec-task} \
	       -T typed ${root} $(task-create) $(task-resume)
	module /lib/ld.so.1 /hurd/exec $(exec-task=task-create)
}
=====

After a `grub-install /dev/hda` and a reboot, grub2 entered in a panic
state at boot.  Hopefully, the panic is reproducible, even on qemu:
create the following stanza (you can substitute $ with a second { ):

    menuentry "test" { $ }

The panic is similar to the error generated with a $ at the beginning
of the grub.cfg file.  While in the latter case grub2 can continue
booting, in n the former case the only way to solve it is to boot with
a rescue CD and remove the offending characters from grub2.cfg.

Trying to escape \$ \{ and \} doesn't solve the problem.

Thx, bye,
Gismo / Luca

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages grub2 depends on:
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  liblzo1                      1.08-3      data compression library (old vers
ii  libncurses5                  5.5-4       Shared libraries for terminal hand

grub2 recommends no packages.

-- no debconf information

[-- Attachment #1.2.1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug#390473: grub2: menuentry stanza doesn't accept $ { } in variable substitutions
       [not found]       ` <20061024132909.GA15375@khazad.dyndns.org>
@ 2006-10-24 21:21         ` Luca Capello
       [not found]           ` <20061025174949.GD28301@khazad.dyndns.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Capello @ 2006-10-24 21:21 UTC (permalink / raw)
  To: Robert Millan; +Cc: ML GRUB-devel, 390473

[-- Attachment #1: Type: text/plain, Size: 1755 bytes --]

reopen 390473
retitle 390473 grub2: menuentry stanza with additional $ or { causes boot panic
found 390473 1.95-1
thanks

Hi Robert!

NB: forwarding again to grub-devel, but setting M-F-T and R-T to the
bug, Robert (I hope you don't mind) and myself.

On Tue, 24 Oct 2006 15:29:09 +0200, Robert Millan wrote:
> Closing due to lack of response.

I'm sorry, I was quite busy in the last weeks and I never finished my
answer.
>
> On Sat, Oct 14, 2006 at 09:36:57PM +0200, Robert Millan wrote:
[something already present in the bug report]
>> According to upstream (IRC), this behaviour is consistent with GRUB2 having its
>> own variable support (and namespace..).  So you really need to use this new
>> syntax (I'll take this into account for my work on update-grub2).
>> 
>> Can we close this bug now?

While the original bug can be considered close, the boot panic
remains, as I explained in my first post:

On Sun, 01 Oct 2006 15:54:00 +0200, Luca Capello wrote:
> After a `grub-install /dev/hda` and a reboot, grub2 entered in a
> panic state at boot.  Hopefully, the panic is reproducible, even on
> qemu: create the following stanza (you can substitute $ with a
> second { ):
>
>     menuentry "test" { $ }
>
> The panic is similar to the error generated with a $ at the
> beginning of the grub.cfg file.  While in the latter case grub2 can
> continue booting, in n the former case the only way to solve it is
> to boot with a rescue CD and remove the offending characters from
> grub2.cfg.

I reopened the bug and I changed the title to reflect the situation.

BTW, I just tested with the latest grub_1.95-1, the error is still
present, thus I added the information to the BTS.

Thx, bye,
Gismo / Luca

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug#390473: grub2: menuentry stanza doesn't accept $ { } in variable substitutions
       [not found]           ` <20061025174949.GD28301@khazad.dyndns.org>
@ 2006-10-30  9:21             ` Luca Capello
  0 siblings, 0 replies; 3+ messages in thread
From: Luca Capello @ 2006-10-30  9:21 UTC (permalink / raw)
  To: 390473; +Cc: ML GRUB-devel, Robert Millan

[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]

Hello!

Again, forwarding to grub-devel, but setting M-F-T and R-T to the bug,
Robert and myself.

On Wed, 25 Oct 2006 19:49:49 +0200, Robert Millan wrote:
> On Tue, Oct 24, 2006 at 11:21:05PM +0200, Luca Capello wrote:
>> > On Sat, Oct 14, 2006 at 09:36:57PM +0200, Robert Millan wrote:
>> [something already present in the bug report]
>> >> According to upstream (IRC), this behaviour is consistent with
>> >> GRUB2 having its own variable support (and namespace..).  So you
>> >> really need to use this new syntax (I'll take this into account
>> >> for my work on update-grub2).
>> >> 
>> >> Can we close this bug now?
>> 
>> While the original bug can be considered close, the boot panic
>> remains, as I explained in my first post:
>> On Sun, 01 Oct 2006 15:54:00 +0200, Luca Capello wrote:
>> > After a `grub-install /dev/hda` and a reboot, grub2 entered in a
>> > panic state at boot.  Hopefully, the panic is reproducible, even
>> > on qemu: create the following stanza (you can substitute $ with a
>> > second { ):
>> >
>> >     menuentry "test" { $ }
>> >
>
> That's because of syntax error.  Both $ and { are reserved
> characters and must be used consistently.

I agree on this, but apart from the boot panic the main problem is the
lack of documentation, either upstream (including the wiki) and in the
Debian package: nowhere $ and { are described as reserved characters.

Obviously, the bug can hit only a very limited subset of users, the
one that want to test grub2 with GNU/Hurd.

> AFAICT, upstream doesn't consider this a bug.  If you disagree, can
> you take this up with them?

I haven't receive any public answer from upstream and I cannot
understand why this won't be a bug: grub-install doesn't show any
error when installing such a config file, resulting in the boot panic,
which IMHO is a real problem.

I won't close this bug until a clear solution will be taken: this
could be a (big) warning somewhere about reserved characters
(primarily upstream, but specifically in the NEWS.Debian or
README.Debian could be OK, too) or a technical solution which will
avoid the boot panic.

Thx, bye,
Gismo / Luca

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-30  9:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20061002151012.GA31110@khazad.dyndns.org>
     [not found] ` <87wt7hhe2x.fsf@gismo.pca.it>
2006-10-03 11:48   ` grub2: menuentry stanza doesn't accept $ { } in variable substitutions Luca Capello
     [not found]   ` <8764ex20rb.fsf@gismo.pca.it>
     [not found]     ` <20061014193657.GA2927@khazad.dyndns.org>
     [not found]       ` <20061024132909.GA15375@khazad.dyndns.org>
2006-10-24 21:21         ` Bug#390473: " Luca Capello
     [not found]           ` <20061025174949.GD28301@khazad.dyndns.org>
2006-10-30  9:21             ` Luca Capello

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.