[Bug 1769297] [NEW] resume from hibernation broken when resume image is autodetected
Dmitriy Geels
1769297 at bugs.launchpad.net
Sat May 5 04:55:57 UTC 2018
Public bug reported:
I found a reason of non-functioning resume from hibernation when resume
partition/file is autodetected by intiramfs hook /usr/share/initramfs-
tools/hooks/resume.
Here is the scenario:
1) hook /usr/share/initramfs-tools/hooks/resume creates config conf/conf.d/zz-resume-auto saved in initrd image, containing one variable: RESUME=UUID=106238b0-707d-4422-866d-a7534da50702 in my case
2) during boot init script sets 'resume' variable to 'RESUME' value from
conf/conf.d/zz-resume-auto, then it executes local-premount scripts
including local-premount/resume
3) resuming script local-premount/resume (/usr/share/initramfs-tools/scripts/local-premount/resume) tries to get resume device major-minor numbers by these lines:
DEV=$(readlink ${resume})
DEV=/sys/class/block/${DEV##*/}/dev
if [ -r "$DEV" ]; then
read MAJMIN < "$DEV"
fi
4) next check fails and resume process silently aborts:
if [ -z "$MAJMIN" ]; then
exit 1
fi
Resuming script fails to get device major-minor because
resume=UUID=106238b0-707d-4422-866d-a7534da50702 -- it's not resolved
into device path in init script.
Commonly mentioned workaround is to explicitly specify kernel parameter
resume=UUID=106238b0-707d-4422-866d-a7534da50702 -- only in this case
init script resolves it to device path.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: initramfs-tools 0.130ubuntu3
Uname: Linux 4.16.6-041606-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat May 5 11:32:31 2018
InstallationDate: Installed on 2018-03-27 (38 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180327)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: initramfs-tools (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug bionic
** Description changed:
I found a reason of non-functioning resume from hibernation when resume
partition/file is autodetected by intiramfs hook /usr/share/initramfs-
tools/hooks/resume.
Here is the scenario:
1) hook /usr/share/initramfs-tools/hooks/resume creates config conf/conf.d/zz-resume-auto saved in initrd image, containing one variable: RESUME=UUID=106238b0-707d-4422-866d-a7534da50702 in my case
- 2) when resuming script local-premount/resume (/usr/share/initramfs-tools/scripts/local-premount/resume) tries to get resume device major-minor numbers by these lines:
+ 2) resuming script local-premount/resume (/usr/share/initramfs-tools/scripts/local-premount/resume) tries to get resume device major-minor numbers by these lines:
DEV=$(readlink ${resume})
DEV=/sys/class/block/${DEV##*/}/dev
if [ -r "$DEV" ]; then
- read MAJMIN < "$DEV"
+ read MAJMIN < "$DEV"
fi
- 3) then next check fails and resume process silently aborts:
+ 3) next check fails and resume process silently aborts:
if [ -z "$MAJMIN" ]; then
- exit 1
+ exit 1
fi
-
- Resuming script fails to get device major-minor because resume=UUID=106238b0-707d-4422-866d-a7534da50702 -- it's not resolved into device path in init script.
+ Resuming script fails to get device major-minor because
+ resume=UUID=106238b0-707d-4422-866d-a7534da50702 -- it's not resolved
+ into device path in init script.
Commonly mentioned workaround is to explicitly specify kernel parameter
resume=UUID=106238b0-707d-4422-866d-a7534da50702 -- only in this case
init script resolves it to device path.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: initramfs-tools 0.130ubuntu3
Uname: Linux 4.16.6-041606-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat May 5 11:32:31 2018
InstallationDate: Installed on 2018-03-27 (38 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180327)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)
** Description changed:
I found a reason of non-functioning resume from hibernation when resume
partition/file is autodetected by intiramfs hook /usr/share/initramfs-
tools/hooks/resume.
Here is the scenario:
1) hook /usr/share/initramfs-tools/hooks/resume creates config conf/conf.d/zz-resume-auto saved in initrd image, containing one variable: RESUME=UUID=106238b0-707d-4422-866d-a7534da50702 in my case
- 2) resuming script local-premount/resume (/usr/share/initramfs-tools/scripts/local-premount/resume) tries to get resume device major-minor numbers by these lines:
+ 2) during boot init script sets 'resume' variable to 'RESUME' value from
+ conf/conf.d/zz-resume-auto, then it executes local-premount scripts
+ including local-premount/resume
+
+ 3) resuming script local-premount/resume (/usr/share/initramfs-tools/scripts/local-premount/resume) tries to get resume device major-minor numbers by these lines:
DEV=$(readlink ${resume})
DEV=/sys/class/block/${DEV##*/}/dev
if [ -r "$DEV" ]; then
read MAJMIN < "$DEV"
fi
- 3) next check fails and resume process silently aborts:
+ 4) next check fails and resume process silently aborts:
if [ -z "$MAJMIN" ]; then
exit 1
fi
Resuming script fails to get device major-minor because
resume=UUID=106238b0-707d-4422-866d-a7534da50702 -- it's not resolved
into device path in init script.
Commonly mentioned workaround is to explicitly specify kernel parameter
resume=UUID=106238b0-707d-4422-866d-a7534da50702 -- only in this case
init script resolves it to device path.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: initramfs-tools 0.130ubuntu3
Uname: Linux 4.16.6-041606-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat May 5 11:32:31 2018
InstallationDate: Installed on 2018-03-27 (38 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180327)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1769297
Title:
resume from hibernation broken when resume image is autodetected
Status in initramfs-tools package in Ubuntu:
New
Bug description:
I found a reason of non-functioning resume from hibernation when
resume partition/file is autodetected by intiramfs hook /usr/share
/initramfs-tools/hooks/resume.
Here is the scenario:
1) hook /usr/share/initramfs-tools/hooks/resume creates config conf/conf.d/zz-resume-auto saved in initrd image, containing one variable: RESUME=UUID=106238b0-707d-4422-866d-a7534da50702 in my case
2) during boot init script sets 'resume' variable to 'RESUME' value
from conf/conf.d/zz-resume-auto, then it executes local-premount
scripts including local-premount/resume
3) resuming script local-premount/resume (/usr/share/initramfs-tools/scripts/local-premount/resume) tries to get resume device major-minor numbers by these lines:
DEV=$(readlink ${resume})
DEV=/sys/class/block/${DEV##*/}/dev
if [ -r "$DEV" ]; then
read MAJMIN < "$DEV"
fi
4) next check fails and resume process silently aborts:
if [ -z "$MAJMIN" ]; then
exit 1
fi
Resuming script fails to get device major-minor because
resume=UUID=106238b0-707d-4422-866d-a7534da50702 -- it's not resolved
into device path in init script.
Commonly mentioned workaround is to explicitly specify kernel
parameter resume=UUID=106238b0-707d-4422-866d-a7534da50702 -- only in
this case init script resolves it to device path.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: initramfs-tools 0.130ubuntu3
Uname: Linux 4.16.6-041606-generic x86_64
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat May 5 11:32:31 2018
InstallationDate: Installed on 2018-03-27 (38 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180327)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1769297/+subscriptions
More information about the foundations-bugs
mailing list