After upgrading to Hardy, hibernate stopped working. Usplash would show the animated splash screen for a few seconds on boot, then it would go away an I would see a text boot screen starting with the “Reading files needed to boot” text. The system would go into hibernate normally, but would never boot back to where I was, it was like I’d never hibernated. After a bit of digging, I found the problem. The UUID for my swap file system was not the same as the value entered for the resume file system in initramfs. Here is the steps required to fix this problem:
1. Make sure you have the initramfs-tools update
sudo apt-get install initramfs-tools
2. Run the blkid util to show what your existing UUIDs are.
root@hardy-desktop:~# sudo blkid
/dev/sda1: UUID="a76fe101-7951-4a65-af1e-50b2902c5b35" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="8dd072f1-25b3-4a7f-888f-2314697d60b9"
3. Verify that the UUID listed for the swap partition in the previous step matches what is listed in /etc/fstab
root@grigsby-desktop:~# cat /etc/fstab
proc /proc proc defaults 0 0
# /dev/sda1
UUID=a76fe101-7951-4a65-af1e-50b2902c5b35 / ext3 relatime,errors=remount-ro 0 1
# /dev/sda5
UUID=8dd072f1-25b3-4a7f-888f-2314697d60b9 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
4. Modify the UUID in /etc/initramfs-tools/conf.d/resume file to match the UUID listed for the swap partition from blkid.
root@hardy-desktop:~# cat /etc/initramfs-tools/conf.d/resume
RESUME=UUID=617b4b90-112e-497a-bc6b-dda2a3e7565e
root@hardy-desktop:~# sudo vi /etc/initramfs-tools/conf.d/resume
5. Update the initramfs.
sudo update-initramfs -u
6. Restart the system.
June 2nd, 2008 at 6:03 pm
WOOOHOOO! Thanks. Mine crashed after moving the swap partition.
June 6th, 2008 at 6:24 am
WHEW!!! Thanks. I’ve been searching for days to find a fix. After moving my swap partition this problem began. At first I thought if was an issue with external USB devices… at least thats the direction most of the forum threads pointed. I was about to give up and reinstall the OS.
Now that wont be necessary. Your fix worked perfectly!!
Thanks for posting it
September 2nd, 2008 at 11:46 pm
Thanks for the great fix. After installing 8.04 together with a few other O/S’s, the bootproblems began. Ubuntu forums were no help at all.
Your fix was right on target and afterwards no problems at all with booting.
Thanks for this post
September 13th, 2008 at 2:09 am
Thanks for the fix.
September 27th, 2008 at 4:04 am
Yeah, thx a lot! Great stuff. I also have had the problem that my swap partion has no uuid. To get one do this:
sudo swapoff -v /dev/sdaX
sudo mkswap -U $(uuidgen) /dev/sdaX
sudo swapon -v /dev/sdaX
October 5th, 2008 at 1:47 am
Thanks. Problem was active after i move Hardy on another disk. Now it’s solved.
February 14th, 2009 at 1:14 pm
Yippee!! Thanks a lot! No, sorry it ought to be an infinite number thanks!
You have solved my problem of Hibernation not working since I did some repartitioning of my HDD. Tried hard to find the fix, but did not until stumbled here!
Now with this fix, it works PERFECTLY!!
May you live long and prosper! \\//
February 20th, 2009 at 12:12 pm
Thx!
But I have a problem,
I no swap partion,how to ?
Thx!!!
February 23rd, 2009 at 11:32 am
@cover – You have no swap partition at all? Then you shouldn’t be able to hibernate at all. Can you post your fstab file?
February 27th, 2009 at 5:02 am
Hi, I am a Chinese user, I have encountered this problem, but have not been solved. Here are some of my cases to you for help!
My e-mail: chaogege.cn @ qq.com hope you can give me some comments! Thank you very much!
run?sudo blkid
return list?
/dev/sda1: UUID=\D4B6692AB6690E74\ LABEL=\?????\ TYPE=\ntfs\
/dev/sda5: UUID=\FE905CF0905CB140\ LABEL=\?????\ TYPE=\ntfs\
/dev/sda6: UUID=\C8F03274F03268B8\ LABEL=\?????\ TYPE=\ntfs\
/dev/sda7: UUID=\C0F0E404F0E3FE93\ LABEL=\?????\ TYPE=\ntfs\
/dev/sda8: UUID=\54740ea0-aca6-4630-9aef-98e916a4dc5e\ TYPE=\ext3\
/dev/sda9: TYPE=\swap\ UUID=\e82f7677-ebdc-4237-bf56-40c23d1c1f79\
run?cat /etc/fstab
return list?
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
# /dev/sda8
UUID=54740ea0-aca6-4630-9aef-98e916a4dc5e / ext3 relatime,errors=remount-ro 0 1
# /dev/sda9
UUID=e82f7677-ebdc-4237-bf56-40c23d1c1f79 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
run?cat /etc/initramfs-tools/conf.d/resume
return?
RESUME=UUID=e82f7677-ebdc-4237-bf56-40c23d1c1f79
open Grub list:menu.lst?you can see?
splashimage=54740ea0-aca6-4630-9aef-98e916a4dc5e/boot/grub/splash.xpm.gz
title Personal Ubuntu 8.10 Desktop Edition
uuid 54740ea0-aca6-4630-9aef-98e916a4dc5e
kernel /boot/vmlinuz-2.6.27-12-generic root=UUID=54740ea0-aca6-4630-9aef-98e916a4dc5e ro quiet splash
initrd /boot/initrd.img-2.6.27-12-generic
quiet
February 27th, 2009 at 10:42 pm
Hi, I tried to follow but my ubuntu does not boot at all. And am not able to write Sudo command on command line which is getting me error. How do I solve.?
March 12th, 2009 at 1:23 am
Cheers, mate. I had no swap partition either (had deleted it in error), and after creating one, your procedure worked like a charm on Ubuntu 8.10. I had to manually edit the resume file, though, for I couldn’t do it in terminal. Anyway, many thanks!
April 1st, 2009 at 12:06 pm
Thanks for the enlightenment! For people who use multiple kernels like me: sudo update-initramfs -u -k all
May 8th, 2009 at 7:47 pm
Thank you. I would install everything again. The error occurred when I increased the size of the swap partition. Greetings from Brazil.
July 18th, 2009 at 6:56 pm
thanks dude
from chile
September 22nd, 2009 at 3:16 am
Works great, if you don’t want to hibernate and have no Swap Partition, just replace the UUID line
/etc/initramfs-tools/conf.d/resume
with a blank line.
December 15th, 2009 at 9:09 am
I followed the instructions “to a tee,” but they failed to resolve this issue. Is there anyone who can assist me in figuring out why?
January 11th, 2011 at 2:17 am
Thanks a lot..
January 19th, 2011 at 2:02 am
I have no idea about this.. This third party like sudo codings through we knows about that booting process..