Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #65626

Bug#944777: initramfs-tools-core: Resume fails when UUID= syntax used in conf.d/resume.

From Glenn Washburn <development@efficientek.com>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#944777: initramfs-tools-core: Resume fails when UUID= syntax used in conf.d/resume.
Date 2019-11-15 08:50 +0100
Message-ID <z2EwF-2c9-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Package: initramfs-tools-core
Version: 0.130ubuntu3.9
Severity: normal
Tags: newcomer

Dear Maintainer,

Resume from hibernation will fail when /etc/initramfs-tools/conf.d/resume
contains "RESUME=UUID=<UUID of hibernation image>".  According to NEWS this
should work.  The reason is does not is because UUID= processing is only done
for the resume kernel parameter (see init lines 123-128). No processing is done
for the RESUME shell variable included from conf.d. Recognizing that
conf.d/resume is being sourced as a script in init, I've created a hack to fix
by adding the processing in the resume file. My resume file looks like this:

"""
RESUME=UUID=deadbeef-cafe-dead-beef-cafedeadbeef

case $RESUME in
    UUID=*)
        RESUME="/dev/disk/by-uuid/${RESUME#UUID=}"
esac
"""

Incidentally, I believe this is the issue in #872664. I chose to create a new
bug because that one is unnecessarily specific.  The bug applies to all versions
on all platforms.

I suggest that the case be moved out of the resume= kernel param handling and
added just after line 206, before the "resume" variable is set. Actually, I see
no reason to use the RESUME variable aside from the fact that its what you're
supposed to use in the conf.d/resume file.  But its confusing and inconsistent
to provide "resume=UUID=" as the kernel parameter and "RESUME=UUID=" in the
conf.d/resume file.

Attached is a patch exemplifying my proposed changes (not tested). The patch
should allow for documentation to notify about the depreciation of RESUME= in
conf.d/resume and to start using resume= instead, but to continue being
backwards compatible with the old syntax. The hooks scripts would need to be
updated to account for the new variable (pretty trivial change, something like
"RESUME=${RESUME:-$resume}").

Glenn

Back to linux.debian.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Bug#944777: initramfs-tools-core: Resume fails when UUID= syntax used in conf.d/resume. Glenn Washburn <development@efficientek.com> - 2019-11-15 08:50 +0100
  Processed: Re: Bug#944777: initramfs-tools-core: Resume fails  when UUID= syntax used in conf.d/resume. "Debian Bug Tracking System" <owner@bugs.debian.org> - 2019-11-15 23:30 +0100
  Bug#944777: initramfs-tools-core: Resume fails when UUID= syntax used in conf.d/resume. Ben Hutchings <ben@decadent.org.uk> - 2019-11-15 23:30 +0100
    Bug#944777: initramfs-tools-core: Resume fails when UUID= syntax used in conf.d/resume. Glenn Washburn <development@efficientek.com> - 2019-11-26 09:30 +0100
  Bug#944777: marked as done (initramfs-tools-core: Resume fails  when UUID= syntax used in conf.d/resume.) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2020-01-18 17:00 +0100

csiph-web