Debian Bug report logs - #632627
`dpkg-rec. uswsusp' doesn't write new swap partition to /etc/initramfs-tools, so s2disk fails

Package: initramfs-tools; Maintainer for initramfs-tools is Debian kernel team <debian-kernel@lists.debian.org>; Source for initramfs-tools is src:initramfs-tools.

Reported by: Askar Safin <safinaskar@mail.ru>

Date: Mon, 4 Jul 2011 08:03:01 UTC

Severity: important

Tags: confirmed, jessie, sid

Merged with 530618, 574653

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Tim Dijkstra <tim@debian.org>:
Bug#632627; Package uswsusp. (Mon, 04 Jul 2011 08:03:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Askar Safin <safinaskar@mail.ru>:
New Bug report received and forwarded. Copy sent to Tim Dijkstra <tim@debian.org>. (Mon, 04 Jul 2011 08:03:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Askar Safin <safinaskar@mail.ru>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: `dpkg-rec. uswsusp' doesn't write new swap partition to /etc/initramfs-tools, so s2disk fails
Date: Mon, 04 Jul 2011 11:59:05 +0400
Package: uswsusp
Version: 1.0-1
Severity: important
Tags: sid

If I created swap partition via Debian Installer, Debian Installer will write the following line to /etc/initramfs-tools/conf.d/resume (for example):

RESUME=UUID=6636b7cf-6a7c-43ff-ac92-2e58bc9f3a77

So, initramfs generates correct initrd.img, which can resume from `suspend to disk'.

But if I add swap partition to /etc/fstab after installation of Debian, `dpkg-reconfigure uswsusp' does not write this line to .../resume, so I cannot resume from `suspend to disk'.
If I add this line to .../resume manually, all will work fine.

Also, this bug appears in Ubuntu Lucid.


-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash




Added tag(s) jessie. Request was from Julien Cristau <jcristau@debian.org> to control@bugs.debian.org. (Thu, 18 Apr 2013 17:35:12 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Tue, 23 Jul 2013 21:57:24 GMT) Full text and rfc822 format available.

Acknowledgement sent to kix@kix.es:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Tue, 23 Jul 2013 21:57:24 GMT) Full text and rfc822 format available.

Message #12 received at 632627@bugs.debian.org (full text, mbox):

From: Rodolfo García Peñas <kix@debian.org>
To: debian-kernel@lists.debian.org
Cc: 632627@bugs.debian.org, Askar Safin <safinaskar@mail.ru>
Subject: resume file
Date: Tue, 23 Jul 2013 23:48:06 +0200
Hi,

I have a question about the file /etc/initramfs-tools/conf.d/resume file. I have this bug ([1]) in the uswsusp package.

Should/must the uswsusp package update that file? What is the better way to do it (modify the file directly, call any script,...)?

Thanks a lot,
Rodolfo.

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632627
-- 
Rodolfo "kix" Garcia
kix@debian.org



Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Wed, 24 Jul 2013 11:39:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Askar Safin <safinaskar@mail.ru>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Wed, 24 Jul 2013 11:39:09 GMT) Full text and rfc822 format available.

Message #17 received at 632627@bugs.debian.org (full text, mbox):

From: Askar Safin <safinaskar@mail.ru>
To: kix@kix.es, debian-kernel@lists.debian.org, 632627@bugs.debian.org
Subject: Re: resume file
Date: Wed, 24 Jul 2013 15:32:03 +0400
>Should/must the uswsusp package update that file? What is the better way to do it (modify the file directly, call any script,...)?
I think this file should be updated every time the package "initramfs-tools" is reconfigured.
I. e. every time initramfs is rebuilded.
As well as I know, when initramfs is rebuilding, /etc/initramfs-tools/conf.d/resume is copying to /conf/conf.d/resume on initramfs (and we should update this file before this copying).
Then, when system wakes up, this file /conf/conf.d/resume is read, and system wakes up from that swap partition.

Askar Safin

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Wed, 24 Jul 2013 12:00:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Askar Safin <safinaskar@mail.ru>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Wed, 24 Jul 2013 12:00:09 GMT) Full text and rfc822 format available.

Message #22 received at 632627@bugs.debian.org (full text, mbox):

From: Askar Safin <safinaskar@mail.ru>
To: kix@kix.es, debian-kernel@lists.debian.org, 632627@bugs.debian.org
Subject: Re[2]: resume file
Date: Wed, 24 Jul 2013 15:57:51 +0400
> I think this file should be updated every time the package "initramfs-tools" is reconfigured.

Also, ideally, initramfs should be rebuilded every time user changes fstab. But, I think this is very hard to reach.
Also, I think, every tool which updates fstab, should call initramfs rebuilding (if swap is changed and hibernation is enabled).
In particular, every package configuration script which updates fstab should trigger initramfs-tools reconfiguring.

Askar Safin

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Wed, 24 Jul 2013 13:27:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Wed, 24 Jul 2013 13:27:05 GMT) Full text and rfc822 format available.

Message #27 received at 632627@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org
Cc: kix@kix.es, 632627@bugs.debian.org
Subject: Re: Re[2]: resume file
Date: Wed, 24 Jul 2013 14:23:55 +0100
[Message part 1 (text/plain, inline)]
On Wed, 2013-07-24 at 15:57 +0400, Askar Safin wrote:
> > I think this file should be updated every time the package "initramfs-tools" is reconfigured.
> 
> Also, ideally, initramfs should be rebuilded every time user changes
> fstab. But, I think this is very hard to reach.
> Also, I think, every tool which updates fstab, should call initramfs
> rebuilding (if swap is changed and hibernation is enabled).
> In particular, every package configuration script which updates fstab
> should trigger initramfs-tools reconfiguring.

I think there is only one such script, which is the postinst script for
linux-base which made a one-time update of configuration files to use
UUIDs.  It updated the initramfs-tools resume file too.

But I wonder whether this configuration file is really needed for most
system.  Couldn't we use blkid to find the swap partition automagically?
(The configuration file would still be necessary if there are multiple
swap partitions.)

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Thu, 25 Jul 2013 10:03:23 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Rodolfo García Peñas (kix)" <kix@kix.es>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Thu, 25 Jul 2013 10:03:23 GMT) Full text and rfc822 format available.

Message #32 received at 632627@bugs.debian.org (full text, mbox):

From: "Rodolfo García Peñas (kix)" <kix@kix.es>
To: Ben Hutchings <ben@decadent.org.uk>, 632627@bugs.debian.org, Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org
Subject: Re: Bug#632627: Re[2]: resume file
Date: Thu, 25 Jul 2013 09:54:32 +0000
Ben Hutchings <ben@decadent.org.uk> escribió:

> On Wed, 2013-07-24 at 15:57 +0400, Askar Safin wrote:
>> > I think this file should be updated every time the package
>> "initramfs-tools" is reconfigured.
>>
>> Also, ideally, initramfs should be rebuilded every time user changes
>> fstab. But, I think this is very hard to reach.
>> Also, I think, every tool which updates fstab, should call initramfs
>> rebuilding (if swap is changed and hibernation is enabled).
>> In particular, every package configuration script which updates fstab
>> should trigger initramfs-tools reconfiguring.
>
> I think there is only one such script, which is the postinst script for
> linux-base which made a one-time update of configuration files to use
> UUIDs.  It updated the initramfs-tools resume file too.
>
> But I wonder whether this configuration file is really needed for most
> system.  Couldn't we use blkid to find the swap partition automagically?
> (The configuration file would still be necessary if there are multiple
> swap partitions.)
>
> Ben.
>
> --
> Ben Hutchings
> Once a job is fouled up, anything done to improve it makes it worse.

Hi Ben, Askar,

thanks a lot for your replies. I will update the uswsusp.config and
uswsusp.postinst scripts to write that file and then call
update-initramfs script. I will use UUIDs in that file (when available).

Best regards,
kix.
Rodolfo García Peñas (kix)
http://www.kix.es/



Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Thu, 25 Jul 2013 13:57:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Thu, 25 Jul 2013 13:57:09 GMT) Full text and rfc822 format available.

Message #37 received at 632627@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Rodolfo García Peñas "(kix)" <kix@kix.es>
Cc: 632627@bugs.debian.org, Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org
Subject: Re: Bug#632627: Re[2]: resume file
Date: Thu, 25 Jul 2013 14:52:38 +0100
[Message part 1 (text/plain, inline)]
On Thu, 2013-07-25 at 09:54 +0000, Rodolfo García Peñas (kix) wrote:
> Ben Hutchings <ben@decadent.org.uk> escribió:
> 
> > On Wed, 2013-07-24 at 15:57 +0400, Askar Safin wrote:
> >> > I think this file should be updated every time the package  
> >> "initramfs-tools" is reconfigured.
> >>
> >> Also, ideally, initramfs should be rebuilded every time user changes
> >> fstab. But, I think this is very hard to reach.
> >> Also, I think, every tool which updates fstab, should call initramfs
> >> rebuilding (if swap is changed and hibernation is enabled).
> >> In particular, every package configuration script which updates fstab
> >> should trigger initramfs-tools reconfiguring.
> >
> > I think there is only one such script, which is the postinst script for
> > linux-base which made a one-time update of configuration files to use
> > UUIDs.  It updated the initramfs-tools resume file too.
> >
> > But I wonder whether this configuration file is really needed for most
> > system.  Couldn't we use blkid to find the swap partition automagically?
> > (The configuration file would still be necessary if there are multiple
> > swap partitions.)
> >
> > Ben.
> >
> > --
> > Ben Hutchings
> > Once a job is fouled up, anything done to improve it makes it worse.
> 
> Hi Ben, Askar,
> 
> thanks a lot for your replies. I will update the uswsusp.config and  
> uswsusp.postinst scripts to write that file and then call  
> update-initramfs script. I will use UUIDs in that file (when available).

uswsusp is not allowed to change an initramfs-tools config file
directly:
<file:///usr/share/doc/debian-policy/policy.html/ch-files.html#s10.7.4>

And why should it make a difference whether uswsusp or kernel-only
suspend is used?

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Thu, 25 Jul 2013 19:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to kix@kix.es:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Thu, 25 Jul 2013 19:33:04 GMT) Full text and rfc822 format available.

Message #42 received at 632627@bugs.debian.org (full text, mbox):

From: Rodolfo García Peñas <kix@kix.es>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: 632627@bugs.debian.org, Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org
Subject: Re: Bug#632627: Re[2]: resume file
Date: Thu, 25 Jul 2013 21:31:02 +0200
On Thu, 25 Jul 2013, Ben Hutchings escribió:

> On Thu, 2013-07-25 at 09:54 +0000, Rodolfo García Peñas (kix) wrote:
> > Ben Hutchings <ben@decadent.org.uk> escribió:
> > 
> > > On Wed, 2013-07-24 at 15:57 +0400, Askar Safin wrote:
> > >> > I think this file should be updated every time the package  
> > >> "initramfs-tools" is reconfigured.
> > >>
> > >> Also, ideally, initramfs should be rebuilded every time user changes
> > >> fstab. But, I think this is very hard to reach.
> > >> Also, I think, every tool which updates fstab, should call initramfs
> > >> rebuilding (if swap is changed and hibernation is enabled).
> > >> In particular, every package configuration script which updates fstab
> > >> should trigger initramfs-tools reconfiguring.
> > >
> > > I think there is only one such script, which is the postinst script for
> > > linux-base which made a one-time update of configuration files to use
> > > UUIDs.  It updated the initramfs-tools resume file too.
> > >
> > > But I wonder whether this configuration file is really needed for most
> > > system.  Couldn't we use blkid to find the swap partition automagically?
> > > (The configuration file would still be necessary if there are multiple
> > > swap partitions.)
> > >
> > > Ben.
> > >
> > > --
> > > Ben Hutchings
> > > Once a job is fouled up, anything done to improve it makes it worse.
> > 
> > Hi Ben, Askar,
> > 
> > thanks a lot for your replies. I will update the uswsusp.config and  
> > uswsusp.postinst scripts to write that file and then call  
> > update-initramfs script. I will use UUIDs in that file (when available).
> 
> uswsusp is not allowed to change an initramfs-tools config file
> directly:
> <file:///usr/share/doc/debian-policy/policy.html/ch-files.html#s10.7.4>

Yes, sorry about that. Then initramfs-tools should update that file, checking if the /etc/uswsusp.conf file exists and reading the value of "resume device". Should I forward the bug to initramfs-tools package?
 
> And why should it make a difference whether uswsusp or kernel-only
> suspend is used?

uswsusp has three tools:

* s2ram: suspend to RAM.
* s2disk: suspend to disk.
* s2both: save the memory to the disk, like s2disk, and then suspend to RAM, like s2ram. If the system runs out the battery or it has a power failure, then the system will found the image disk in the next boot.

s2ram includes a machine whitelist and it can suspend using three different methods (using the whitelist, using kernel mode set (KMS) or forced). This tool doesn't use the resume file.

s2disk and s2both tools use the resume file, so your question is about these tools. These tools can write the image to the swap file selected by the user (the resume file), they can compress the image (using less swap and doing the suspend faster (less disk I/O)), they can encrypt the image file and other less important things.

kix.

> Ben.
> 
> -- 
> Ben Hutchings
> Once a job is fouled up, anything done to improve it makes it worse.



Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Fri, 26 Jul 2013 02:33:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Fri, 26 Jul 2013 02:33:04 GMT) Full text and rfc822 format available.

Message #47 received at 632627@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: kix@kix.es
Cc: 632627@bugs.debian.org, Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org
Subject: Re: Bug#632627: Re[2]: resume file
Date: Fri, 26 Jul 2013 03:30:41 +0100
[Message part 1 (text/plain, inline)]
On Thu, 2013-07-25 at 21:31 +0200, Rodolfo García Peñas wrote:
> On Thu, 25 Jul 2013, Ben Hutchings escribió:
> 
> > On Thu, 2013-07-25 at 09:54 +0000, Rodolfo García Peñas (kix) wrote:
> > > Ben Hutchings <ben@decadent.org.uk> escribió:
> > > 
> > > > On Wed, 2013-07-24 at 15:57 +0400, Askar Safin wrote:
> > > >> > I think this file should be updated every time the package  
> > > >> "initramfs-tools" is reconfigured.
> > > >>
> > > >> Also, ideally, initramfs should be rebuilded every time user changes
> > > >> fstab. But, I think this is very hard to reach.
> > > >> Also, I think, every tool which updates fstab, should call initramfs
> > > >> rebuilding (if swap is changed and hibernation is enabled).
> > > >> In particular, every package configuration script which updates fstab
> > > >> should trigger initramfs-tools reconfiguring.
> > > >
> > > > I think there is only one such script, which is the postinst script for
> > > > linux-base which made a one-time update of configuration files to use
> > > > UUIDs.  It updated the initramfs-tools resume file too.
> > > >
> > > > But I wonder whether this configuration file is really needed for most
> > > > system.  Couldn't we use blkid to find the swap partition automagically?
> > > > (The configuration file would still be necessary if there are multiple
> > > > swap partitions.)
> > > >
> > > > Ben.
> > > >
> > > > --
> > > > Ben Hutchings
> > > > Once a job is fouled up, anything done to improve it makes it worse.
> > > 
> > > Hi Ben, Askar,
> > > 
> > > thanks a lot for your replies. I will update the uswsusp.config and  
> > > uswsusp.postinst scripts to write that file and then call  
> > > update-initramfs script. I will use UUIDs in that file (when available).
> > 
> > uswsusp is not allowed to change an initramfs-tools config file
> > directly:
> > <file:///usr/share/doc/debian-policy/policy.html/ch-files.html#s10.7.4>
> 
> Yes, sorry about that. Then initramfs-tools should update that file,
> checking if the /etc/uswsusp.conf file exists and reading the value of
> "resume device". Should I forward the bug to initramfs-tools package?

Sorry, I think there's some confusion here.

initramfs-tools has its own resume configuration file, but so far as I
can see the uswsusp package does not use it.  So there would be no
reason for you to modify it - would there?

The uswsusp package can edit its own configuration file though I do not
recommend it.  I think it would be better to leave the resume device
unspecified in /etc/uswsusp.conf by default, and then to select it
automatically (both at suspend and resume time) if possible.

> > And why should it make a difference whether uswsusp or kernel-only
> > suspend is used?
> 
> uswsusp has three tools:
[...]
> s2disk and s2both tools use the resume file, so your question is about
> these tools. These tools can write the image to the swap file selected
> by the user (the resume file), they can compress the image (using less
> swap and doing the suspend faster (less disk I/O)), they can encrypt
> the image file and other less important things.

Sure, uswsusp has some advantages.  But if we agree it is a good idea to
select the resume device automatically, isn't that true for both
suspend-to-disk methods?

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Sat, 27 Jul 2013 18:27:14 GMT) Full text and rfc822 format available.

Acknowledgement sent to kix@kix.es:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Sat, 27 Jul 2013 18:27:14 GMT) Full text and rfc822 format available.

Message #52 received at 632627@bugs.debian.org (full text, mbox):

From: Rodolfo García Peñas <kix@kix.es>
To: Ben Hutchings <ben@decadent.org.uk>, 632627@bugs.debian.org
Cc: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org
Subject: Re: Bug#632627: Re[2]: resume file
Date: Sat, 27 Jul 2013 20:26:29 +0200
On Fri, 26 Jul 2013, Ben Hutchings escribió:

> On Thu, 2013-07-25 at 21:31 +0200, Rodolfo García Peñas wrote:
> > On Thu, 25 Jul 2013, Ben Hutchings escribió:
> > 
> > > On Thu, 2013-07-25 at 09:54 +0000, Rodolfo García Peñas (kix) wrote:
> > > > Ben Hutchings <ben@decadent.org.uk> escribió:
> > > > 
> > > > > On Wed, 2013-07-24 at 15:57 +0400, Askar Safin wrote:
> > > > >> > I think this file should be updated every time the package  
> > > > >> "initramfs-tools" is reconfigured.
> > > > >>
> > > > >> Also, ideally, initramfs should be rebuilded every time user changes
> > > > >> fstab. But, I think this is very hard to reach.
> > > > >> Also, I think, every tool which updates fstab, should call initramfs
> > > > >> rebuilding (if swap is changed and hibernation is enabled).
> > > > >> In particular, every package configuration script which updates fstab
> > > > >> should trigger initramfs-tools reconfiguring.
> > > > >
> > > > > I think there is only one such script, which is the postinst script for
> > > > > linux-base which made a one-time update of configuration files to use
> > > > > UUIDs.  It updated the initramfs-tools resume file too.
> > > > >
> > > > > But I wonder whether this configuration file is really needed for most
> > > > > system.  Couldn't we use blkid to find the swap partition automagically?
> > > > > (The configuration file would still be necessary if there are multiple
> > > > > swap partitions.)
> > > > >
> > > > > Ben.
> > > > >
> > > > > --
> > > > > Ben Hutchings
> > > > > Once a job is fouled up, anything done to improve it makes it worse.
> > > > 
> > > > Hi Ben, Askar,
> > > > 
> > > > thanks a lot for your replies. I will update the uswsusp.config and  
> > > > uswsusp.postinst scripts to write that file and then call  
> > > > update-initramfs script. I will use UUIDs in that file (when available).
> > > 
> > > uswsusp is not allowed to change an initramfs-tools config file
> > > directly:
> > > <file:///usr/share/doc/debian-policy/policy.html/ch-files.html#s10.7.4>
> > 
> > Yes, sorry about that. Then initramfs-tools should update that file,
> > checking if the /etc/uswsusp.conf file exists and reading the value of
> > "resume device". Should I forward the bug to initramfs-tools package?
> 
> Sorry, I think there's some confusion here.
> 
> initramfs-tools has its own resume configuration file, but so far as I
> can see the uswsusp package does not use it.  So there would be no
> reason for you to modify it - would there?
> 
> The uswsusp package can edit its own configuration file though I do not
> recommend it.  I think it would be better to leave the resume device
> unspecified in /etc/uswsusp.conf by default, and then to select it
> automatically (both at suspend and resume time) if possible.
> 
> > > And why should it make a difference whether uswsusp or kernel-only
> > > suspend is used?
> > 
> > uswsusp has three tools:
> [...]
> > s2disk and s2both tools use the resume file, so your question is about
> > these tools. These tools can write the image to the swap file selected
> > by the user (the resume file), they can compress the image (using less
> > swap and doing the suspend faster (less disk I/O)), they can encrypt
> > the image file and other less important things.
> 
> Sure, uswsusp has some advantages.  But if we agree it is a good idea to
> select the resume device automatically, isn't that true for both
> suspend-to-disk methods?

Hi Ben,

IMHO we should use the same resume device in all packages. I saw cryptsetup package is using their own method to get the resume device too. I will notify it to the cryptsetup team.

I have some questions before start modify the uswsusp scripts and upload a new package for testing.

1. uswsusp will use the initramfs resume device. So, uswsusp should read the file included in the initrd image at "conf/conf.d/resume". Is ok?

2. If the user select the resume device using boot argument, what should the uswsusp script do?

3. resume will use the device using the argument "-r". This argument will be used in the uswsusp initrd script, using the file read in the initramfs resume file (question 1).

4. Currently, the initrd image includes two different resume binaries, one in /bin (I don't know who copies that binary. initramfs-tools?) and other in /sbin (copied by the uswsusp hook script. Sizes are different. We should use only one resume binary.

kix@osaka:~/tmp$ find *bin -name resume -exec ls -l {} \;
-rwxr-xr-x 1 kix kix 2792 jul 27 19:29 bin/resume
-rwxr-xr-x 1 kix kix 40720 jul 27 19:29 sbin/resume
kix@osaka:~/tmp$

kix@osaka:~/tmp$ cat debian/initramfs-tools/hooks/uswsusp | grep copy
copy_exec /usr/lib/uswsusp/resume /sbin
kix@osaka:~/tmp$

5. There are two different resume scripts, one included by initramfs-tools and other by uswsusp. IMO we should use only one:

kix@osaka:~/tmp/scripts/local-premount$ grep 'bin/resume' *
resume: /bin/resume ${resume} ${resume_offset}
resume: /bin/resume ${resume}
uswsusp:[ -x /sbin/resume ] || exit 0;
uswsusp:/sbin/resume
kix@osaka:~/tmp/scripts/local-premount$ 

6. What file should read s2disk and s2both to find the resume device when they save the image?

7. The configuration file for uswsusp won't have the resume device. The line "resume device =" won't exist. So, if the user wants to override the resume device or select different swap device, what is the better choice? Include this change in the /etc/uswsusp.conf file? override it in the initramfs scripts? s2disk and s2both must know the override.

8. debian/control file: uswsusp will depends on initramfs-tools?

8a. I am not sure about this, because initramfs-tools is required by the kernel, but there are case that uswsusp doesn't depends on initramfs-tools and use the resume device in /etc/uswsusp.conf if initramfs-tools is not installed? Could be initramfs-tools not installed and uswsusp installed?

I am not sure if I am missing something or if I am in the wrong way. Comments a very welcome.

Cheers,
kix
 
> Ben.
> 
> -- 
> Ben Hutchings
> Once a job is fouled up, anything done to improve it makes it worse.





Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Sun, 28 Jul 2013 20:18:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to kix@kix.es:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Sun, 28 Jul 2013 20:18:04 GMT) Full text and rfc822 format available.

Message #57 received at 632627@bugs.debian.org (full text, mbox):

From: Rodolfo García Peñas <kix@kix.es>
To: Ben Hutchings <ben@decadent.org.uk>, 632627@bugs.debian.org
Cc: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org
Subject: Re: Bug#632627: Re[2]: resume file
Date: Sun, 28 Jul 2013 22:16:11 +0200
On Sat, 27 Jul 2013, Rodolfo kix Garcia escribió:

> On Fri, 26 Jul 2013, Ben Hutchings escribió:

[...]

> Hi Ben,
> 
> IMHO we should use the same resume device in all packages. I saw cryptsetup package is using their own method to get the resume device too. I will notify it to the cryptsetup team.
> 
> I have some questions before start modify the uswsusp scripts and upload a new package for testing.
> 
> 1. uswsusp will use the initramfs resume device. So, uswsusp should read the file included in the initrd image at "conf/conf.d/resume". Is ok?
> 
> 2. If the user select the resume device using boot argument, what should the uswsusp script do?
> 
> 3. resume will use the device using the argument "-r". This argument will be used in the uswsusp initrd script, using the file read in the initramfs resume file (question 1).
> 
> 4. Currently, the initrd image includes two different resume binaries, one in /bin (I don't know who copies that binary. initramfs-tools?) and other in /sbin (copied by the uswsusp hook script. Sizes are different. We should use only one resume binary.
> 
> kix@osaka:~/tmp$ find *bin -name resume -exec ls -l {} \;
> -rwxr-xr-x 1 kix kix 2792 jul 27 19:29 bin/resume
> -rwxr-xr-x 1 kix kix 40720 jul 27 19:29 sbin/resume
> kix@osaka:~/tmp$
> 
> kix@osaka:~/tmp$ cat debian/initramfs-tools/hooks/uswsusp | grep copy
> copy_exec /usr/lib/uswsusp/resume /sbin
> kix@osaka:~/tmp$
> 
> 5. There are two different resume scripts, one included by initramfs-tools and other by uswsusp. IMO we should use only one:
> 
> kix@osaka:~/tmp/scripts/local-premount$ grep 'bin/resume' *
> resume: /bin/resume ${resume} ${resume_offset}
> resume: /bin/resume ${resume}
> uswsusp:[ -x /sbin/resume ] || exit 0;
> uswsusp:/sbin/resume
> kix@osaka:~/tmp/scripts/local-premount$ 
> 
> 6. What file should read s2disk and s2both to find the resume device when they save the image?
> 
> 7. The configuration file for uswsusp won't have the resume device. The line "resume device =" won't exist. So, if the user wants to override the resume device or select different swap device, what is the better choice? Include this change in the /etc/uswsusp.conf file? override it in the initramfs scripts? s2disk and s2both must know the override.
> 
> 8. debian/control file: uswsusp will depends on initramfs-tools?
> 
> 8a. I am not sure about this, because initramfs-tools is required by the kernel, but there are case that uswsusp doesn't depends on initramfs-tools and use the resume device in /etc/uswsusp.conf if initramfs-tools is not installed? Could be initramfs-tools not installed and uswsusp installed?
> 
> I am not sure if I am missing something or if I am in the wrong way. Comments a very welcome.
> 
> Cheers,
> kix

I was thinking about that and checking some things. The /bin/resume file is used to boot the resume file created using the kernel (swsusp) and /sbin/resume is used by suspend-utils (uswsusp). I don't know if we can join both methods, using the same resume file.



Severity set to 'normal' from 'important' Request was from Rodolfo García Peñas <kix@kix.es> to control@bugs.debian.org. (Sun, 28 Jul 2013 22:24:04 GMT) Full text and rfc822 format available.

Marked as found in versions uswsusp/0.8-1.1 and uswsusp/0.8-1.2. Request was from Rodolfo García Peñas <kix@kix.es> to control@bugs.debian.org. (Sun, 28 Jul 2013 22:24:05 GMT) Full text and rfc822 format available.

Merged 530618 574653 632627 Request was from Rodolfo García Peñas <kix@kix.es> to control@bugs.debian.org. (Sun, 28 Jul 2013 22:24:08 GMT) Full text and rfc822 format available.

Severity set to 'important' from 'normal' Request was from Rodolfo García Peñas <kix@kix.es> to control@bugs.debian.org. (Sun, 28 Jul 2013 22:24:09 GMT) Full text and rfc822 format available.

Added tag(s) confirmed. Request was from Rodolfo García Peñas <kix@kix.es> to control@bugs.debian.org. (Sun, 28 Jul 2013 22:24:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Mon, 29 Jul 2013 09:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Askar Safin <safinaskar@mail.ru>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Mon, 29 Jul 2013 09:30:05 GMT) Full text and rfc822 format available.

Message #72 received at 632627@bugs.debian.org (full text, mbox):

From: Askar Safin <safinaskar@mail.ru>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: debian-kernel@lists.debian.org, kix@kix.es, 632627@bugs.debian.org
Subject: Re[4]: resume file
Date: Mon, 29 Jul 2013 13:26:27 +0400
> But I wonder whether this configuration file is really needed for most
> system.  Couldn't we use blkid to find the swap partition automagically?
> (The configuration file would still be necessary if there are multiple
> swap partitions.)
Imagine the following: there is Debian on /dev/sda1, Debian on /dev/sda2 and swap on /dev/sda3.
Debian on sda2 configured to use sda3. Debian on sda1 doesn't use swap. Debian on sda2 suspends to sda3. Then user runs Debian on sda1.
Initramfs from sda1 looks at the sda3 and says: "Oh! There is swap. Let's wake up from it". And initramfs performs waking up from wrong partition.
So, don't search swap at the resume time.

> initramfs-tools has its own resume configuration file, but so far as I
> can see the uswsusp package does not use it. So there would be no
> reason for you to modify it - would there?
No, "resume" file is really used. It used by early userspace. I just created virtual machine with fresh jessie and without swap and performed the following test:
1. Installed uswsusp. uswsusp said to me that I have no swap and I should add it and run "dpkg-reconfigure uswsusp".
2. I added swap
3. Rebooted
4. I ran "dpkg-reconfigure uswsusp". uswsusp found my swap and it was happy. It asked me a lot of questions. Then uswsusp triggered initramfs rebuilding
5. Rebooted
6. I ran "s2disk" and I could not wake up. So, this is a bug.
7. I created "resume" file (there was no such file before) and I put "RESUME=UUID=..." to it.
8. I ran "s2disk" and it failed again (of course, because /etc/initramfs-tools/conf.d/resume alone is not enough, there should be /conf/conf.d/resume in initramfs).
9. I ran "dpkg-reconfigure uswsusp", it triggered initramfs (so, /conf/conf.d/resume was created)
10. I successfully performed "s2disk"

In fact, s2disk works (without manual editing configs) only if you created swap at installing of Debian.

> The uswsusp package can edit its own configuration file though I do not
> recommend it. I think it would be better to leave the resume device
> unspecified in /etc/uswsusp.conf by default, and then to select it
> automatically (both at suspend and resume time) if possible.
As I said, selecting automatically at resume time is bad idea.
At suspend time is probably, too, because two systems can have one swap.

Ideally, there should be some guarantee that if user didn't edit configs himself and it performed suspend then he guaranteed wakes up successfully.
Of course, such guarantee is very important because user can have a lot of opened programs, unsaved documents etc. Ideally, s2disk should perform some checks (for example, it can check configs) that all is OK, before doing real suspending.
If uswsusp detects swap automatically, then there was no such guarantee. For example, let's assume, uswsusp detects swap automatically, and let's assume this bug #632627 is fixed (i. e. "dpkg-reconfigure uswsusp" writes "resume"). User just added new swap and didn't run any "dpkg-reconfigure" yet. Then he ran "s2disk". "s2disk" detected his swap, suspended. And then this user cannot wake up, because "dpkg-reconfigure" is not done and "resume" is not written.

Askar Safin

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Mon, 29 Jul 2013 13:09:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Rodolfo García Peñas (kix)" <kix@debian.org>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Mon, 29 Jul 2013 13:09:09 GMT) Full text and rfc822 format available.

Message #77 received at 632627@bugs.debian.org (full text, mbox):

From: "Rodolfo García Peñas (kix)" <kix@debian.org>
To: Askar Safin <safinaskar@mail.ru>, Ben Hutchings <ben@decadent.org.uk>
Cc: debian-kernel@lists.debian.org, 632627@bugs.debian.org
Subject: Re: Re[4]: resume file
Date: Mon, 29 Jul 2013 13:07:51 +0000
Askar Safin <safinaskar@mail.ru> escribió:

>> But I wonder whether this configuration file is really needed for most
>> system.  Couldn't we use blkid to find the swap partition automagically?
>> (The configuration file would still be necessary if there are multiple
>> swap partitions.)
> Imagine the following: there is Debian on /dev/sda1, Debian on
> /dev/sda2 and swap on /dev/sda3.
> Debian on sda2 configured to use sda3. Debian on sda1 doesn't use
> swap. Debian on sda2 suspends to sda3. Then user runs Debian on sda1.
> Initramfs from sda1 looks at the sda3 and says: "Oh! There is swap.
> Let's wake up from it". And initramfs performs waking up from wrong
> partition.
> So, don't search swap at the resume time.
>
>> initramfs-tools has its own resume configuration file, but so far as I
>> can see the uswsusp package does not use it. So there would be no
>> reason for you to modify it - would there?
> No, "resume" file is really used. It used by early userspace. I just
> created virtual machine with fresh jessie and without swap and
> performed the following test:
> 1. Installed uswsusp. uswsusp said to me that I have no swap and I
> should add it and run "dpkg-reconfigure uswsusp".
> 2. I added swap
> 3. Rebooted
> 4. I ran "dpkg-reconfigure uswsusp". uswsusp found my swap and it
> was happy. It asked me a lot of questions. Then uswsusp triggered
> initramfs rebuilding
> 5. Rebooted
> 6. I ran "s2disk" and I could not wake up. So, this is a bug.
> 7. I created "resume" file (there was no such file before) and I put
> "RESUME=UUID=..." to it.
> 8. I ran "s2disk" and it failed again (of course, because
> /etc/initramfs-tools/conf.d/resume alone is not enough, there should
> be /conf/conf.d/resume in initramfs).
> 9. I ran "dpkg-reconfigure uswsusp", it triggered initramfs (so,
> /conf/conf.d/resume was created)
> 10. I successfully performed "s2disk"
>
> In fact, s2disk works (without manual editing configs) only if you
> created swap at installing of Debian.
>
>> The uswsusp package can edit its own configuration file though I do not
>> recommend it. I think it would be better to leave the resume device
>> unspecified in /etc/uswsusp.conf by default, and then to select it
>> automatically (both at suspend and resume time) if possible.
> As I said, selecting automatically at resume time is bad idea.
> At suspend time is probably, too, because two systems can have one swap.
>
> Ideally, there should be some guarantee that if user didn't edit
> configs himself and it performed suspend then he guaranteed wakes up
> successfully.
> Of course, such guarantee is very important because user can have a
> lot of opened programs, unsaved documents etc. Ideally, s2disk
> should perform some checks (for example, it can check configs) that
> all is OK, before doing real suspending.
> If uswsusp detects swap automatically, then there was no such
> guarantee. For example, let's assume, uswsusp detects swap
> automatically, and let's assume this bug #632627 is fixed (i. e.
> "dpkg-reconfigure uswsusp" writes "resume"). User just added new
> swap and didn't run any "dpkg-reconfigure" yet. Then he ran
> "s2disk". "s2disk" detected his swap, suspended. And then this user
> cannot wake up, because "dpkg-reconfigure" is not done and "resume"
> is not written.
>
> Askar Safin

So, initramfs-tools should read /etc/uswsusp.conf and add the resume
device to the resume file?

Then, when the user run dpkg-reconfigure uswsusp,
update-initramfs-tools will update the initrd resume file and then the
system know where find the resume file.

kix

--
 .''`.
: :'  : Rodolfo García Peñas (kix) <kix@debian.org>
`. `'`  Proud Debian Developer
 `-



Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Mon, 29 Jul 2013 20:27:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Askar Safin <safinaskar@mail.ru>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Mon, 29 Jul 2013 20:27:05 GMT) Full text and rfc822 format available.

Message #82 received at 632627@bugs.debian.org (full text, mbox):

From: Askar Safin <safinaskar@mail.ru>
To: Rodolfo García Peñas <kix@kix.es>
Cc: Ben Hutchings <ben@decadent.org.uk>, 632627@bugs.debian.org, debian-kernel@lists.debian.org
Subject: Re[2]: Bug#632627: Re[2]: resume file
Date: Tue, 30 Jul 2013 00:23:04 +0400
>1. uswsusp will use the initramfs resume device. So, uswsusp should read the file included in the initrd image at "conf/conf.d/resume". Is ok?
If you mean configure time (i. e. dpkg-reconfigure uswsusp) or suspending time, then, of course, no. Because this requires unpacking initramfs, and this is slow.
Use /etc/initramfs-tools/conf.d/resume . Of course, at wake up time use /conf/conf.d/resume.

>6. What file should read s2disk and s2both to find the resume device when they save the image?
They should use same device which used by early userspace when this userspace perform waking up (to be sure waking up is possible). So, we should read /etc/initramfs-tools/conf.d/resume .

>8a. I am not sure about this, because initramfs-tools is required by the kernel, but there are case that uswsusp doesn't depends on initramfs-tools and use the resume device in /etc/uswsusp.conf if initramfs-tools is not installed? Could be initramfs-tools not installed and uswsusp installed?
Yes. Kernel depends on "initramfs-tools | linux-initramfs-tool" and linux-initramfs-tool is virtual package provided by initramfs-tools and dracut. So, this is possible if you using dracut instead of initramfs-tools. (This information is about sid.)

>8. debian/control file: uswsusp will depends on initramfs-tools?
uswsusp triggers initramfs rebuilding. So, if you want initramfs-tools, add dependency "initramfs-tools". If you can work with both initramfs-tools and dracut, add dependency "initramfs-tools | linux-initramfs-tool".

> So, initramfs-tools should read /etc/uswsusp.conf and add the resume
> device to the resume file?
I think, yes.

> Then, when the user run dpkg-reconfigure uswsusp,
> update-initramfs-tools will update the initrd resume file and then the
> system know where find the resume file.
Yes

Askar

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Tue, 30 Jul 2013 00:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to kix@debian.org:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Tue, 30 Jul 2013 00:00:04 GMT) Full text and rfc822 format available.

Message #87 received at 632627@bugs.debian.org (full text, mbox):

From: Rodolfo García Peñas <kix@debian.org>
To: Askar Safin <safinaskar@mail.ru>, 632627@bugs.debian.org
Cc: Ben Hutchings <ben@decadent.org.uk>, debian-kernel@lists.debian.org
Subject: Re: Bug#632627: Re[2]: Bug#632627: Re[2]: resume file
Date: Tue, 30 Jul 2013 01:58:19 +0200
[Message part 1 (text/plain, inline)]
On Tue, 30 Jul 2013, Askar Safin escribió:

> >1. uswsusp will use the initramfs resume device. So, uswsusp should read the file included in the initrd image at "conf/conf.d/resume". Is ok?
> If you mean configure time (i. e. dpkg-reconfigure uswsusp) or suspending time, then, of course, no. Because this requires unpacking initramfs, and this is slow.
> Use /etc/initramfs-tools/conf.d/resume . Of course, at wake up time use /conf/conf.d/resume.
> 
> >6. What file should read s2disk and s2both to find the resume device when they save the image?
> They should use same device which used by early userspace when this userspace perform waking up (to be sure waking up is possible). So, we should read /etc/initramfs-tools/conf.d/resume .
> 
> >8a. I am not sure about this, because initramfs-tools is required by the kernel, but there are case that uswsusp doesn't depends on initramfs-tools and use the resume device in /etc/uswsusp.conf if initramfs-tools is not installed? Could be initramfs-tools not installed and uswsusp installed?
> Yes. Kernel depends on "initramfs-tools | linux-initramfs-tool" and linux-initramfs-tool is virtual package provided by initramfs-tools and dracut. So, this is possible if you using dracut instead of initramfs-tools. (This information is about sid.)
> 
> >8. debian/control file: uswsusp will depends on initramfs-tools?
> uswsusp triggers initramfs rebuilding. So, if you want initramfs-tools, add dependency "initramfs-tools". If you can work with both initramfs-tools and dracut, add dependency "initramfs-tools | linux-initramfs-tool".
> 
> > So, initramfs-tools should read /etc/uswsusp.conf and add the resume
> > device to the resume file?
> I think, yes.
> 
> > Then, when the user run dpkg-reconfigure uswsusp,
> > update-initramfs-tools will update the initrd resume file and then the
> > system know where find the resume file.
> Yes
> 
> Askar

Hi Askar,

thanks a lot for your reply. Could this initramfs-tools patch solve the problem?

Some tips:

1. The patch reads the /etc/uswsusp.conf, and check if the file exists. The value is not changed to UUID.
2. I check if uswsusp is installed if the s2disk binary exists. Checking the config file only could be an error if the package was removed (not purged).
3. The resume device is created always, not only when initramfs-tools is installed. Because the user can change the device.

Comments are welcome.

Cheers,
kix
[uswsusp_resume.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Tue, 30 Jul 2013 18:21:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to kix@debian.org:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Tue, 30 Jul 2013 18:21:04 GMT) Full text and rfc822 format available.

Message #92 received at 632627@bugs.debian.org (full text, mbox):

From: Rodolfo García Peñas <kix@debian.org>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org, 632627@bugs.debian.org
Subject: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)
Date: Tue, 30 Jul 2013 20:19:18 +0200
[Message part 1 (text/plain, inline)]
On Tue, 30 Jul 2013, Rodolfo García Peñas escribió:

[snip]

> Hi Askar,
> 
> thanks a lot for your reply. Could this initramfs-tools patch solve the problem?
> 
> Some tips:
> 
> 1. The patch reads the /etc/uswsusp.conf, and check if the file exists. The value is not changed to UUID.
> 2. I check if uswsusp is installed if the s2disk binary exists. Checking the config file only could be an error if the package was removed (not purged).
> 3. The resume device is created always, not only when initramfs-tools is installed. Because the user can change the device.
> 
> Comments are welcome.
> 
> Cheers,
> kix

Hi,

I am attaching the git patches for the initramfs-tools git. Is only a proposal. Ben, what do you think? Please, apply them only if you agree with this behaviour (and code).

If you agree, I will forward the bug report to initramfs-tools and I will tag it with +patch. Then, uswsusp package doesn't need changes.

Cheers,
kix
[0001-code-style-Extra-tab.patch (text/x-diff, attachment)]
[0002-resume-using-uswsusp-configuration.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Tue, 06 Aug 2013 23:21:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to kix@kix.es:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Tue, 06 Aug 2013 23:21:04 GMT) Full text and rfc822 format available.

Message #97 received at 632627@bugs.debian.org (full text, mbox):

From: Rodolfo García Peñas <kix@kix.es>
To: 632627@bugs.debian.org, Ben Hutchings <ben@decadent.org.uk>
Cc: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org
Subject: Re: Bug#632627: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)
Date: Wed, 7 Aug 2013 01:18:41 +0200
On Tue, 30 Jul 2013, Rodolfo García Peñas escribió:

> On Tue, 30 Jul 2013, Rodolfo García Peñas escribió:
> 
> [snip]
> 
> > Hi Askar,
> > 
> > thanks a lot for your reply. Could this initramfs-tools patch solve the problem?
> > 
> > Some tips:
> > 
> > 1. The patch reads the /etc/uswsusp.conf, and check if the file exists. The value is not changed to UUID.
> > 2. I check if uswsusp is installed if the s2disk binary exists. Checking the config file only could be an error if the package was removed (not purged).
> > 3. The resume device is created always, not only when initramfs-tools is installed. Because the user can change the device.
> > 
> > Comments are welcome.
> > 
> > Cheers,
> > kix
> 
> Hi,
> 
> I am attaching the git patches for the initramfs-tools git. Is only a proposal. Ben, what do you think? Please, apply them only if you agree with this behaviour (and code).
> 
> If you agree, I will forward the bug report to initramfs-tools and I will tag it with +patch. Then, uswsusp package doesn't need changes.
> 
> Cheers,
> kix

> From c92b6c76542baf254afe875d7fbc608460a3178a Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <kix@debian.org>
> Date: Tue, 30 Jul 2013 19:49:29 +0200
> Subject: [PATCH 1/2] code style: Extra tab
> 
> This patch only adds an extra tab.
> ---
>  update-initramfs |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/update-initramfs b/update-initramfs
> index 998eaf0..251fb6b 100755
> --- a/update-initramfs
> +++ b/update-initramfs
> @@ -68,7 +68,7 @@ chrooted()
>  		# return false.
>  		return 1
>  	fi
> -return 0
> +	return 0
>  }
>  
>  mild_panic()
> -- 
> 1.7.10.4
> 

> From 47c8558cf3ae7b0918c96ae983d9738acfef8159 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <kix@debian.org>
> Date: Tue, 30 Jul 2013 19:54:43 +0200
> Subject: [PATCH 2/2] resume using uswsusp configuration
> 
> This patch reads the uswsusp configuration file (/etc/uswsusp.conf)
> to get the resume device. If the file exists and uswsusp package is
> installed, it save the value in the /etc/initramfs-tools/conf.d/resume
> file. When the initrd image is created, this value is stored in the
> conf/conf.d/resume file.
> 
> If the uswsusp package is not installed, if the configuration file
> doesn't exists, or the file included in the configuration file doesn't
> exist, the value is not used, and the previous scheme is used.
> 
> The main difference between this patch and the previous behaviour is
> the resume file is now created when the user run update-initramfs not
> when the user install the initramfs-tools package. The reason is because
> the user run 'dpkg-reconfigure uswsusp' can change the swap device, so
> the swap included in the configuration file could be wrong. The code
> to update the configuration file is moved from debian/initramfs-tools.preinst
> file to update-initramfs file. The function chrooted() was previously
> included in the file update-initramfs.
> ---
>  debian/initramfs-tools.preinst |   34 -------------------------------
>  update-initramfs               |   43 ++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 43 insertions(+), 34 deletions(-)
> 
> diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst
> index b0216a1..01ff9df 100644
> --- a/debian/initramfs-tools.preinst
> +++ b/debian/initramfs-tools.preinst
> @@ -2,43 +2,9 @@
>  
>  set -e
>  
> -chrooted() {
> -	# borrowed from udev's postinst
> -	if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then
> -		# the devicenumber/inode pair of / is the same as that of
> -		# /sbin/init's root, so we're *not* in a chroot and hence
> -		# return false.
> -		return 1
> -	fi
> -	return 0
> -}
> -
>  case "$1" in
>  	install)
>  		mkdir -p /etc/initramfs-tools/conf.d
> -
> -		# First time install.  Can we autodetect the RESUME partition?
> -		if [ -r /proc/swaps ]; then
> -			RESUME=$(grep ^/dev/ /proc/swaps | sort -rk3 \
> -				| head -n 1 | cut -d " " -f 1)
> -			if command -v blkid >/dev/null 2>&1; then
> -				UUID=$(blkid -s UUID -o value "$RESUME" || true)
> -			# FIXME: post-Wheezy remove vol_id invocations
> -			elif command -v vol_id >/dev/null 2>&1; then
> -				UUID=$(vol_id -u "$RESUME" || true)
> -			elif [ -x /lib/udev/vol_id ]; then
> -				UUID=$(/lib/udev/vol_id -u "$RESUME" || true)
> -			fi
> -			if [ -n "$UUID" ]; then
> -				RESUME="UUID=$UUID"
> -			fi
> -		fi
> -
> -		# write conf.d/resume if not in a chroot
> -		if [ -n "${RESUME}" ] && ! chrooted; then
> -			echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume
> -		fi
> -
>  	;;
>  esac
>  
> diff --git a/update-initramfs b/update-initramfs
> index 251fb6b..285e5c1 100755
> --- a/update-initramfs
> +++ b/update-initramfs
> @@ -161,6 +161,45 @@ remove_initramfs_bak()
>  	verbose "Removing ${initramfs_bak}"
>  }
>  
> +# Update the resume device
> +update_resume_device()
> +{
> +	USWSUSPCFG=/etc/uswsusp.conf
> +	S2DISK=/usr/sbin/s2disk
> +
> +	# If uswsusp installed, use that swap device
> +	if [ -r ${USWSUSPCFG} ] && [ -x ${S2DISK} ]; then
> +		RESUME=`sed -n 's/^[[:space:]]*'"resume device"'[[:space:]]*[=:][[:space:]]*\([^[:space:]]*\)/\1/ p' $USWSUSPCFG`
> +
> +		if [ ! -e ${RESUME} ]; then
> +			RESUME=""
> +		fi
> +	fi
> +
> +	# If not found in uswsusp config, get from running system
> +	if [ -z "${RESUME}" ]; then
> +		if [ -r /proc/swaps ]; then
> +			RESUME=$(grep ^/dev/ /proc/swaps | sort -rk3 \
> +				| head -n 1 | cut -d " " -f 1)
> +			if command -v blkid >/dev/null 2>&1; then
> +				UUID=$(blkid -s UUID -o value "$RESUME" || true)
> +			# FIXME: post-Wheezy remove vol_id invocations
> +			elif command -v vol_id >/dev/null 2>&1; then
> +				UUID=$(vol_id -u "$RESUME" || true)
> +			elif [ -x /lib/udev/vol_id ]; then
> +				UUID=$(/lib/udev/vol_id -u "$RESUME" || true)
> +			fi
> +			if [ -n "$UUID" ]; then
> +				RESUME="UUID=$UUID"
> +			fi
> +		fi
> +	fi
> +
> +	# write conf.d/resume if not in a chroot
> +	if [ -n "${RESUME}" ] && ! chrooted; then
> +		echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume
> +	fi
> +}
>  
>  generate_initramfs()
>  {
> @@ -307,6 +346,8 @@ create()
>  		fi
>  	fi
>  
> +	update_resume_device
> +
>  	generate_initramfs
>  
>  	run_bootloader
> @@ -344,6 +385,8 @@ update()
>  
>  	backup_initramfs
>  
> +	update_resume_device
> +
>  	generate_initramfs
>  
>  	run_bootloader
> -- 
> 1.7.10.4

Hi,

News? Ben, did you check the patch?

Thanks.
kix




Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Fri, 09 Aug 2013 12:24:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Fri, 09 Aug 2013 12:24:09 GMT) Full text and rfc822 format available.

Message #102 received at 632627@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: kix@debian.org
Cc: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org, 632627@bugs.debian.org
Subject: Re: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)
Date: Fri, 09 Aug 2013 14:22:08 +0200
[Message part 1 (text/plain, inline)]
I think it could be useful to copy the uswsusp configuration when
initramfs-tools is installed, except that initramfs-tools is almost
always installed first.

Reconfiguring uswsusp should definitely not affect the behaviour of
swsusp; that would be very surprising.  I think the configuration should
be transferred the other way: uswsusp should copy the resume device and
offset from initramfs-tools configuration (if initramfs-tools is
installed).

Ben.

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Fri, 09 Aug 2013 12:54:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Fri, 09 Aug 2013 12:54:04 GMT) Full text and rfc822 format available.

Message #107 received at 632627@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Askar Safin <safinaskar@mail.ru>
Cc: debian-kernel@lists.debian.org, kix@kix.es, 632627@bugs.debian.org
Subject: Re: Re[4]: resume file
Date: Fri, 09 Aug 2013 14:50:22 +0200
[Message part 1 (text/plain, inline)]
On Mon, 2013-07-29 at 13:26 +0400, Askar Safin wrote:
> > But I wonder whether this configuration file is really needed for most
> > system.  Couldn't we use blkid to find the swap partition automagically?
> > (The configuration file would still be necessary if there are multiple
> > swap partitions.)
> Imagine the following: there is Debian on /dev/sda1, Debian on /dev/sda2 and swap on /dev/sda3.
> Debian on sda2 configured to use sda3. Debian on sda1 doesn't use swap. Debian on sda2 suspends to sda3. Then user runs Debian on sda1.
> Initramfs from sda1 looks at the sda3 and says: "Oh! There is swap. Let's wake up from it". And initramfs performs waking up from wrong partition.
> So, don't search swap at the resume time.

In this case, sure, you wouldn't want that.

But that kind of multiboot configuration is not the *usual* case.  We
should try to make the usual case 'just work' without disruption.

> > initramfs-tools has its own resume configuration file, but so far as I
> > can see the uswsusp package does not use it. So there would be no
> > reason for you to modify it - would there?
> No, "resume" file is really used. It used by early userspace.
> I just created virtual machine with fresh jessie and without swap and performed the following test:
> 1. Installed uswsusp. uswsusp said to me that I have no swap and I should add it and run "dpkg-reconfigure uswsusp".
> 2. I added swap
> 3. Rebooted
> 4. I ran "dpkg-reconfigure uswsusp". uswsusp found my swap and it was happy. It asked me a lot of questions. Then uswsusp triggered initramfs rebuilding
> 5. Rebooted
> 6. I ran "s2disk" and I could not wake up. So, this is a bug.
> 7. I created "resume" file (there was no such file before) and I put "RESUME=UUID=..." to it.
[...]

I agree this is currently needed, although the value is not used.  I
assume this is done to allow overriding resume with the 'noresume' boot
parameter.

I think uswsusp should be properly integrated with initramfs-tools
handling of boot parameters by making the following changes:

1. In the initramfs build hook, write this to
$DESTDIR/conf/conf.d/resume-uswsusp:

    RESUME=$(sed -rn 's/^resume device[[:space:]]+[:=][[:space:]]+// p' /etc/uswsusp.conf)
    resume_offset=$(sed -rn 's/^resume offset[[:space:]]+[:=][[:space:]]+// p' /etc/uswsusp.conf)

Since this file name sorts after 'resume', it overrides the swsusp
configuration.  But it can still be overridden by boot parameters.

2. In the initramfs local-premount hook, do:

    /sbin/resume -r "$resume" -o "${resume_offset:-0}"

Ben.

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Fri, 09 Aug 2013 13:27:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Fri, 09 Aug 2013 13:27:10 GMT) Full text and rfc822 format available.

Message #112 received at 632627@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: kix@debian.org
Cc: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org, 632627@bugs.debian.org
Subject: Re: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)
Date: Fri, 09 Aug 2013 15:23:32 +0200
[Message part 1 (text/plain, inline)]
On Fri, 2013-08-09 at 14:22 +0200, Ben Hutchings wrote:
[...]
> Reconfiguring uswsusp should definitely not affect the behaviour of
> swsusp; that would be very surprising.  I think the configuration should
> be transferred the other way: uswsusp should copy the resume device and
> offset from initramfs-tools configuration (if initramfs-tools is
> installed).

Note, I'm only suggesting that this should be done at installation time.
I think it would be confusing to simply make either of the current
configuration files override the other.

I do think it would be preferable to switch to a single configuration
file for resume device and offset (or none, if automatic selection can
work) but we would need a transition plan that minimises confusion and
breakage.

Ben.

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Fri, 09 Aug 2013 13:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Rodolfo García Peñas (kix)" <kix@debian.org>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Fri, 09 Aug 2013 13:36:04 GMT) Full text and rfc822 format available.

Message #117 received at 632627@bugs.debian.org (full text, mbox):

From: "Rodolfo García Peñas (kix)" <kix@debian.org>
To: Ben Hutchings <ben@decadent.org.uk>, 632627@bugs.debian.org
Cc: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org
Subject: Re: Bug#632627: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)
Date: Fri, 09 Aug 2013 13:33:38 +0000
Ben Hutchings <ben@decadent.org.uk> escribió:

Hi Ben,

> I think it could be useful to copy the uswsusp configuration when
> initramfs-tools is installed, except that initramfs-tools is almost
> always installed first.

Yes. For this reason I made the patch. This patch moves the process to
select the resume device from the package installation to the
update-initramfs script.

> Reconfiguring uswsusp should definitely not affect the behaviour of
> swsusp; that would be very surprising.  I think the configuration should
> be transferred the other way: uswsusp should copy the resume device and
> offset from initramfs-tools configuration (if initramfs-tools is
> installed).

I am not sure about that, but in any case, we need that both packages
"interact".

I don't like too much the idea of copy the uswsusp configuration
*only* in the initramfs-tools package installation, because  if the
user could have a wrong uswsusp configuration, so the configuration
will be wrong forever.

About your idea (copy the initramfs-tools configuration), I don't like
too much too :-). Currently, uswsusp can configure the resume device.
With your idea, uswsusp must not configure the resume device (if
initramfs-tools is installed), else the resume device in
initramfs-tools and uswsusp could be different and then we continue
with these bugs/issues. So, if the user wants to change the resume
device, must do it updating the initramfs-tools configuration.

We could do these things (to support your idea):

1. initramfs-tools must provide a method to select the resume device
and the offset. The resume device won't be read from the
/etc/uswsusp.conf file when the package is installed. The user will
select the resume device and offset with initramfs-tools, because
currently the user can select it now with uswsusp (current behavior).
The user will select the resume device when initramfs-tools package is
installed (not read the /etc/uswsusp.conf file).

2. The debconf scripts will include the device and offset selection but:
2a. The user will continue using this behavior if initramfs-tools is
not installed.
2b. If initramfs-tools package is installed, the debconf scripts won't
show the selecion for the device and the offset. They will show a
message about the new process (run the initramfs-tools script to
select the device) to select the offset and resume device. The user
needs run the initramfs-tools script to select the new resume device
AND then reconfigure uswsusp again, because the /etc/uswsusp.conf
package won't be udpated.

I don't like this behaviour, because the user will:

1. Run dpkg-reconfigure uswsusp
2. See the message about select device with the initramfs-tools tool
3. Run the tool to select the new device
4. Run dpkg-reconfigure uswsup to update the config file.

The idea about initramfs-tools reads the uswsusp configuration don't
have these behavior. If the resume device changes, initramfs-tools
script could show a message to the user about that. The user will
understand that the resume problems will be related to uswsusp.conf
configuration. Because when the uswsusp package reconfiguration calls
update-initramfs tools, the user will exec only one command
"dpkg-reconfigure uswsusp". IMO, this method is better.

More comments are very welcome.

Thanks a lot for your reply Ben.
kix

> Ben.
>
> --
> Ben Hutchings
> I say we take off; nuke the site from orbit.  It's the only way to be sure.


--
 .''`.
: :'  : Rodolfo García Peñas (kix) <kix@debian.org>
`. `'`  Proud Debian Developer
 `-



Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Fri, 09 Aug 2013 13:45:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Rodolfo García Peñas (kix)" <kix@debian.org>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Fri, 09 Aug 2013 13:45:10 GMT) Full text and rfc822 format available.

Message #122 received at 632627@bugs.debian.org (full text, mbox):

From: "Rodolfo García Peñas (kix)" <kix@debian.org>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org, 632627@bugs.debian.org
Subject: Re: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)
Date: Fri, 09 Aug 2013 13:41:52 +0000
Ben Hutchings <ben@decadent.org.uk> escribió:

> On Fri, 2013-08-09 at 14:22 +0200, Ben Hutchings wrote:
> [...]
>> Reconfiguring uswsusp should definitely not affect the behaviour of
>> swsusp; that would be very surprising.  I think the configuration should
>> be transferred the other way: uswsusp should copy the resume device and
>> offset from initramfs-tools configuration (if initramfs-tools is
>> installed).
>
> Note, I'm only suggesting that this should be done at installation time.
> I think it would be confusing to simply make either of the current
> configuration files override the other.
>
> I do think it would be preferable to switch to a single configuration
> file for resume device and offset (or none, if automatic selection can
> work) but we would need a transition plan that minimises confusion and
> breakage.

Yes, the best option is have only one configuration file.
The user must select the resume device (if there are more than one).
What package should modify that file?

kix

> Ben.
>
> --
> Ben Hutchings
> I say we take off; nuke the site from orbit.  It's the only way to be sure.


--
 .''`.
: :'  : Rodolfo García Peñas (kix) <kix@debian.org>
`. `'`  Proud Debian Developer
 `-



Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Fri, 09 Aug 2013 14:21:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Fri, 09 Aug 2013 14:21:07 GMT) Full text and rfc822 format available.

Message #127 received at 632627@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Rodolfo García Peñas "(kix)" <kix@debian.org>
Cc: Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org, 632627@bugs.debian.org
Subject: Re: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)
Date: Fri, 09 Aug 2013 16:18:15 +0200
[Message part 1 (text/plain, inline)]
On Fri, 2013-08-09 at 13:41 +0000, Rodolfo García Peñas (kix) wrote:
> Ben Hutchings <ben@decadent.org.uk> escribió:
> 
> > On Fri, 2013-08-09 at 14:22 +0200, Ben Hutchings wrote:
> > [...]
> >> Reconfiguring uswsusp should definitely not affect the behaviour of
> >> swsusp; that would be very surprising.  I think the configuration should
> >> be transferred the other way: uswsusp should copy the resume device and
> >> offset from initramfs-tools configuration (if initramfs-tools is
> >> installed).
> >
> > Note, I'm only suggesting that this should be done at installation time.
> > I think it would be confusing to simply make either of the current
> > configuration files override the other.
> >
> > I do think it would be preferable to switch to a single configuration
> > file for resume device and offset (or none, if automatic selection can
> > work) but we would need a transition plan that minimises confusion and
> > breakage.
> 
> Yes, the best option is have only one configuration file.
> The user must select the resume device (if there are more than one).
> What package should modify that file?

Perhaps linux-base?

Ben.

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Rodolfo García Peñas (kix) <kix@debian.org>:
Bug#632627; Package uswsusp. (Sat, 10 Aug 2013 20:39:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to kix@kix.es:
Extra info received and forwarded to list. Copy sent to Rodolfo García Peñas (kix) <kix@debian.org>. (Sat, 10 Aug 2013 20:39:04 GMT) Full text and rfc822 format available.

Message #132 received at 632627@bugs.debian.org (full text, mbox):

From: Rodolfo Garc�a <kix@kix.es>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Rodolfo García Peñas (kix) <kix@debian.org>, Askar Safin <safinaskar@mail.ru>, debian-kernel@lists.debian.org, 632627@bugs.debian.org
Subject: Re: uswsusp patches for initramfs-tools (was: Bug#632627: Re[2]: resume file)
Date: Sat, 10 Aug 2013 22:37:16 +0200
On Fri, 09 Aug 2013, Ben Hutchings escribi�:

> On Fri, 2013-08-09 at 13:41 +0000, Rodolfo García Peñas (kix) wrote:
> > Ben Hutchings <ben@decadent.org.uk> escribió:
> > 
> > > On Fri, 2013-08-09 at 14:22 +0200, Ben Hutchings wrote:
> > > [...]
> > >> Reconfiguring uswsusp should definitely not affect the behaviour of
> > >> swsusp; that would be very surprising.  I think the configuration should
> > >> be transferred the other way: uswsusp should copy the resume device and
> > >> offset from initramfs-tools configuration (if initramfs-tools is
> > >> installed).
> > >
> > > Note, I'm only suggesting that this should be done at installation time.
> > > I think it would be confusing to simply make either of the current
> > > configuration files override the other.
> > >
> > > I do think it would be preferable to switch to a single configuration
> > > file for resume device and offset (or none, if automatic selection can
> > > work) but we would need a transition plan that minimises confusion and
> > > breakage.
> > 
> > Yes, the best option is have only one configuration file.
> > The user must select the resume device (if there are more than one).
> > What package should modify that file?
> 
> Perhaps linux-base?

No. uswsusp doesn't need the kernel package (you can boot from a floppy).

We need a (new?) package. uswsusp and initramfs-tools should depend on it. This package should include a script (/usr/bin/update-resume-file?) and the script should create/update a config file. The config file will be used by initramfs-tools and uswsusp (and cryptsetup and probably others). The file should include two lines, one for the resume device and other for the offset.
 
Perhaps we should continue this thread on debian-devel, because more people could help. Feel free to forward this mail (my Internet connection here is crap).

kix.

> Ben.
> 
> -- 
> Ben Hutchings
> I say we take off; nuke the site from orbit.  It's the only way to be sure.





Bug reassigned from package 'uswsusp' to 'initramfs-tools'. Request was from Rodolfo García Peñas <kix@debian.org> to control@bugs.debian.org. (Sun, 03 Nov 2013 10:18:05 GMT) Full text and rfc822 format available.

No longer marked as found in versions uswsusp/0.8-1.1, uswsusp/1.0-1, and uswsusp/0.8-1.2. Request was from Rodolfo García Peñas <kix@debian.org> to control@bugs.debian.org. (Sun, 03 Nov 2013 10:18:06 GMT) Full text and rfc822 format available.

Added indication that 632627 affects uswsusp Request was from Rodolfo García Peñas <kix@debian.org> to control@bugs.debian.org. (Sun, 03 Nov 2013 10:21:15 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#632627; Package initramfs-tools. (Thu, 17 Apr 2014 08:42:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adecco UK <webrecruitment@job4u.com>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Thu, 17 Apr 2014 08:42:04 GMT) Full text and rfc822 format available.

Message #143 received at 632627@bugs.debian.org (full text, mbox):

From: Adecco UK <webrecruitment@job4u.com>
To: undisclosed-recipients:;
Subject: Oil and Gas job Openings
Date: Thu, 17 Apr 2014 09:39:16 +0100
[Message part 1 (text/plain, inline)]
Hello,

Adecco is looking for Engineers, Administrative Officers, Accountants,
Project Managers and Translators. Adecco is an Employment Agency in
relation to various vacancies in some oil companies in the UK.

If you are experienced and willing to live and work in the UK, Adecco can
provide you with that opportunity.

Send us your Resume/CV in reply to this notice.

Arlo Colston
Recruitment Team
WebRecruit
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian kernel team <debian-kernel@lists.debian.org>:
Bug#632627; Package initramfs-tools. (Fri, 18 Apr 2014 23:36:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Adecco UK <webrecruitment@job4u.com>:
Extra info received and forwarded to list. Copy sent to Debian kernel team <debian-kernel@lists.debian.org>. (Fri, 18 Apr 2014 23:36:05 GMT) Full text and rfc822 format available.

Message #148 received at 632627@bugs.debian.org (full text, mbox):

From: Adecco UK <webrecruitment@job4u.com>
To: undisclosed-recipients:;
Subject: Oil and Gas Job Openings
Date: Sat, 19 Apr 2014 00:33:45 +0100
[Message part 1 (text/plain, inline)]
Hello,

Adecco is looking for Engineers, Administrative Officers, Accountants,
Project Managers and Translators. Adecco is an Employment Agency in
relation to various vacancies in some oil companies in the UK.

If you are experienced and willing to live and work in the UK, Adecco can
provide you with that opportunity.

Send us your Resume/CV in reply to this notice.

Arlo Colston
Recruitment Team
WebRecruit
[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 23 11:36:41 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.