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