My Story with Hibernating Ubuntu Lucid

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:

  1. 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”
  2. Re-installed the hibernate package “sudo apt-get install hibernate”
  3. 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
  4. 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

About SoCRaT

Cybersecurity Master's Student, Systems Engineer, OSS & Linux Geek
This entry was posted in Uncategorized and tagged , , , , , . Bookmark the permalink.

Leave a comment