View previous topic :: View next topic |
Author |
Message |
Mythril n00b
Joined: 07 Oct 2006 Posts: 52
|
Posted: Sat Oct 07, 2006 10:18 am Post subject: Suspend2 2.6.18 & genkernel |
|
|
Hi,
I was using suspend2-sources-2.6.16-r8 and hibernate-script-1.12-r1 until now but I upgraded to
suspend2-sources-2.6.18 and hibernate-script-1.93-r6 and it does not work anymore
I can hibernate without problem but when resuming, everything works fine until suspend2 tries to load the swap and fails with message "Unable to find swap-space signature".
I have looked on Google and it seems to be related to the initramfs generated by genkernel :
With the previous versions of suspend2-sources and hibernate-script, you had to update the /usr/share/genkernel/generic/linuxrc file and add the line 'echo > /proc/suspend2/do_resume' after 'mount -t proc proc /proc'. But in the new version of suspend2, location of /proc/suspend2 has been changed to /sys/power/suspend2 and thus updating the line to 'echo > /sys/power/suspend2/do_resume' does not work anymore (maybe /sys has not been loaded yet).
So, I think it is just a matter of adding a line or two in genkernel's linuxrc file but I can't find where.
Anyone who was able to have this work with genkernel and the latest versions of suspend2-sources and hibernate-script ?
Thanks ! |
|
Back to top |
|
|
Snoozz Tux's lil' helper
Joined: 01 Feb 2006 Posts: 76
|
Posted: Fri Oct 13, 2006 8:46 am Post subject: |
|
|
I have the same problem :s. Doesn't anyone know what to do?
K found it!
This is what you'll have to do:
1.open /usr/share/genkernel/generic/linuxrc with your favorite editor
2.Search for the line: exec /bin/busybox chroot (normally line number 764)
3.Replace everything from "exec /bin/busybox chroot . /bin/sh <<- EOF" to " exec /sbin/init ${REAL_INIT}
EOF" WITH
Code: |
exec /bin/busybox chroot . /bin/sh <<- EOF
mount -t sysfs none /sys
mount -t proc proc /proc >/dev/null 2>&1
echo > /sys/power/suspend2/do_resume
umount /proc;umount /sys ; mount -o remount,rw / >/dev/null 2>&1
exec /sbin/init ${REAL_INIT}
EOF
|
4a. genkernel --install initrd
4b People with gensplash: genkernel --install --gensplash=yourtheme initrd
Voila, enjoy hibernate |
|
Back to top |
|
|
Mythril n00b
Joined: 07 Oct 2006 Posts: 52
|
Posted: Fri Oct 13, 2006 7:20 pm Post subject: |
|
|
yep ! worked for me too !
Thanks !
I just had to remove the 'mount -o remount,rw' command cause fsck failed at boot with a message telling / was mounted so checking it would be dangerous.
Thanks a lot. |
|
Back to top |
|
|
punter Guru
Joined: 25 Nov 2002 Posts: 506
|
Posted: Fri Oct 20, 2006 12:19 pm Post subject: |
|
|
I'm using the same kernel and hibernate-script... but my hibernation worked in an unusual manner:
it resumed not after the kernel loading, but even _after_ the modules were loaded.
there is a "suspend2_resume" command in the middleware of linuxrc file.... what did you guys do with that?
my resume works fine when it reaches that command, but i'm concerned about my root partition...
do you guys know if i should leave it as is... or alter the start to resume at that point?
cheers,
shane |
|
Back to top |
|
|
Mythril n00b
Joined: 07 Oct 2006 Posts: 52
|
Posted: Fri Oct 20, 2006 2:14 pm Post subject: |
|
|
punter wrote: | I'm using the same kernel and hibernate-script... but my hibernation worked in an unusual manner:
it resumed not after the kernel loading, but even _after_ the modules were loaded.
there is a "suspend2_resume" command in the middleware of linuxrc file.... what did you guys do with that?
my resume works fine when it reaches that command, but i'm concerned about my root partition...
do you guys know if i should leave it as is... or alter the start to resume at that point?
cheers,
shane |
I've got the same behaviour... Don't know anything about how this works internally but it seems to work fine for me... |
|
Back to top |
|
|
punter Guru
Joined: 25 Nov 2002 Posts: 506
|
Posted: Wed Oct 25, 2006 12:23 pm Post subject: |
|
|
well, i can confirm that the default "suspend2_resume" command in the linuxrc file is not sufficient..... it hanged my computer 5 minutes after resuming....
so, we need to put the resume operation at the start.... but how do you know whether to use the traditional "echo > /proc" approach, or this new "suspend2_resume" command ?? |
|
Back to top |
|
|
|