FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 04-07-2008, 09:02 AM
Alan Jenkins
 
Default Bug#474691: Can't resume from swap file hibernation (as opposed to partition)

Package: initramfs-tools
Version: 0.91e
Severity: wishlist
Tags: patch

To resume from a swap file within a partition using the original swsusp,
you find the block offset of the swap file header using e.g. swap-offset
from the uswsusp package, and add "resume=<dev>" and
"resume_offset=<blocks>" parameters to the kernel command-line.
Unfortunately this parameter is not recognised by the initramfs scripts
(so it would only work if you booted without an initramfs).


diff --git a/resume b/resume
index d997f81..8a41f83 100755
--- a/resume
+++ b/resume
@@ -34,5 +34,5 @@ fi

if [ -e /sys/power/resume ]; then
# hardcode path, uswsusp ships an resume binary too
- /bin/resume ${resume}
+ /bin/resume ${resume} ${resume_offset}
fi




--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-07-2008, 09:48 AM
maximilian attems
 
Default Bug#474691: Can't resume from swap file hibernation (as opposed to partition)

On Mon, 07 Apr 2008, Alan Jenkins wrote:

> To resume from a swap file within a partition using the original swsusp,
> you find the block offset of the swap file header using e.g. swap-offset
> from the uswsusp package, and add "resume=<dev>" and
> "resume_offset=<blocks>" parameters to the kernel command-line.
> Unfortunately this parameter is not recognised by the initramfs scripts
> (so it would only work if you booted without an initramfs).

ack,
never used that.

> diff --git a/resume b/resume
> index d997f81..8a41f83 100755
> --- a/resume
> +++ b/resume
> @@ -34,5 +34,5 @@ fi
>
> if [ -e /sys/power/resume ]; then
> # hardcode path, uswsusp ships an resume binary too
> - /bin/resume ${resume}
> + /bin/resume ${resume} ${resume_offset}
> fi

ack
that looks like a start, but misses a definition of resume_offset
in the cmdline parsing and it's export.

so rewrote that too:


diff --git a/init b/init
index 3a93ef8..70f4384 100755
--- a/init
+++ b/init
@@ -50,6 +50,7 @@ export rootmnt=/root
export debug=
export panic=
export blacklist=
+export resume_offset=

# Parse command line options
for x in $(cat /proc/cmdline); do
@@ -97,6 +98,9 @@ for x in $(cat /proc/cmdline); do
resume=*)
RESUME="${x#resume=}"
;;
+ resume_offset=*)
+ resume_offset="${x#resume_offset=}"
+ ;;
noresume)
noresume=y
;;
diff --git a/scripts/local-premount/resume b/scripts/local-premount/resume
index d997f81..6bf95e5 100755
--- a/scripts/local-premount/resume
+++ b/scripts/local-premount/resume
@@ -28,11 +28,13 @@ case $resume in
;;
esac

-if [ ! -e "${resume}" ]; then
- exit 0
-fi
+[ ! -e "${resume}" ] && exit 0
+
+[ ! -e /sys/power/resume ] && exit 0

-if [ -e /sys/power/resume ]; then
- # hardcode path, uswsusp ships an resume binary too
+# hardcode path, uswsusp ships an resume binary too
+if [ -n "${resume_offset}" ]; then
+ /bin/resume ${resume} ${resume_offset}
+else
/bin/resume ${resume}
fi



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 04-07-2008, 09:54 AM
maximilian attems
 
Default Bug#474691: Can't resume from swap file hibernation (as opposed to partition)

tags 474691 pending
stop

On Mon, 07 Apr 2008, Alan Jenkins wrote:

> To resume from a swap file within a partition using the original swsusp,
> you find the block offset of the swap file header using e.g. swap-offset
> from the uswsusp package, and add "resume=<dev>" and
> "resume_offset=<blocks>" parameters to the kernel command-line.
> Unfortunately this parameter is not recognised by the initramfs scripts
> (so it would only work if you booted without an initramfs).

thanks updated patch added to git repo, will be in next 0.92 upload
see repo http://git.debian.org/?p=kernel/initramfs-tools.git



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:22 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org