Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wonder is it possible to capture the state of the machine without actually hibernating? The goal would be to make a "backup state", so if the system crashes, one could boot directly to a session with all the windows opened, all the tabs in the browser restored etc.

I think it might not be doable -- saving a snapshot of the memory, then changing the data on the hard drive, and then again restoring the snapshot would result in broken file descriptors etc. For example, a process opened a file before the snapshot was taken, and when the snapshot was restored, the file is no longer existing.

But maybe there is an ingenious way of solving that?

share|improve this question
Good question. For this I use VirtualBox :) – Evandro Silva Oct 8 '12 at 19:46
I use vbox for Windows, but maybe I should reverse the situation. I am having a lot of problems with my Lenovo and 12.04 (freezes, crashes, system not waking up etc., pretty randomly). – January Oct 9 '12 at 5:17

If you're willing to keep all of the mounted block filesystems completely untouched (that is, mounted only in read-only mode, as an ext4 journal will be modified even without any changes for example), and unmount others (eg NFS) before freezing, then yes.

You can use the kernel parameters noresume and resume= to specify whether you want to reboot into your frozen state or not.

The sequence would be:

  • To snapshot, suspend to disk, boot your system without resuming (noresume) or another system altogether (like a livecd), copy the swap partition elsewhere, then reboot with the correct resume= and use your system.

  • To go back to the frozen state, boot again with noresume or from another system, copy the swap partition back, then reboot with the correct resume= again.

I wouldn't recommend this though. Virtualization offers a much safer and tested way to achieve your results with fewer caveats.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.