Hibernate: Difference between revisions
Merge-delete (talk | contribs) No edit summary |
Merge-delete (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
In Slackware, hibernation works out-of-the-box and can be easily done from KDE's menu. Resuming from hibernation, however, is not set up, so when you turn on your computer again, it starts as normal. That is, if your hardware supports it and if you've set up a swap space larger than your RAM. | In Slackware, hibernation works out-of-the-box and can be easily done from KDE's menu. Resuming from hibernation, however, is not set up, so when you turn on your computer again, it starts as normal. That is, if your hardware supports it and if you've set up a swap space larger than your RAM. | ||
== Huge kernel == | |||
To tell your kernel where to resume from, you need to write the info to ''lilo.conf'': | To tell your kernel where to resume from, you need to write the info to ''lilo.conf'': | ||
Line 6: | Line 8: | ||
Replace ''/dev/sda6'' with your actual swap space. Swap partitions are perfect, I think swap files should work too. If you don't know where your swap lies, look at ''/proc/swaps''. | Replace ''/dev/sda6'' with your actual swap space. Swap partitions are perfect, I think swap files should work too. If you don't know where your swap lies, look at ''/proc/swaps''. | ||
== Generic kernel + initrd == | |||
If you're using generic or your own kernel, you need to adjust initrd image as well. Append | If you're using generic or your own kernel, you need to adjust initrd image as well. Append | ||
Line 13: | Line 17: | ||
to mkinitrd command so it may look like this: | to mkinitrd command so it may look like this: | ||
mkinitrd -c -k 2.6.33.4 | mkinitrd -c -k 2.6.33.4 -f <fs_type> -m <fs_type> -r /dev/sdx -h /dev/sdy | ||
Replace ''/dev/sdx'' with your actual root partition and ''/dev/sdy'' with your actual swap space. | Replace ''/dev/sdx'' with your actual root partition and ''/dev/sdy'' with your actual swap space. | ||
If you're using LVM, don't forget to append '''-L''' to mkinitrd command | |||
mkinitrd -c -k 2.6.33.4 -f <fs_type> -m <fs_type> -r /dev/sdx -h /dev/volumegroup/swap -L | |||
Afterwards, run lilo. | Afterwards, run lilo. | ||
== Further reading == | |||
* [http://www.linuxquestions.org/linux/answers/Hardware/Mini_HOW_TO_Hibernate_and_resume_0 Mini_HOW_TO_Hibernate_and_resume_0] | |||
* Hibernate to encrypted swap - [http://slackware.osuosl.org/slackware-13.1/README_CRYPT.TXT REAME_CRYPT.TXT] | |||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Revision as of 11:39, 13 April 2011
In Slackware, hibernation works out-of-the-box and can be easily done from KDE's menu. Resuming from hibernation, however, is not set up, so when you turn on your computer again, it starts as normal. That is, if your hardware supports it and if you've set up a swap space larger than your RAM.
Huge kernel
To tell your kernel where to resume from, you need to write the info to lilo.conf:
append=" resume=/dev/sda6"
Replace /dev/sda6 with your actual swap space. Swap partitions are perfect, I think swap files should work too. If you don't know where your swap lies, look at /proc/swaps.
Generic kernel + initrd
If you're using generic or your own kernel, you need to adjust initrd image as well. Append
-h /dev/sdx
to mkinitrd command so it may look like this:
mkinitrd -c -k 2.6.33.4 -f <fs_type> -m <fs_type> -r /dev/sdx -h /dev/sdy
Replace /dev/sdx with your actual root partition and /dev/sdy with your actual swap space.
If you're using LVM, don't forget to append -L to mkinitrd command
mkinitrd -c -k 2.6.33.4 -f <fs_type> -m <fs_type> -r /dev/sdx -h /dev/volumegroup/swap -L
Afterwards, run lilo.
Further reading
- Mini_HOW_TO_Hibernate_and_resume_0
- Hibernate to encrypted swap - REAME_CRYPT.TXT