grub2 does not propagate variable to submenu

Bug #1175127 reported by martin suchanek
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Problem:

grub2 does not propagate variables to submenu -> menuentry. My defined variables defined in 40_custom and properly generated into grub.cfg after update-grub are not set up in submenu. Variables have content only on menuentry level but not in submenu. According to manual the content of variables should be propagated into submenu as well.
   set variable=something #or/and
   export variable=something
Does not work even if they are settled on the beginning of the grub.cfg
some of the variables defined in

How to reproduce problem:
just put some set variable=something in 40_custom , echo variable=$variable in submenu -> menuentry , update-grub and reboot. (I did not try grub-emu)

apt-cache policy grub2
grub2:
  Installed: 2.00-13ubuntu3
  Candidate: 2.00-13ubuntu3
  Version table:
 *** 2.00-13ubuntu3 0
        500 http://localhost/ubuntu/ raring/universe amd64 Packages
        500 http://uk.archive.ubuntu.com/ubuntu/ raring/universe amd64 Packages

Description: Ubuntu 13.04
Release: 13.04
Codename: raring

Kind Regards,
M.

Revision history for this message
Andreas Heinlein (aheinlein) wrote :

As you can see from the discussion here:

https://lists.gnu.org/archive/html/grub-devel/2012-03/msg00050.html

this is currently by design. A submenu opens a new 'context' in grub terms, and when you exit the context (go back to the main menu), everything within the submenu context is lost. I personally do not like this, too.

If you really need this functionality, someone has posted a patch in the above thread. I don't know if it works, but you could give it a try.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

This release of Ubuntu is no longer receiving maintenance updates. If this is still an issue on a maintained version of Ubuntu please let us know.

Changed in grub2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.