[Bug 923326] Re: With multiple swap partitions resume from hibenation fails

2012-04-16 Thread A Dasgupta
Not sure about kernel 3.0.x, but I will describe some methods for the 2.6.30+ kernels that I use with initramfs-tools-0.98. You most likely have to modify and adapt things to suit your versions. Read carefully and proceed (at your own risk) only if you know what you are doing. When multiple sw

[Bug 923326] Re: With multiple swap partitions resume from hibenation fails

2012-04-16 Thread A Dasgupta
** Also affects: initramfs-tools Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/923326 Title: With multiple swap partitions resume from hibenation fails T

[Bug 923326] Re: With multiple swap partitions resume from hibenation fails

2012-04-16 Thread A Dasgupta
R OWN RISK. # # A Dasgupta, 2012 # PREREQ="resume uswsusp" prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac if [ -n "${noresume}" ] ; then exit 0 fi # Get a list of devices with sws

[Bug 50437] Re: Resume from hibernation may fail because swap partition UUID does not match /etc/initramfs-tools/conf.d/resume

2012-04-16 Thread A Dasgupta
See my detailed postings regarding this issue in: https://bugs.launchpad.net/initramfs-tools/+bug/923326 . -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/50437 Title: Resume from hibernation may

[Bug 923326] Re: With multiple swap partitions resume from hibenation fails

2012-04-16 Thread A Dasgupta
Script (slightly improved) attached for download. ** Attachment added: "Initramfs-tools boot script for giving user a chance to resume manually" https://bugs.launchpad.net/initramfs-tools/+bug/923326/+attachment/3081061/+files/warnresumefail -- You received this bug notification because you

[Bug 923326] Re: With multiple swap partitions resume from hibenation fails

2012-04-16 Thread A Dasgupta
Some internals: If you decide to resume manually, here is some additional low-level (non-portable) method for detecting suspend signatures. This is meant only for experienced users and even then a small error can destroy all your data. Both the kernel internal swsusp and the userland uswsusp (su

[Bug 923326] Re: With multiple swap partitions resume from hibenation fails

2012-04-17 Thread A Dasgupta
There was an error in my posted script above ("swswap"should be "swsuspend"). Fixed script (tested) is attached with this post. Please replace the old script by the attached fixed script file warnresumefail.fixed Here is the diff anyway: --- warnresumefail 2012-04-17 03:56:16.945738809 -04

[Bug 983805] [NEW] Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-17 Thread A Dasgupta
Public bug reported: This patch to scripts/local-premount/resume makes the C program /bin/resume unnecessary (from klibc-utils, source resumelib.c). The source shows that C program /bin/resume is simply echoing major:minor[:offset] onto /sys/power/resume, which is exactly what is done in this pat

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-17 Thread A Dasgupta
New script for /usr/share/initramfs-tools/scripts/local-premount/resume attached (full). . ** Attachment added: "Full script file" https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/983805/+attachment/3082529/+files/resume -- You received this bug notification because you are a m

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-17 Thread A Dasgupta
** Patch added: "Resume boot script makes /bin/resume superfluous" https://bugs.launchpad.net/bugs/983805/+attachment/3082526/+files/initramfs-tools-resume-boot-script-diff -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bu

[Bug 923326] Re: With multiple swap partitions resume from hibenation fails

2012-04-17 Thread A Dasgupta
Final version ready for testing (it only improves the error message from the last fixed version). If you have a spare computer where data does not matter, put this script in /etc/initramfs-tools/scripts/local-premount/ run update-initramfs -u ; update-grub, and then deliberately misconfigure

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-17 Thread A Dasgupta
Updated script: Please discard the previous patch in post #1 and the full script file in post #2. Instead, use the patch in this post, or the full script in a following post. This should be good for testing. [Although the previous version of the script worked in all my tests, it has a bug which

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-17 Thread A Dasgupta
Updated full script : This post contains the updated version of full resume script. Please discard the version in post #2 and use this one instead for testing. . ** Attachment added: "Updated full script (please discard previous version in post #2)" https://bugs.launchpad.net/ubuntu/+source

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-17 Thread A Dasgupta
Further Update: Not a bug fix, but more code cleanup (the diff is shorter) making the checking logic identical to that of the original resumelib.c. This post contains the diff, and the full script in the following post. This version should be preferred over the one in post #4/#5. . ** Attachmen

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-17 Thread A Dasgupta
Full script, with the patch of post #6 applied, ready for testing. ** Attachment added: "Full script file with the last patch above" https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/983805/+attachment/3087501/+files/resume -- You received this bug notification because you are a

[Bug 923326] Re: With multiple swap partitions resume from hibenation fails

2012-04-17 Thread A Dasgupta
The warning message in the script is still a little cryptic. To help the user to recover, a better message is needed. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/923326 Title: With multiple swap p

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-18 Thread A Dasgupta
And the latest full script file. ** Attachment added: "Full script file replacing one in post #7" https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/983805/+attachment/3088244/+files/resume -- You received this bug notification because you are a member of Ubuntu Bugs, which is su

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-18 Thread A Dasgupta
Latest patch (one more version -- delaying stat call to make sure disk is ready). ** Attachment added: "Patch (replaces one in post #6)" https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/983805/+attachment/3088202/+files/initramfs-tools-resume-boot-script-diff.v5 -- You received

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-18 Thread A Dasgupta
Frozen version : This is frozen until bugs are found. (This post contains the patch and the next post the full script.) Boot script: scripts/local-premount/resume Summary of changes from current initramfs-tools production version: - /bin/resume is not used any more and its function of echoin

[Bug 983805] Re: Resume boot script fix makes /bin/resume unnecessary (kernel's internal swsusp)

2012-04-18 Thread A Dasgupta
Full script --- frozen version. ** Attachment added: "Full script --- frozen version" https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/983805/+attachment/3091728/+files/resume -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to

[Bug 985346] [NEW] Resume fails if kernel swsusp method is not configured

2012-04-18 Thread A Dasgupta
Public bug reported: Bug in script: debian/initramfs-tools/scripts/local-premount/uswsusp (This script has stayed the same at least from lucid to precise. I guess this will need to go upstream?) Problem: The uswsusp initramfs boot script (scripts/local-premount/uswsusp) exits if the kernel

[Bug 985346] Re: Resume fails if kernel swsusp method is not configured

2012-04-18 Thread A Dasgupta
** Attachment added: "Patch for boot script initramfs-tools/scripts/local-premount/uswsusp" https://bugs.launchpad.net/ubuntu/+source/uswsusp/+bug/985346/+attachment/3092109/+files/uswsusp_1.0%2B20110509-diff -- You received this bug notification because you are a member of Ubuntu Bugs, whic