[Bug 913336] Re: grub-common recreates /etc/grub/grubenv

Richard Laager rlaager at wiktel.com
Sun Feb 5 01:21:17 UTC 2012

I've attached "zfs-ubuntu-disable-recordfail.patch".

This supersedes my previous patches and takes a different approach. It
disables the recordfail feature for filesystems to which GRUB cannot
write (btrfs, zfs, etc.).

The changes from this patch are on top of (and should be folded into)
debian/patches/ubuntu_failed_boot_menu.patch in the existing Ubuntu

This approach has the following benefits:
* On btrfs (and zfs, etc.), we don't show an error (and add delay) on every boot.
* We allow for the use of any and all features where GRUB only needs to *read* grubenv at boot.
* If the admin enables a different feature that uses save_env, it fails with an error rather than silently.

** Patch added: "zfs-ubuntu-disable-recordfail.patch"

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.

  grub-common recreates /etc/grub/grubenv

Status in “grub2” package in Ubuntu:

Bug description:
  /etc/init.d/grub-common and /etc/pm/sleep.d/10_grub-common call grub-
  editenv to clear the recordfail setting to indicate that the system
  booted or awoke successfully. They call grub-editenv, which creates
  the grubenv file if it doesn't exist.

  If the admin has deleted the grubenv file intentionally because they
  don't want grub writing to the filesystem, this behavior is annoying.
  If the admin has deleted the file because grub does not have write
  support for the root filesystem, then this behavior breaks booting;
  someone has to hit a key on the console for the machine to boot.

  The attached patch fixes this. However, I'm not sure what is supposed
  to create /boot/grub/grubenv originally. If it's the init script, then
  some further changes will be required.

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list