Yes, this was an overlooked mismerge from Debian which dropped this
special casing from the 'init' implementation, but is still needed in
Ubuntu because our resume implementation diverges from Debian's.

This fix has been uploaded to the queue and should be accepted after the
20.04 beta freeze ends.

** Changed in: initramfs-tools (Ubuntu)
       Status: New => In Progress

** Changed in: initramfs-tools (Ubuntu)
     Assignee: (unassigned) => Steve Langasek (vorlon)

** Changed in: initramfs-tools (Ubuntu)
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-azure in Ubuntu.
https://bugs.launchpad.net/bugs/1869996

Title:
  Hibernation can NOT work due to incorrect RESUME=

Status in initramfs-tools package in Ubuntu:
  Fix Committed
Status in linux-azure package in Ubuntu:
  New

Bug description:
  In Ubuntu 18.04 I have the below 4 lines, but in Ubuntu 20.04 (dev
  build) these lines are missing:

  --- /usr/share/initramfs-tools/init        2020-04-01 01:15:20.533208700 +0000
  +++ /usr/share/initramfs-tools/init     2020-04-01 00:59:43.931655200 +0000
  @@ -163,6 +163,10 @@
                  ;;
          resume=*)
                  RESUME="${x#resume=}"
  +               case $RESUME in
  +               UUID=*)
  +                        RESUME="/dev/disk/by-uuid/${RESUME#UUID=}"
  +               esac
                  ;;
          resume_offset=*)
                  resume_offset="${x#resume_offset=}"

  As a result, hibernation can not work: the saved state in the swap
  partition is lost and no resume happens.

  The issue is: when I use the "resume=UUID=533b2cd9-31ac-449b-82ff-
  014f09ab0a9c" kernel parameter for hibernation, due to the missing
  lines, the variable 'resume' in a later place in "/usr/share
  /initramfs-tools/init" is set to "UUID=533b2cd9-31ac-449b-82ff-
  014f09ab0a9c" rather than "/dev/disk/by-uuid/533b2cd9-31ac-449b-82ff-
  014f09ab0a9c". Next, in /usr/share/initramfs-tools/scripts/local-
  premount/resume:

  DEV=$(readlink "$resume")
  DEV=/sys/class/block/${DEV##*/}/dev
  if [ -r "$DEV" ]; then
          read -r MAJMIN < "$DEV"
  fi
  if [ -z "$MAJMIN" ]; then
          exit 1
  fi

  Here the 'readlink' will fail, so $DEV is not pointing to a valid device, and 
then $MAJMIN is empty and
  we "exit 1", so no resume can happen!

  
  Not sure why the 4 lines are removed in Ubuntu 20.04...

  
  PS, this is my version info:

  root@localhost:~# dpkg-query -s initramfs-tools-core
  Package: initramfs-tools-core
  Status: install ok installed
  Priority: optional
  Section: utils
  Installed-Size: 271
  Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
  Architecture: all
  Multi-Arch: foreign
  Source: initramfs-tools
  Version: 0.136ubuntu1
  Replaces: initramfs-tools (<< 0.121~)
  Depends: busybox-initramfs (>= 1:1.30.1-4ubuntu5~), initramfs-tools-bin (= 
0.136ubuntu1), klibc-utils (>= 2.0.4-8~), cpio (>= 2.12), lz4, kmod, udev, 
coreutils (>= 8.24), logsave | e2fsprogs (<< 1.45.3-1~)
  Suggests: bash-completion
  Breaks: busybox-initramfs (<< 1:1.30.1-4ubuntu5~), initramfs-tools (<< 0.121~)
  Conffiles:
   /etc/initramfs-tools/initramfs.conf 4ec999d424d01b9ca685e65ba0f22a13
  Description: generic modular initramfs generator (core tools)
   This package contains the mkinitramfs program that can be used to
   create a bootable initramfs for a Linux kernel.  The initramfs should
   be loaded along with the kernel and is then responsible for mounting
   the root filesystem and starting the main init system.
  Original-Maintainer: Debian kernel team <debian-ker...@lists.debian.org>

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1869996/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to