This is my third question in a day about hibernation, after the one about hibernating in a dual boot with shared swap, and another about hibernating in a dual boot with a shared writable partition.
I have realized that dangers of hibernation concern also single boot machines. For example, you may hibernate, power up your computer, and select a wrong kernel from the GRUB menu. If I understand correctly, this may seriously damage your system. Moreover, in NixOS at boot you are choosing not just a kernel to boot, but a complete system among several independent "snapshots."
It looks quite wrong to me that a sequence of innocent and common actions, where the user does not even get a warning, can destroy the system. Thus, it seems to me that without some kind of a safeguard hibernation is an undesirable feature.
Have anybody found any solution to this problem? Are there any workarounds?
The most logical solution IMO would be to disallow loading any system other than the hibernated one, or making systems clear the swap data at boot is something does not match up.
To be more clear, let me emphasize that I am talking about problems in a "single boot" setup, where multiple version (kernels, snapshots) of the same system can exist and be loaded.