LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-26-2008, 03:09 AM   #1
Romanus81
Member
 
Registered: Feb 2008
Posts: 201

Rep: Reputation: 31
How do I hibernate Slackware? Also: 2.6.27 kexec kernel hibernation?


I have a laptop in college, and I generally do a lot of switching between linux and windows (games mostly...). The nice thing about windows is that I can just hibernate and boot into linux if I want to. But I can't do it the other way around: I can't hibernate linux if I want to pop into windows for a few minutes for a couple video games. So far I've been suspending by ctrl-alt-f#'ing into a terminal, then running

sync
echo -n mem > /sys/power/state

(This also seems pretty insecure, as it doesn't ask for a password after restoring, is there a better method? So can I hibernate with slackware 12.1? I've seemed to have a lot of trouble finding info on this, and I tried passing disk instead of mem to the state file, and everything just crashes.

I heard that the 2.6.27 kernel added code for a kexec hibernation, does this work well or better than the hibernation features native to Slackware? Again, this seems pretty new and poorly documented, but I haven't spent that much time looking at it.

I just want to be able to boot my computer and switch b/t os's quicky.
 
Old 10-26-2008, 02:18 PM   #2
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
This also seems pretty insecure, as it doesn't ask for a password after restoring
You can't execute that command unless you are running as root. If your root account is accessible without a password then add a password to the root account. If your running as root all the time, then you have lost all of the inherent security the 'nix framework provides.

With respect to restoring, yes that is a potential security issue because anybody can power up the box. I have not discovered a nice way to avoid the problem.

Quote:
sync
echo -n mem > /sys/power/state
This is the core of suspending with the Linux kernel. Any suspend program or script you run ultimately will use this command sequence.

Quote:
I tried passing disk instead of mem to the state file, and everything just crashes.
The disk parameter is the suspend-to-disk command, which unlike suspend-to-ram, actually powers off the box after copying the contents of ram to the hard drive. This routine uses the swap partition on the hard drive. The swap partition must be large enough to store everything in ram. Most of the reports I have read indicate that restoring from disk is slower than a fresh bootup. Restoring from ram is quite fast.

Quote:
I just want to be able to boot my computer and switch b/t os's quicky.
You always can try wriggling your nose (Bewitched), your finger (My Favorite Martian), or crossing your arms and blinking both eyelids (I Dream of Jeannie).
 
Old 10-26-2008, 08:13 PM   #3
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,551

Rep: Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833
rworkman has been busy in this area.
http://groups.google.com.au/group/al...6499866cbf7471
 
Old 10-26-2008, 08:43 PM   #4
Romanus81
Member
 
Registered: Feb 2008
Posts: 201

Original Poster
Rep: Reputation: 31
Ah! That's it!
It seems like the only google results I could find were from last year when everyone is complaining about hibernate support.
Linux recovers from Hibernate in about ~25 seconds, it cut my boot time by about 40%, not as fast as windows, but it is better than waiting 40 seconds for linux to boot, and then X is already started for me, too.

If anyone is curious:
add the line;
append = "resume=/dev/x" where x is the block device assigned to your swap partition, e.g. /dev/sda7.

This step may be optional, seems to work well w/o it, but if you need an initrd;
make the file /etc/mkinitrd.conf to look like this;
MODULE_LIST="jfs"
ROOTDEV="/dev/hda1"
ROOTFS="jfs"
RESUMEDEV="/dev/hda2"

then, mkinitrd -c -k X -F
where X is the name of the kernel the initrd is for as it appears in `uname -r` or in the /lib/modules/ directory.

Then install the pm_utils package from
http://rlworkman.net/pkgs/12.1/

and as root do pm_suspend or pm_hibernate.

Read the topic in the link above, the first post has a lot of useful info.

So does anyone have any information on the kexec hibernation? I have it working now, but I would like to know if there is a place where I can get info from.
 
Old 10-26-2008, 10:18 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,360

Rep: Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180Reputation: 4180
Have a read of this.
Might dampen your enthusiasm.
 
Old 10-26-2008, 11:59 PM   #6
kite
Member
 
Registered: Aug 2003
Location: Shenzhen, China
Distribution: Slackware
Posts: 306

Rep: Reputation: 47
I have very reliable hibernation and also suspend to ram experience with

linux 2.6.24.5 and tuxonice 3.0-rc7 patch
hibernate-script
thinkpad-acpi (for my x31 laptop)

I have also tried some other linux kernel version, but to find 2.6.24.5 works better with tuxonice patch.
 
Old 10-27-2008, 12:03 AM   #7
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,560

Rep: Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355
For anyone still looking, you might find this thread (which I just posted) worth a read:
http://www.linuxquestions.org/questi...ackend-679253/
 
Old 10-27-2008, 12:39 AM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,973
Blog Entries: 46

Rep: Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202
Hi,
Quote:
Originally Posted by rworkman View Post
For anyone still looking, you might find this thread (which I just posted) worth a read:
http://www.linuxquestions.org/questi...ackend-679253/
Robby, I place a link to 'Request for Testing: Suspend/Resume (pm-utils backend)' within 'Slackware Hot_Fix' section of 'Slackware-Links'. More than just SlackwareŽ links!
 
Old 10-27-2008, 10:26 AM   #9
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,560

Rep: Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355Reputation: 1355
Quote:
Originally Posted by onebuck View Post
Robby, I place a link to 'Request for Testing: Suspend/Resume (pm-utils backend)' within 'Slackware Hot_Fix' section of 'Slackware-Links'. More than just SlackwareŽ links!
Thanks, onebuck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Blank screen after hibernate - Slackware 12 AceofSpades19 Slackware 10 05-04-2008 07:19 PM
LXer: Linux: Kexec Hibernation Performance LXer Syndicated Linux News 0 08-31-2007 04:40 AM
LXer: Linux: Debating Kexec Hibernation LXer Syndicated Linux News 0 07-20-2007 09:01 AM
LXer: Linux: Hibernation With Kexec LXer Syndicated Linux News 0 07-13-2007 10:16 PM
DISCUSSION: Hibernation with SuSE 9.0, Kernel 2.6.3 and Bootsplash hyperlink1uk LinuxAnswers Discussion 0 06-07-2004 07:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration