Well, I couldn’t find an appropriate title for this article except the above one! The story is simple, I suddenly couldn’t find the “hibernate” option while shutting down and this annoyed me a little bit, I took a quick look around at that time and didn’t find a quick solution, so I just went on without it!
Today, I declared war, and started my hunt for the hibernate option, dead or alive, doesn’t matter to me, and the surprise is:::: My swap space wasn’t getting recognized and I was swap-less!!! All that time I was working without a swap space!!
I discovered this when I checked my fstab “sudo gedit /etc/fstab” and found my swap partition there at “/dev/sda6” while when I opened the disk utility (System -> Administration -> Disk Utility), I – luckily – saw that my swap space wasn’t at “/dev/sda6”, it was at “/dev/sda3” which was a big shock to me, anyway, the discovery of the problem is the key to solving it, so I did the following:
- Found the UUID of my swap filesystem using the “ls /dev/disk/by-uuid/” command, the swap space was the only one not listed in /etc/fstab, so I used it and changed the value inside “/etc/fstab”
- Re-installed the hibernate package “sudo apt-get install hibernate”
- Reconfigure the package “uswsusp” as in this article, the most important thing is to NOT allow the “splash” screen (Step 7), as it didn’t allow me to resume correctly, seems to be a bug, not quite sure though
- There you go, problem solved! I didn’t search for how to mount the swap space live, I simply restarted and the hibernate option was there
Also, I knew why this problem occurred, I recently backed up my old HDD which had too many bad sectors and restored the OS on another HDD, this messed up some information about the partitions, especially their UUIDs.
Hint: You can query /proc/swaps to make sure your swap partition is in use “sudo cat /proc/swaps”
I think this also was the cause of many of the crashes that my system ran into, will see by time