Bug#706561: grub2: removes EFI boot entry 'debian' every time grub-install is used

Jonathan Wiltshire jmw at tiger-computing.co.uk
Wed May 1 16:30:46 UTC 2013


Source: grub2
Version: 1.99-27
Severity: important
Tags: d-i

grub-install removes and then re-instates the 'debian' boot entry every
time it runs. If it can't be re-instated, no indication is given to the user
that the system will no longer boot.

This was revealed on my 
  	Manufacturer: ASRock
	Product Name: H61M-ITX
when I installed an updated grub package, and it updated the bootloader. It
seems part of the EFI storage was too full, and since garbage collection does
not take place until boot time, a boot entry could not be added. (It's also
possible that storage was not full, and this is really a firmware bug.)

In this situation grub-install still emits "Installation finished. No error
reported" and exits 0. This is misleading.

For my particular machine, just one invocation of grub-install was enough to
trigger this bug.

Recovering involves booting from a Wheezy install CD (which also triggers EFI
garbage collection), loading the efivars module, and running grub-install
followed by a reboot. 

This has implications for stable updates of grub during the lifetime of
Wheezy.

If grub-install detects that there is no need to remove and re-instate the
boot entry, it should not do so. If there is a need, and it fails for any
reason, the script should warn the user very loudly indeed and exit non-0.



-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



More information about the Pkg-grub-devel mailing list