[Karmic] grub2 - GRUB_DEFAULT="label" is ignored

Bug #431179 reported by Neil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Undecided
Colin Watson

Bug Description

Binary package hint: grub2

After speaking to cjwatson tonight, I attempted to set GRUB_DEFAULT (in /etc/default/grub ) to point to a label. Upon reboot, grub2 seemed to ignore the label and still just prepare to boot into the top entry on the list.

Versions:
~$ dpkg -l | grep grub
ii grub-common 1.97~beta3-1ubuntu4 GRand Unified Bootloader, version 2 (common
ii grub-pc 1.97~beta3-1ubuntu4 GRand Unified Bootloader, version 2 (PC/BIOS

This is a fresh install, just done tonight.

Related branches

Revision history for this message
Neil (kngspook) wrote :

Attaching the /etc/default/grub .

Revision history for this message
Neil (kngspook) wrote :

Attaching the /boot/grub/grub.cfg .

description: updated
Revision history for this message
Felix Zielcke (fzielcke) wrote : Re: [Bug 431179] [NEW] [Karmic] grub2 - GRUB_DEFAULT="label" is ignored

Am Donnerstag, den 17.09.2009, 05:36 +0000 schrieb Neil:
> Public bug reported:
>
> Binary package hint: grub2
>
> After speaking to cjwatson tonight, I attempted to set GRUB_DEFAULT (in
> /etc/default/grub ) to point to a label. Upon reboot, grub2 seemed to
> ignore the label and still just prepare to boot into the top entry on
> the list.
>

I don't know why Colin told you to use a label or if you misunderstood
him, but this isn't supported.
Menu entry names don't need to be unique so in practise it wouldn't work
well.
Only plain numerics as in grub-legacy is supported for the default
value.

--
Felix Zielcke
Proud Debian Maintainer

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 431179] [NEW] [Karmic] grub2 - GRUB_DEFAULT="label" is ignored

On Thu, Sep 17, 2009 at 08:38:41AM -0000, Felix Zielcke wrote:
> I don't know why Colin told you to use a label or if you misunderstood
> him, but this isn't supported.

Could you please try not to confuse my bug reporters? ;-) This is
supposed to be supported by my savedefault patch. I'll debug it when I
have a moment.

> Menu entry names don't need to be unique so in practise it wouldn't work
> well.

In practice savedefault works really badly unless this is added, because
menu item numbers often change as new kernels are added. The occasional
problem with non-uniqueness is just a price we have to pay, and not all
that confusing in practice I think.

Revision history for this message
Felix Zielcke (fzielcke) wrote : Re: [Bug 431179] [NEW] [Karmic] grub2 - GRUB_DEFAULT="label" is ignored

Am Donnerstag, den 17.09.2009, 12:08 +0000 schrieb Colin Watson:
> On Thu, Sep 17, 2009 at 08:38:41AM -0000, Felix Zielcke wrote:
> > I don't know why Colin told you to use a label or if you misunderstood
> > him, but this isn't supported.
>
> Could you please try not to confuse my bug reporters? ;-) This is
> supposed to be supported by my savedefault patch. I'll debug it when I
> have a moment.
>

Ok sorry, hadn't looked in detail at the Ubuntu patches.
Anyway the problem is missing quotes in the generated grub.cfg:

set default=Microsoft Windows XP Professional (on /dev/sda1)

As a short solution you could try
GRUB_DEFAULT="\"Microsoft Windows XP Professional (on /dev/sda1)\""
in /etc/default/grub

--
Felix Zielcke
Proud Debian Maintainer

Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 431179] [NEW] [Karmic] grub2 - GRUB_DEFAULT="label" is ignored

Thanks, good catch - I'll fix this properly in the next Ubuntu grub2
upload, and include it in the savedefault patch slated to go upstream
after 1.97.

Colin Watson (cjwatson)
Changed in grub2 (Ubuntu):
status: New → Fix Committed
assignee: nobody → Colin Watson (cjwatson)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub2 - 1.97~beta3-1ubuntu5

---------------
grub2 (1.97~beta3-1ubuntu5) karmic; urgency=low

  * debian/patches/957_savedefault.diff: Quote the value assigned to
    'default', in case it contains spaces (LP: #431179).
  * debian/patches/964_os-prober_errors.diff: Don't throw away errors from
    os-prober; it makes things hard to debug.

 -- Colin Watson <email address hidden> Fri, 18 Sep 2009 18:47:06 +0100

Changed in grub2 (Ubuntu):
status: Fix Committed → Fix Released
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.