Given RAM size of N Bytes the above instructions could be used as follows to create two files: Unfortunately, when done this way, hibernation fails with kernel message "PM: Cannot find swap device, try swapon -a". Thanks very much for sharing your knowledge with that useful post, iva2k, it's just what I needed. I remember in windows, you can't wake the computer up via the mouse or keyboard on my hp zv6000 because the usb power is shutdown and won't resume.
So by simple math it brings you over 1GB of needed space in the swapfile.
This HOWTO explains how to use swapfile and still have hibernation working.
(For advanced console users / cmdline junkies - you may find compressed list of commands at the end of this HOWTO) Why would you want a swapfile? Swap partition does work fine, but there are 3 cases when you may want a swapfile instead: This HOWTO was tested only on Intrepid, but may work on other versions.
CONCLUSION This is a quick command summary: Part 1 - make swap filecat /proc/meminfo ## Note memory size.
Graphics card may eat a chunk of main RAM ## We will need swapfile the size of N to 2*N of RAM sudo swapoff -a sudo dd if=/dev/zero of=/swapfile bs=1024 count=8M ;## 2*N of RAM, swap size=count*bs sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile sudo -b gedit /etc/fstab # Remove ALL old swap partitions # Add: /swapfile none swap sw 0 0 free -m swapon -s resume_offset echo "resume=UUID=cd XX--X18 resume_offset=66050" | sudo tee /etc/initramfs-tools/conf.d/resume sudo -b gedit /boot/grub/# kopt=root=UUID=...