Bug#551462: grub-pc (.97~beta4-1 ): GRUB_DEFAULT="label" ignored

r ductor r.ductor at gmail.com
Sun Oct 18 12:01:10 UTC 2009


Package: grub-pc
Version:1.97~beta4-1
OS: Debian/unstable

Wish:
In the "Bash 2 guide" posted in ubuntu forums
http://ubuntuforums.org/showthread.php?t=1195275
the option of /etc/default/boot
GRUB_DEFAULT="menuentry-label"
is described in detail.
Apparently a patch for that already exists in ubuntu:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/431179

In my system the option
GRUB_DEFAULT="menuentry-label"
is ignored, see my built grub.cfg
Note that this is not a problem of spaces in the menu-entry name:
set default="Microsoft Windows XP Professionnel (on /dev/hda1)"
because I used  additional  \" in the /etc/default/grub file.

Having this option would be very useful for people that like me
share their pc with windows-addict persons that are unable to choose
an entry on the menu-list and need windows as default.
As a temporary patch of course I can set
GRUB_DEFAULT=4
but this will be destroyed at next kernel upgrade.
(In Grub Legacy i used the default=saved but this seems still absent
and more difficult to implement).

Thanks
Ric


===============================
fermi:~# aptitude show grub-pc
Package: grub-pc
State: installed
Automatically installed: no
Version: 1.97~beta4-1
Priority: extra
Section: admin
Maintainer: GRUB Maintainers <pkg-grub-devel at lists.alioth.debian.org>
Uncompressed Size: 1,753k
Architecture: i386
Compressed Size: 647k
Filename: pool/main/g/grub2/grub-pc_1.97~beta4-1_i386.deb
MD5sum: bd841137712ebd5a041e82a84a74b4c2
Archive: unstable, now
Depends: libc6 (>= 2.3), debconf (>= 0.5) | debconf-2.0, grub-common
(= 1.97~beta4-1), ucf
Suggests: desktop-base (>= 4.0.6), genisoimage
Conflicts: desktop-base (= 4.0.5), grub-coreboot, grub-efi-amd64,
grub-efi-ia32,
           grub-ieee1275, grub-legacy
Replaces: grub, grub-common (= 1.97~beta4-1), grub-coreboot,
grub-efi-amd64, grub-efi-ia32,
          grub-ieee1275, grub-legacy, grub2 (< 1.97~beta4-1)
Description: GRand Unified Bootloader, version 2 (PC/BIOS version)
 GRUB is a portable, powerful bootloader.  This version of GRUB is
based on a cleaner design
 than its predecessors, and provides the following new features:

 * Scripting in grub.cfg using BASH-like syntax.
 * Support for modern partition maps such as GPT.
 * Modular generation of grub.cfg via update-grub.  Packages providing
GRUB add-ons can plug
   in their own script rules and trigger updates by invoking
update-grub2.
 * VESA-based graphical mode with background image support and
complete 24-bit color set.
 * Support for extended charsets.  Users can write UTF-8 text to their
menu entries.

 This package contains a version of GRUB that has been built for use
with traditional PC/BIOS
 architecture.
Homepage: http://www.gnu.org/software/grub/grub-2.en.html

Package: grub-pc
State: not installed
Automatically installed: no
Version: 1.97~beta3-1
Priority: extra
Section: admin
Maintainer: GRUB Maintainers <pkg-grub-devel at lists.alioth.debian.org>
Uncompressed Size: 1,860k
Architecture: i386
Compressed Size: 695k
Filename: pool/main/g/grub2/grub-pc_1.97~beta3-1_i386.deb
MD5sum: 19f9ff6fadf6e74f578284a915610bd9
Archive: testing
Depends: libc6 (>= 2.3), debconf (>= 0.5) | debconf-2.0, grub-common
(= 1.97~beta3-1), ucf
Suggests: desktop-base (>= 4.0.6), genisoimage
Conflicts: desktop-base (= 4.0.5), grub-coreboot, grub-efi-amd64,
grub-efi-ia32,
           grub-ieee1275, grub-legacy
Replaces: grub, grub-common (= 1.97~beta3-1), grub-coreboot,
grub-efi-amd64, grub-efi-ia32,
          grub-ieee1275, grub-legacy, grub2 (< 1.97~beta3-1)
Description: GRand Unified Bootloader, version 2 (PC/BIOS version)
 GRUB is a portable, powerful bootloader.  This version of GRUB is
based on a cleaner design
 than its predecessors, and provides the following new features:

 * Scripting in grub.cfg using BASH-like syntax.
 * Support for modern partition maps such as GPT.
 * Modular generation of grub.cfg via update-grub.  Packages providing
GRUB add-ons can plug
   in their own script rules and trigger updates by invoking
update-grub2.
 * VESA-based graphical mode with background image support and
complete 24-bit color set.
 * Support for extended charsets.  Users can write UTF-8 text to their
menu entries.

 This package contains a version of GRUB that has been built for use
with traditional PC/BIOS
 architecture.
Homepage: http://www.gnu.org/software/grub/grub-2.en.html

Package: grub-pc
State: not installed
Automatically installed: no
Version: 1.96+20080724-16
Priority: extra
Section: admin
Maintainer: GRUB Maintainers <pkg-grub-devel at lists.alioth.debian.org>
Uncompressed Size: 3,990k
Architecture: i386
Compressed Size: 1,453k
Filename: pool/main/g/grub2/grub-pc_1.96+20080724-16_i386.deb
MD5sum: 6293802bd5ed3a93d3dcbbc54a1f97b2
Archive: stable
Depends: libc6 (>= 2.7-1), libncurses5 (>= 5.6+20071006-3), debconf
(>= 0.5) | debconf-2.0,
         grub-common (> 1.96+20080413-1), liblzo2-2 (>= 2.03)
Suggests: desktop-base (>= 4.0.6), os-prober
Conflicts: desktop-base (= 4.0.5), grub, pupa
Replaces: grub, grub-common (<= 1.96+20080413-1), grub2 (<
1.96+20080724-16), pupa
Provides: grub
Description: GRand Unified Bootloader, version 2 (PC/BIOS version)
 GRUB is a portable, powerful bootloader.  This version of GRUB is
based on a cleaner design
 than its predecessors, and provides the following new features:

 * Scripting in grub.cfg using BASH-like syntax.
 * Support for modern partition maps such as GPT.
 * Modular generation of grub.cfg via update-grub.  Packages providing
GRUB add-ons can plug
   in their own script rules and trigger updates by invoking
update-grub2.
 * VESA-based graphical mode with background image support and
complete 24-bit color set.
 * Support for extended charsets.  Users can write UTF-8 text to their
menu entries.

 This package contains a version of GRUB that has been built for use
with traditional PC/BIOS
 architecture.
Homepage: http://www.gnu.org/software/grub/grub-2.en.html

==============================================================
fermi:~# cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
set default="Microsoft Windows XP Professionnel (on /dev/hda1)"
if terminal_input console ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_input
  terminal console
fi
if terminal_output console ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_output
  terminal console
fi
set timeout=10
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, Linux 2.6.30-2-486" {
        insmod ext2
        set root=(hd1,1)
        search --no-floppy --fs-uuid --set 1d466c65-ca8d-4534-a110-e17c470676bb
        linux   /vmlinuz-2.6.30-2-486
root=UUID=22cf65b7-ff9a-4728-b4b5-3e822d019398 ro
        initrd  /initrd.img-2.6.30-2-486
}
menuentry "Debian GNU/Linux, Linux 2.6.30-2-486 (recovery mode)" {
        insmod ext2
        set root=(hd1,1)
        search --no-floppy --fs-uuid --set
1d466c65-ca8d-4534-a110-e17c470676bb
        linux   /vmlinuz-2.6.30-2-486
root=UUID=22cf65b7-ff9a-4728-b4b5-3e822d019398 ro single
        initrd  /initrd.img-2.6.30-2-486
}
menuentry "Debian GNU/Linux, Linux 2.6.30-1-486" {
        insmod ext2
        set root=(hd1,1)
        search --no-floppy --fs-uuid --set
1d466c65-ca8d-4534-a110-e17c470676bb
        linux   /vmlinuz-2.6.30-1-486
root=UUID=22cf65b7-ff9a-4728-b4b5-3e822d019398 ro
        initrd  /initrd.img-2.6.30-1-486
}
menuentry "Debian GNU/Linux, Linux 2.6.30-1-486 (recovery mode)" {
        insmod ext2
        set root=(hd1,1)
        search --no-floppy --fs-uuid --set 1d466c65-ca8d-4534-a110-e17c470676bb
        linux   /vmlinuz-2.6.30-1-486
root=UUID=22cf65b7-ff9a-4728-b4b5-3e822d019398 ro single
        initrd  /initrd.img-2.6.30-1-486
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professionnel (on /dev/hda1)" {
        insmod ntfs
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set 00e05658e056544e
        drivemap -s (hd0) ${root}
        chainloader +1
}
menuentry "Windows NT/2000/XP (on /dev/hda2)" {
        insmod fat
        set root=(hd0,2)
        search --no-floppy --fs-uuid --set 4116-9dd1
        drivemap -s (hd0) ${root}
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
fermi:~#

=================================
fermi:~# cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT="\"Microsoft Windows XP Professionnel (on /dev/hda1)\""
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"
fermi:~#





More information about the Pkg-grub-devel mailing list