Snapshots of System State in Linux?
Anonymous Coward asks: "VMware provides the capability to save the state of a VMware session to a file and to later reload it to resume from where was left off, as if the (virtual) machine never was turned off. Is there a way to do this on a real Linux machine, i.e., capturing the state of the machine (the whole memory space, CPU registers, etc.) to a file and restoring it later (assuming the same hardware)? This is useful for, say, kernel debugging or fast boot (i.e., saving the machine state at some point after the kernel has been initialized and just resuming from that point on in case of reboot)." Most laptops do exactly this when they suspend to disk, however most of that is done via the laptops firmware.
In theory this can be do. It isn't that hard either, just walk through all the data structures in the kernel and write them to disk. For most memory, just tell the swaper to swap that task out and all your tasks have their registers saved automaticly.
Now for the problem: when saving state you need to save more then just the CPU. Getting the simple case to work is probably very easy. However every hardware part needs to be re-initialized to the same state it was in before. Somethings won't care, (keyboard likely) others are easy to work around. (just act like a virtual console switch). Others can be very hard to (think of scsi drivers where some program is reading from a file)
Don't forget that you can't save the state of your disk driver while you are writing that state out, unless you are careful to avoid half written registers.
This is an interesting and doable project. If you want it do it. Remember this is was linux is about: scratching your own itch and then sharing with others. If you get this working great, if not you will have least learned.
Software Suspend for Linux 2.2.x
It will save the state of your machine to the swap space and on bootup recognize the saved state and restore it. No BIOS or fimware junk nessacary
Quando Omni Flunkus Moritati
I don't think it can be done without special firmware, or something in the BIOS. VMware is doing exactly what laptops are doing, VMware writes to a file in the host, and newer laptops write to a special partition. It sucks.. but possibly the only thing you can do is to put laptop brains on your desktop/server board... which may or may not be that easy to do, it certainly may be easier to convince one of the smaller board manufacturers to do this.