To reverse swapfile setup, you need to go through these steps:
Code:
sudo -b gedit /etc/fstab
Edit /etc/fstab and :
1. Reverse changes (Remove or comment out ALL swap files)
2. Restore / Add new line:
Code:
/dev/... none swap sw 0 0
Where /dev/... is your swap partition
Code:
sudo swapoff -a
sudo swapon /dev/...
Replace UUID and resume_offset:
Code:
echo "resume=UUID=<your UUID> resume_offset=0" | sudo tee /etc/initramfs-tools/conf.d/resume
Now edit GRUB configuration:
Code:
sudo -b gedit /boot/grub/menu.lst
Find the line "# kopt=root=UUID=..."
and change it to "resume=UUID=<your UUID> resume_offset=0" (without quotes).
Note that your UUID in above two cases will be your swap partition UUID.
It should look like this (with your UUID and offset):
Code:
# kopt=root=UUID=... ro resume=UUID=cd71de6f-907a-40d7-bf26-c17f201e5718 resume_offset=0
Make sure you have no carriage returns in this line.
Now let's run the tools to make them work:
Code:
sudo update-grub -y
Answer "install the package maintainer's version" if it asks.
Code:
sudo update-initramfs -u
Verify that all your kernel stanzas (menu entries) got updated in /boot/grub/menu.lst with resume=... and resume_offset=0, if not - verify your # kopt= line - it should have # and space. Rerun update-grub if necessary. It may keep your old file if you chose wrong answer above.
Now reboot before trying to hibernate, so kernel gets the right resume_offset parameter.
After reboot, try to hibernate. It should get right back to this window after you power your computer back up.
Now you can get rid of the old swapfile.
Bookmarks