grub-reboot does not select kernel

Bug #1102925 reported by Brian Candler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Medium
Colin Watson

Bug Description

[Ubuntu 12.04.1 LTS server x86_64]

If I do

[code]
# vi /etc/default/grub
GRUB_DEFAULT="2>20"
# update-grub
[/code]

then I can select the default kernel to be used on next reboot.

However I believe it should be possible to do this in a one-shot way with grub-reboot, and this doesn't work.

[code]
# grub-reboot "2>20"
# cat /boot/grub/grubenv
# GRUB Environment Block
saved_entry=2>20
prev_saved_entry=0
################################
...
# reboot
[/code]

At reboot I just get the default kernel selected.

It doesn't appear to be anything to do with submenus[*] because "grub-reboot 1" doesn't even select the recovery option from the main menu.

[*] http://ubuntuforums.org/showthread.php?p=10720316

Related branches

Revision history for this message
Brian Candler (b-candler) wrote :

Having found
http://ubuntuforums.org/showthread.php?t=1428427
it looks like the pre-requisite is to configure

GRUB_DEFAULT=saved

There is a comment at the top of /etc/default/grub which refers the reader to info -f grub -n 'Simple configuration' where this is documented.

However it is not mentioned in the manpages of grub-reboot, grub-set-default or grub-editenv; I think it would be useful if it were.

Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks for your report. I've committed a change upstream for 2.01 to document this:

2013-01-22 Colin Watson <email address hidden>

        * util/grub-reboot.in (usage): Document the need for
        GRUB_DEFAULT=saved.
        * util/grub-set-default.in (usage): Likewise.
        Reported by: Brian Candler. Fixes Ubuntu bug #1102925.

Changed in grub2 (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 2.02~beta2-5

---------------
grub2 (2.02~beta2-5) experimental; urgency=medium

  * Add a number of EFI debugging commands to the signed image (lsefi,
    lsefimmap, lsefisystab, lssal).
  * Add gfxterm_background to the signed image so that background_image
    works in UEFI Secure Boot mode. Thanks to syscon-hh for the report.

 -- Colin Watson <email address hidden> Mon, 27 Jan 2014 10:03:00 +0000

Changed in grub2 (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers