[Bug 1929860] Re: initrdfail can result in resuming with different initrd images and hanging resume

Launchpad Bug Tracker 1929860 at bugs.launchpad.net
Tue Jul 20 17:54:35 UTC 2021


This bug was fixed in the package grub2 - 2.04-1ubuntu46

---------------
grub2 (2.04-1ubuntu46) impish; urgency=medium

  * debian/grub-common.service: change type to oneshot, add wantedby
    sleep.target, after sleep.target. The service will now start after
    resume from hybernation. LP: #1929860
  * grub-initrd-fallback.service: add wantedby sleep.target, after
    sleep.target. The service will now start after resume from
    hybernation. LP: #1929860
  * cherrypick upstream fix to make armhf efi boot work. LP: #1788940
  * debian/rules: disable LTO. LP: #1922005
  * grub-initrd-fallback.service, debian/grub-common.service: only start
    units when booted with grub. Use presence of /boot/grub/grub.cfg as
    proxy. LP: #1925507
  * tests: patch qemu command to use ide-hd instead of the removed
    ide-drive.

 -- Dimitri John Ledkov <dimitri.ledkov at canonical.com>  Fri, 16 Jul 2021
14:01:31 +0100

** Changed in: grub2 (Ubuntu)
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1929860

Title:
  initrdfail can result in resuming with different initrd images and
  hanging resume

Status in grub2 package in Ubuntu:
  Fix Released

Bug description:
  Ubuntu Focal (and new releases) on AWS will normally boot without an
  initrd image (just the microcode.cpio). There is a fallback mechanism
  to reboot with the full initrd image when the boot fails to complete.
  The grub environment variable "initrdfail" is used to track when a
  boot failed and switch between the optimized initrd-less boot path and
  the full initrd path.

  On a normal successful boot, the "initrdfail" variable is cleared by
  grub-initrd-fallback.service. However, this doesn't happen when
  resuming from hibernation. As a result, the initrd fallback will get
  triggered on the second hibernation / resume cycle despite the
  original boot using only the microcode.cpio. This switch in initrd
  images leads to the second resume hanging.

  We've been able to successfully avoid this issue by adding the
  following to the ec2-hibinit-agent resume handler:

  /usr/bin/grub-editenv - unset initrdfail
  /usr/bin/grub-editenv - unset recordfail

  (Note: clearing recordfail may not be necessary, will need to try
  again without it.)

  This bug was filed against grub2 as it appears to own initrdfail.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1929860/+subscriptions




More information about the foundations-bugs mailing list