This question is a more specific “subquestion” of the one about side effects when two distros share a swap partition.
What will actually happen if I install two Linux distributions on my machine with shared swap partition, hibernate in one, and boot into the other? Will the other figure out that the swap data is invalid, or will it try to use it (probably with unpredictable consequences)?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
It will use the swap partition, (especially) if it has an fstab entry for it.
However your problem is not only with the swap partition, but also with all other filesystem partitions. You’re not allowed to mount any of them as long as they’re still mounted by the hibernated system.
Only one OS is allowed to mount a filesystem at a time, and with Hibernation, the system is “still running”. If you Hibernate, then boot in another OS, change filesystems, then reboot and resume the Hibernated OS that still remembers the old state of those modified filesystem… it all goes ka-boom.
* BIG FAT WARNING ********************************************************* * * If you touch anything on disk between suspend and resume... * ...kiss your data goodbye.
Source: https://www.kernel.org/doc/Documentation/power/swsusp.txt
If you cannot guarantee that the disks won’t be touched, best to avoid Hibernation altogether.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0