📅 2010-Jul-20 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ errors, hibernation, ubuntu ⬩ 📚 Archive
I recently noticed that hibernation had stopped working in Ubuntu. I had set up Ubuntu to hibernate whenever I closed the laptop lid. On opening the lid later, I found that there was a hibernation error message and it had failed. On closer scrutiny, I found that the hibernate option had disappeared from the Ubuntu Ctrl-Alt-Del dialog. It had also disappeared from the Shutdown menu and from Power Options. Running pm-hibernate at the Terminal would silently fail too.
After the initial surprise, I found the reason: the swap partition had disappeared! Hibernation requires a swap partition that is mounted correctly to function. The culprit was the Disk Manager that ships in Windows 7. It had silently removed the swap partition when I had edited some other partitions! I was able to get hibernate working again after I discovered this.
Here is how to get hibernate back:
Open System → Administration → Disk Utility or run palimpsest at the Terminal. This utility can be used to format back the swap partition.
Now the Universally Unique Identifier (UUID) of the swap partition would have changed. To obtain its current UUID use:
$ sudo blkid
Copy the UUID for the partition that matches the swap partition.
$ sudo vim /etc/fstab
Reboot Ubuntu and hibernate should magically reappear! 😊