Categories
Blog

Making hibernate work after harddrive upgrade

I recently upgraded the harddrive in my trusty old IBM T60. I mirrored the hd using a little dd magic and everything worked fine, including the IBM rescue partition. The only thing that wasn’t working anymore was hibernation in Ubuntu. This was because it relied on wierd UUIDs instead of actual device names. Fixing it was pretty easy, once you know what the problem is. First step is to fix up /etc/fstab so that the swap partition has the right UUID. You can get the UUID of a device using something like:

sudo vol_id -u /dev/sda4

Next step is to fix up the location of the resume partition. Open /etc/initramfs-tools/conf.d/resume and change the UUID to the same as you just put into fstab. Then run:

sudo update-initramfs -u

And you should be running again 🙂