grub cannot read /boot/grub/grubenv

Bug #573588 reported by Torsten Meyer
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: grub2

Description: Ubuntu 10.04 LTS
1.98-1ubuntu5
The last in /boot/grub/grubenv saved menuentry is not read by grub. It semms to me, that the env $prefix is'nt set at boottime, so that $prefixx/grubenv cannot be found. Changing the line to
if [ -s /boot/grub/grubenv ]; then
  load_env
fi
solves the problem. I've changed the corresponding line in /etc/grub.d/00_header, and everything works as expected.
diff -c 00_header.*
*** 00_header.new 2010-05-02 10:46:59.000000000 +0200
--- 00_header.old 2010-05-02 10:46:05.000000000 +0200
***************
*** 39,45 ****
  if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi

  cat << EOF
! if [ -s /boot/grub/grubenv ]; then
    load_env
  fi
  set default="${GRUB_DEFAULT}"
--- 39,45 ----
  if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi

  cat << EOF
! if [ -s \$prefix/grubenv ]; then
    load_env
  fi
  set default="${GRUB_DEFAULT}"

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: grub-common 1.98-1ubuntu5
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic i686
Architecture: i386
Date: Sun May 2 12:24:55 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
 LANG=de_DE.utf8
 SHELL=/bin/bash
SourcePackage: grub2

Revision history for this message
Torsten Meyer (torsten-w-meyer) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote :

Your patch is entirely correct, but the thing is that it had already been applied in the version you quoted! See bug 478035.

I think what must have happened is that you had some other local change to that file and perhaps didn't notice dpkg's conffile prompt, or didn't merge that particular change. Since you have it fixed now, and I know it's fixed in the package, I'm just going to close the bug. Thanks anyway.

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