What do I have to take care of when hibernating both Ubuntu and Windows (dual-boot environment)

I've got both Windows 7 and Ubuntu (finally) installed on my laptop.

For the sake of comfort, I usually hibernate Windows instead of shutting it down. And I think when using Ubuntu regularly, there will be times when I do that to quickly switch from Windows to Ubuntu to check or do something quickly and then want to continue my work on Windows.

1) Are there any problems with hibernating both Windows and Ubuntu at the same time?

I should probably also mention that I created an extra partition which I use to access from both Windows and Ubuntu. I would like to put my www directory of my test web servers on that drive, so that I can work on that stuff both from Windows and from Ubuntu.

2) So - is this a good idea and what do I have to be careful with?

EDIT: One important sidenote I forgot: I want to share a Mozilla Thunderbird profile directory on a shared drive. Does that change anything?


I've never tried it with Windows, but I think it should work. There's just one point you have to be very careful of: always unmount the shared partition(s) before hibernating.

More precisely, you need a reader-writer lock on each shared partition. That is, at any given time you must either:

  • have one OS (live or hibernating) with write access to the partition, and no other OS with read access;
  • or have any number of OSes with read access, and none with write access.

Again, a hibernating OS with the partition mounted counts as an access. This is because when an OS hibernates, it saves some assumptions about the partition (i.e. some form of cache)¹. If the assumptions have become wrong when you resume, massive filesystem corruption is likely to occur.

¹ I think current hibernation systems under Linux don't hibernate any data cache, but there is a little metadata that's saved as part of the kernel state. It's possible that you may be lucky enough that this metadata doesn't change short of a filesystem resize or defragmentation, but I wouldn't risk it.


I use both Windows and Debian GNU/Linux on my netbook. I hibernate them both and choose one on awakening and have had no problems whatsoever. I also have a shared data partition similar to what you describe. I use NTFS (which is fully supported by recent Linux releases) and have had no problems.

Ubuntu (and Linux in general) hibernate to a swap partition. That is, the contents of RAM are saved to this extra partition. Windows saves to a swap area in its own partition (by default). The two images are in totally different places and cannot interfere with each other.