In my Ubuntu 12.04, the hibernation option was working well and fine. However, I installed Debian on another partition recently and when I again tried to boot to Ubuntu, I got a message on the boot splash screen saying :
The disk drive for / is not ready yet or not present. Continue to wait; or press s to skip mounting or M for manual recovery.
After logging into Ubuntu, I find that my hibernation option has gone missing.
Is there anyway to recover the hibernation option?
EDIT: I solved the disk drive problem and I got the hibernation option back. When I did "sudo pm-hibernate", my system went to hibernation. However, when powering on again, it booted up normally and thus there was no effect of hibernation.
How can this be rectified?
EDIT1: System - Lenovo ideapad s10-2.
EDIT2: /etc/fstab
EDIT3: Screenshot of my hard disk.
I assume you have installed Debian in a way that it uses it's own separate swap partition. If you have not, I would suggest doing so (create another swap partition and change the
/etc/fstab
files accordingly), because too different operating systems writing to the same swap partition may discard hibernation data stored on the partition by the other OS.Then you have to ensure that the OS you want to use hibernation on (usually both), writes to the correct partition. This is configured in the
/etc/initramfs-tools/conf.d/resume
file. You have to put the UUID of the correct swap partition in there (usesudo blkid /dev/$device_name
to get the UUID). Finally you need to update the initial ramdisk:That should fix it.
Unfortunately, hibernate doesn't work in many cases, which can cause you to lose data if you expect your documents and applications to re-open when you switch your computer back on. Therefore, hibernate is disabled by default.
Test if hibernate works
Note : Always save your work before hibernating
You should save all of your work before hibernating the computer, just in case something goes wrong and your open applications and documents cannot be recovered when you switch on the computer again.
You can use the command line to test if hibernate works on your computer.
Open the Terminal by pressing Ctrl+Alt+T or by searching for terminal in the Dash.
Type
sudo pm-hibernate
into the terminal and press Enter.Enter your password when prompted.
After you computer turns off, switch it back on. Did your open applications re-open?
If hibernate doesn't work, check if your swap partition is at least as large as your available RAM.
Enable hibernate
If the hibernate test works, you can continue to use the
sudo pm-hibernate
command when you want to hibernate.You can also enable the hibernate option in the menus. To do that, use your favorite text editor to create
/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
. Add the following to the file and save:Restart and hibernation is back!
Or run
killall unity-panel-service
to just reset the menu.Some users will then need to run
sudo update-grub
to get the hibernate option to be available in the power menu. Some users may also have to at least log out then log in to get it to appear in the (upper right) power menu.Source : Ubuntu Docs - Power Hibernate
Source : Ubuntu Wiki - Debugging Kernel Hibernate
Try to add
nobootwait
option to the/etc/fstab
, something like this:/dev/sda1 / ext4 rw,nobootwait 0 1
When going into hibernate, a full image of you RAM is copied to swap. So most of the time people have problems with hibernation not working, their swap is too small.
You need at least as much swap as you have RAM. If you have a lot of RAM, set swappiness=0. So if you have 8GB of RAM, use 8.5 or 9GB of swap. If you have 4GB of RAM, 6GB of swap is a good number.
As far as I know Linux including Ubuntu should have swap space 2x of ram installed.
Some how my custom build computer configuration is not able to use hibernate tho I have more then enough swap space.
If you think your swap is slowing you down you can use this script I found on the internet. It cleans swap.