Enable "hibernation on media" in the kernel as follows:

Power management option --->Power management support
Power management option --->Hibernation (aka 'suspend to disk')

To enter hibernation on media on the target:

  target# swapon /dev/sda2
  target# echo -n shutdown > /sys/power/disk
  target# echo -n disk > /sys/power/state

In the next boot to resume from media, add the following command line:

 resume=/dev/sda2

If a command line changes, it is not wished (or, always the same device it is used to resume the target). A suggested shortcut is: to declare a 'Default resume partition' in the kernel. To do that, it is needed to enable in the kernel:

  Power management option ---> Power management support
  Power management option ---> Hibernation (aka 'suspend to disk')
  Power management option ---> Default resume partition = /dev/sda2

By this way, it is not needed the previous command line to resume from media.
Bibliography
  • Linux Symposium 2003: Linux Kernel Power Management
  • Linux Symposium 2006: Improving Linux Startup Time Using Software Resume
  • CeLinuxForum: SwSuspend Porting Notes
  • [kernel_source]/Documentation/power/swsusp.txt