Bug#959537: grub-common: Resume from hibernate with systemd does not unset recordfail

Calum Lind calumlind at gmail.com
Sun May 3 13:48:35 BST 2020


Package: grub-common
Version: 2.04-1ubuntu12.2
Severity: normal

Dear Maintainer,

   * What led up to the situation?
     Hibernate laptop
   * What was the outcome of this action?
     Turning on laptop after hibernate the grub menu is displayed for 30
seconds, as if there was a failed boot.
   * What outcome did you expect instead?
     The grub menu does not show

The issue relates to the switch to systemd and the pm-sleep script needs
copying or moving to systemd system-sleep.

https://salsa.debian.org/grub-
team/grub/-/commit/a2dac38edcc6236bfdbefad4e9654b498843504c#b2bed7ddf92f569c404a03431b7906ac99900bfa

An example script /lib/systemd/system-sleep/10_grub-common:

#!/bin/sh

# Tell grub that resume was successful

case $1 in
        post)
                grub-editenv - unset recordfail
                ;;
esac

Related bug reports:
https://bugs.launchpad.net/grub/+bug/1475620
https://askubuntu.com/q/967816/8570




-- Package-specific info:

*********************** BEGIN /proc/mounts
/dev/nvme0n1p5 / ext4 rw,relatime,errors=remount-ro 0 0
/dev/loop2 /snap/gnome-3-34-1804/27 squashfs ro,nodev,relatime 0 0
/dev/loop3 /snap/darktable/48 squashfs ro,nodev,relatime 0 0
/dev/loop1 /snap/pdftk/9 squashfs ro,nodev,relatime 0 0
/dev/loop4 /snap/gnome-system-monitor/135 squashfs ro,nodev,relatime 0 0
/dev/loop5 /snap/gnome-logs/81 squashfs ro,nodev,relatime 0 0
/dev/loop6 /snap/core18/1705 squashfs ro,nodev,relatime 0 0
/dev/loop0 /snap/gnome-system-monitor/127 squashfs ro,nodev,relatime 0 0
/dev/loop7 /snap/slack/22 squashfs ro,nodev,relatime 0 0
/dev/loop8 /snap/darktable/54 squashfs ro,nodev,relatime 0 0
/dev/loop10 /snap/gnome-characters/399 squashfs ro,nodev,relatime 0 0
/dev/loop12 /snap/gnome-3-26-1604/97 squashfs ro,nodev,relatime 0 0
/dev/loop11 /snap/gnome-characters/495 squashfs ro,nodev,relatime 0 0
/dev/loop14 /snap/core/9066 squashfs ro,nodev,relatime 0 0
/dev/loop13 /snap/gnome-3-26-1604/98 squashfs ro,nodev,relatime 0 0
/dev/loop15 /snap/kubectl/1486 squashfs ro,nodev,relatime 0 0
/dev/loop16 /snap/gnome-3-28-1804/110 squashfs ro,nodev,relatime 0 0
/dev/loop19 /snap/pdftk/1 squashfs ro,nodev,relatime 0 0
/dev/loop20 /snap/gtk-common-themes/1506 squashfs ro,nodev,relatime 0 0
/dev/loop18 /snap/kubectl/1506 squashfs ro,nodev,relatime 0 0
/dev/loop21 /snap/canonical-livepatch/94 squashfs ro,nodev,relatime 0 0
/dev/loop23 /snap/gnome-calculator/730 squashfs ro,nodev,relatime 0 0
/dev/loop24 /snap/slack/23 squashfs ro,nodev,relatime 0 0
/dev/loop22 /snap/gtk-common-themes/1502 squashfs ro,nodev,relatime 0 0
/dev/loop25 /snap/gnome-3-28-1804/116 squashfs ro,nodev,relatime 0 0
/dev/loop26 /snap/gnome-calculator/704 squashfs ro,nodev,relatime 0 0
/dev/loop27 /snap/canonical-livepatch/95 squashfs ro,nodev,relatime 0 0
/dev/loop29 /snap/core/8935 squashfs ro,nodev,relatime 0 0
/dev/loop30 /snap/gnome-logs/93 squashfs ro,nodev,relatime 0 0
/dev/nvme0n1p1 /boot/efi vfat rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/fuse /run/user/1000/doc fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/mmcblk0p1 /media/calum/0CB7-9424 vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0
/dev/loop31 /snap/heroku/3883 squashfs ro,nodev,relatime 0 0
/dev/loop17 /snap/core18/1754 squashfs ro,nodev,relatime 0 0
/dev/loop9 /snap/heroku/3887 squashfs ro,nodev,relatime 0 0
*********************** END /proc/mounts

*********************** BEGIN /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${initrdfail}" = 2 ]; then
   set initrdfail=
elif [ "${initrdfail}" = 1 ]; then
   set next_entry="${prev_entry}"
   set prev_entry=
   save_env prev_entry
   if [ "${next_entry}" ]; then
      set initrdfail=2
   fi
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function initrdfail {
    if [ -n "${have_grubenv}" ]; then if [ -n "${partuuid}" ]; then
      if [ -z "${initrdfail}" ]; then
        set initrdfail=1
        if [ -n "${boot_once}" ]; then
          set prev_entry="${default}"
          save_env prev_entry
        fi
      fi
      save_env initrdfail
    fi; fi
}
function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  4f03289b-2cac-4bfb-bc59-47e041629a44
else
  search --no-floppy --fs-uuid --set=root 4f03289b-2cac-4bfb-bc59-47e041629a44
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_GB
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=hidden
    set timeout=0
  # Fallback hidden-timeout code in case the timeout_style feature is
  # unavailable.
  elif sleep --interruptible 0 ; then
    set timeout=0
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
# previously #2c001e 44,0,30,0
# now yaru #4f194c 79,25,76
if background_color 79,25,76,0; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4f03289b-2cac-4bfb-bc59-47e041629a44' {
	recordfail
	load_video
	gfxmode $linux_gfx_mode
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  4f03289b-2cac-4bfb-bc59-47e041629a44
	else
	  search --no-floppy --fs-uuid --set=root 4f03289b-2cac-4bfb-bc59-47e041629a44
	fi
	linux	/boot/vmlinuz-5.3.0-51-generic root=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 ro  quiet splash resume=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 resume_offset=757760 $vt_handoff
	initrd	/boot/initrd.img-5.3.0-51-generic
}
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-4f03289b-2cac-4bfb-bc59-47e041629a44' {
	menuentry 'Ubuntu, with Linux 5.3.0-51-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-51-generic-advanced-4f03289b-2cac-4bfb-bc59-47e041629a44' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4f03289b-2cac-4bfb-bc59-47e041629a44
		else
		  search --no-floppy --fs-uuid --set=root 4f03289b-2cac-4bfb-bc59-47e041629a44
		fi
		echo	'Loading Linux 5.3.0-51-generic ...'
		linux	/boot/vmlinuz-5.3.0-51-generic root=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 ro  quiet splash resume=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 resume_offset=757760 $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.3.0-51-generic
	}
	menuentry 'Ubuntu, with Linux 5.3.0-51-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-51-generic-recovery-4f03289b-2cac-4bfb-bc59-47e041629a44' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4f03289b-2cac-4bfb-bc59-47e041629a44
		else
		  search --no-floppy --fs-uuid --set=root 4f03289b-2cac-4bfb-bc59-47e041629a44
		fi
		echo	'Loading Linux 5.3.0-51-generic ...'
		linux	/boot/vmlinuz-5.3.0-51-generic root=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.3.0-51-generic
	}
	menuentry 'Ubuntu, with Linux 5.3.0-48-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-48-generic-advanced-4f03289b-2cac-4bfb-bc59-47e041629a44' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4f03289b-2cac-4bfb-bc59-47e041629a44
		else
		  search --no-floppy --fs-uuid --set=root 4f03289b-2cac-4bfb-bc59-47e041629a44
		fi
		echo	'Loading Linux 5.3.0-48-generic ...'
		linux	/boot/vmlinuz-5.3.0-48-generic root=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 ro  quiet splash resume=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 resume_offset=757760 $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.3.0-48-generic
	}
	menuentry 'Ubuntu, with Linux 5.3.0-48-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.3.0-48-generic-recovery-4f03289b-2cac-4bfb-bc59-47e041629a44' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4f03289b-2cac-4bfb-bc59-47e041629a44
		else
		  search --no-floppy --fs-uuid --set=root 4f03289b-2cac-4bfb-bc59-47e041629a44
		fi
		echo	'Loading Linux 5.3.0-48-generic ...'
		linux	/boot/vmlinuz-5.3.0-48-generic root=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-5.3.0-48-generic
	}
	menuentry 'Ubuntu, with Linux 4.15.0-30-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-30-generic-advanced-4f03289b-2cac-4bfb-bc59-47e041629a44' {
		recordfail
		load_video
		gfxmode $linux_gfx_mode
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4f03289b-2cac-4bfb-bc59-47e041629a44
		else
		  search --no-floppy --fs-uuid --set=root 4f03289b-2cac-4bfb-bc59-47e041629a44
		fi
		echo	'Loading Linux 4.15.0-30-generic ...'
		linux	/boot/vmlinuz-4.15.0-30-generic root=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 ro  quiet splash resume=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 resume_offset=757760 $vt_handoff
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.15.0-30-generic
	}
	menuentry 'Ubuntu, with Linux 4.15.0-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-30-generic-recovery-4f03289b-2cac-4bfb-bc59-47e041629a44' {
		recordfail
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root  4f03289b-2cac-4bfb-bc59-47e041629a44
		else
		  search --no-floppy --fs-uuid --set=root 4f03289b-2cac-4bfb-bc59-47e041629a44
		fi
		echo	'Loading Linux 4.15.0-30-generic ...'
		linux	/boot/vmlinuz-4.15.0-30-generic root=UUID=4f03289b-2cac-4bfb-bc59-47e041629a44 ro recovery nomodeset 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initrd.img-4.15.0-30-generic
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_linux_zfs ###
### END /etc/grub.d/10_linux_zfs ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-6CA8-978C' {
	insmod part_gpt
	insmod fat
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root  6CA8-978C
	else
	  search --no-floppy --fs-uuid --set=root 6CA8-978C
	fi
	chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'System setup' $menuentry_id_option 'uefi-firmware' {
	fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
*********************** END /boot/grub/grub.cfg

*********************** BEGIN /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
unused devices: <none>
*********************** END /proc/mdstat

*********************** BEGIN /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 13 Apr 27 11:24 mmc-SA32G_0x26c0fa29 -> ../../mmcblk0
lrwxrwxrwx 1 root root 15 Apr 27 11:24 mmc-SA32G_0x26c0fa29-part1 -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 13 Apr 27 11:24 nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA1J851356 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA1J851356-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA1J851356-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA1J851356-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA1J851356-part4 -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA1J851356-part5 -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 13 Apr 27 11:24 nvme-eui.002538b87102d707 -> ../../nvme0n1
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-eui.002538b87102d707-part1 -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-eui.002538b87102d707-part2 -> ../../nvme0n1p2
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-eui.002538b87102d707-part3 -> ../../nvme0n1p3
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-eui.002538b87102d707-part4 -> ../../nvme0n1p4
lrwxrwxrwx 1 root root 15 Apr 27 11:24 nvme-eui.002538b87102d707-part5 -> ../../nvme0n1p5
*********************** END /dev/disk/by-id

*********************** BEGIN /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 15 Apr 27 11:24 0CB7-9424 -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 15 Apr 27 11:24 4f03289b-2cac-4bfb-bc59-47e041629a44 -> ../../nvme0n1p5
lrwxrwxrwx 1 root root 15 Apr 27 11:24 6CA8-978C -> ../../nvme0n1p1
lrwxrwxrwx 1 root root 15 Apr 27 11:24 AA0EABBE0EAB81C5 -> ../../nvme0n1p4
*********************** END /dev/disk/by-uuid

-- System Information:
Debian Release: buster/sid
  APT prefers eoan-updates
  APT policy: (500, 'eoan-updates'), (500, 'eoan-security'), (500, 'eoan-proposed'), (500, 'eoan'), (100, 'eoan-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.3.0-48-generic (SMP w/4 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages grub-common depends on:
ii  gettext-base        0.19.8.1-9
ii  libc6               2.30-0ubuntu2.1
ii  libdevmapper1.02.1  2:1.02.155-2ubuntu6.1
ii  libefiboot1         37-2ubuntu2
ii  libefivar1          37-2ubuntu2
ii  libfreetype6        2.9.1-4
ii  libfuse2            2.9.9-1ubuntu1
ii  liblzma5            5.2.4-1
ii  lsb-base            11.0.1ubuntu1

Versions of packages grub-common recommends:
ii  os-prober  1.74ubuntu2

Versions of packages grub-common suggests:
ii  console-setup  1.191ubuntu3
pn  desktop-base   <none>
pn  grub-emu       <none>
pn  multiboot-doc  <none>
pn  xorriso        <none>

-- Configuration Files:
/etc/grub.d/30_os-prober changed [not included]

-- no debconf information



More information about the Pkg-grub-devel mailing list