PDA

View Full Version : [SOLVED] Moved swap partition: Hibernate fails



schiotz
November 6th, 2009, 01:24 PM
Hi!

I recently moved to Ubuntu (9.10 Karmic) on my laptop. When I partitioned the harddisk, I made a small error. A few days later, I booted on the live CD, and fixed it. My swap partition had got a new device name (/dev/sda5), and had been moved slightly, so I ran mkswap on it, unfortunately giving it a new UUID. After rebooting, i had to fix the UUID in /etc/fstab to get it mounted.

Now hibernate fails. It hibernates OK, but when rebooting next time, the kernel does not notice the image in the swap partition. Undoubtedly, it needs to be told where to find the swap partition by grub, but the new grub2 setup files are hugely complicated, and appears to be machine-written. Can anybody points me to how I can change this, and inform grub2 about the new partition and/or the new UUID?

Best regards

Jakob

PS: It may be related: when booting, I usually get warnings printed on the boot screen about not being able to mount / and /home because something is not ready. The UUIDs are also printed. It flashes by too fast for me to really read it, and when the system has finished booting, everything appears to be mounted correctly.

dv3500ea
November 6th, 2009, 02:22 PM
Try:

sudo swapon /dev/sda
replace /dev/sda with the volume referring to your swap partition.

schiotz
November 6th, 2009, 02:29 PM
Thank you very much, but the problem was not mounting the swap partition, but to read the hibernation image when linux boots after hibernating.

/Jakob

schiotz
November 6th, 2009, 10:20 PM
Solved! I searched in all folders under /etc for the string UUID and found the old UUID in /etc/initramfs-tools/conf.d/resume

I updated the UUID in that file, and ran "update-initramfs -u". That fixed the problem :D

/Jakob