Can Ubunutu hibernate when installed on slave drive?

Asked by mjpking

On my Dell 2350, I have two hard drives installed. The first one, master drive, is Windows. The second, slave drive, is Ubuntu 9.0.4. When I'm running Ubuntu (which is 95% of the time) I'd like the computer to go into a 'hibernate' mode (hard drives power off...blah, blah) when not in use - similar to what it does when running Windows. I haven't been able to get this to happen. Is it possible for Ubuntu on a desktop slave drive to do this? If so, how is it done? Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Douglas Moyes
Solved:
Last query:
Last reply:
Revision history for this message
Best Douglas Moyes (aragorn-stellimare) said :
#1

You can hibernate to any drive, even if you started Linux from a USB drive, but there are some things you need to do. One is to have a swap partition of sufficient size, and the next step is to compile a custom linux kernel. The Suspend to Disk option is under "Power management and ACPI options." Read the docs VERY carefully.

See Documentation/power/swsusp-and-swap-files.txt from the kernel source tree for more information. Some information and utilities can also be found at http://suspend.sf.net

Suspending to disk is done by: echo disk > /sys/power/state
Or you can use the utilities at http://suspend.sf.net

To resume, add resume=/dev/swappartition to the end of your kernel boot string... failing to do so after a suspending, and trying to start the system normally would cause all the effects as if pulled the plug on your system instead of shutting down properly. Attempting to resume your system after mounting the disks again would be bad (i.e. suspend to disk->restart normally->any type of shutdown besides suspend to disk->restore from suspend to disk = corrupted filesystem).

This is a rather new feature, so give us a break. Besides, it's often faster to simply shut your computer down and restart than to load a few gig of data of the hard drive to restore your system's state.

Revision history for this message
mjpking (kingx072) said :
#2

Thanks Douglas Moyes, that solved my question.