Looks like I have to blog regularly. When I logged in today in wordpress, there was a drastic change in the front page. I almost forgot my password ๐Ÿ˜ฆ

If you are thinking about the hibernate library to work with databases, its time, you look for some other web page ๐Ÿ˜‰

Let me come to the point.

I use Ubuntu on my laptop. Recently, I installed another linux operating system to have a dual boot to get a feel of it. (Will discuss about this some other time). After installing, when I logged into Ubuntu, ALAS!!! I lost the ability to hibernate my machine. ๐Ÿ˜ฆ Did a bit of goggling and found that, it was because Ubuntu was unable to find swap space. And so, it didn’t work.

Root Cause:
Looks like, on hibernation, the data is stored in swap space. On resuming, this data is read and loaded back. When I installed the second operating system, looks like unknowingly, I have asked it to format the swap partition. As you might know, all linux partitions nowadays uses a UUID (a hexadecimal value). This is the identity of the partition. While formatting, the UUID got changed and so, Ubuntu was unaware of the change. And so, it was not able to find swap and hibernate was not working.

Want to know how it got fixed?
Obviously, you need root privileges.

  1. In my /etc/fstab, “UUID=370c3fe6-50c5-4a4f-832c-f31fcfe1db2a none swap sw 0 0” was my swap entry. I had to change it with the right UUID. To find the UUID of the swap partition, execute blkid and get the UUID. Update /etc/fstab with this entry.
  2. Update /etc/initramfs-tools/conf.d/resume file with the UUID you got in the previous step. So, this means, during a resume of hibernate, this file is referred to identify where to look for the “hibernated” data.
  3. Execute update-initramfs -u -> I need to understand a bit more about this yet.
  4. Last but not the the least, Hibernate ๐Ÿ˜€