Skip to main content
added 39 characters in body
Source Link
goldilocks
  • 90k
  • 33
  • 212
  • 272

The question is: Will the hibernated system survive after this?

If system B uses the swap space, which you might as well presume it will, then I really doubt system A will be able to reboot from hibernation successfully, and the consequences may be bad if it does.

If not, will the memory be corrupted or will A just be unable to resume?

Although the kernel docs do contain:

 * BIG FAT WARNING *********************************************************
 *
 * If you touch anything on disk between suspend and resume...
 *                              ...kiss your data goodbye.

This is meant to apply, I think, to the actual filesystem, since the same [src]/Documentation/power/swsusp.txt also notes:

The resume process checks for the presence of the resume device, if found, it then checks the contents for the hibernation image signature. If both are found, it resumes the hibernation image.

So, presuming that this signature is at the beginning of the swap device, and presuming that normal swap usage also starts at the beginning of the device, then normal swap usage will destroy the "hibernation image signature" and when system A resumesboots, it will not find such a signature and won't resume.. from hibernation, it will just start fresh.

But while those presumptions seem reasonable, without any promise from the people who implemented the system, it is impossible to say they are completely sound -- my advice is you may be making a serious gamble by doing this.

If you are using hibernation and don't already have such an option in your bootloader menu, by the way, it is a good idea to have one which contains noresume on the kernel line so you can choose to skip resuming from hibernation. As far as I am aware, there is unfortunately no such kernel line parameter to disable the use of swap, e.g. for system B when you know system A used the swap for hibernation.

The question is: Will the hibernated system survive after this?

If system B uses the swap space, which you might as well presume it will, then I really doubt system A will be able to reboot from hibernation successfully, and the consequences may be bad if it does.

If not, will the memory be corrupted or will A just be unable to resume?

Although the kernel docs do contain:

 * BIG FAT WARNING *********************************************************
 *
 * If you touch anything on disk between suspend and resume...
 *                              ...kiss your data goodbye.

This is meant to apply, I think, to the actual filesystem, since the same [src]/Documentation/power/swsusp.txt also notes:

The resume process checks for the presence of the resume device, if found, it then checks the contents for the hibernation image signature. If both are found, it resumes the hibernation image.

So, presuming that this signature is at the beginning of the swap device, and presuming that normal swap usage also starts at the beginning of the device, then normal swap usage will destroy the "hibernation image signature" and when system A resumes, it will not find such a signature and won't resume...

But while those presumptions seem reasonable, without any promise from the people who implemented the system, it is impossible to say they are completely sound -- my advice is you may be making a serious gamble by doing this.

If you are using hibernation and don't already have such an option in your bootloader menu, by the way, it is a good idea to have one which contains noresume on the kernel line so you can choose to skip resuming from hibernation. As far as I am aware, there is unfortunately no such kernel line parameter to disable the use of swap, e.g. for system B when you know system A used the swap for hibernation.

The question is: Will the hibernated system survive after this?

If system B uses the swap space, which you might as well presume it will, then I really doubt system A will be able to reboot from hibernation successfully, and the consequences may be bad if it does.

If not, will the memory be corrupted or will A just be unable to resume?

Although the kernel docs do contain:

 * BIG FAT WARNING *********************************************************
 *
 * If you touch anything on disk between suspend and resume...
 *                              ...kiss your data goodbye.

This is meant to apply, I think, to the actual filesystem, since the same [src]/Documentation/power/swsusp.txt also notes:

The resume process checks for the presence of the resume device, if found, it then checks the contents for the hibernation image signature. If both are found, it resumes the hibernation image.

So, presuming that this signature is at the beginning of the swap device, and presuming that normal swap usage also starts at the beginning of the device, then normal swap usage will destroy the "hibernation image signature" and when system A boots, it will not find such a signature and won't resume from hibernation, it will just start fresh.

But while those presumptions seem reasonable, without any promise from the people who implemented the system, it is impossible to say they are completely sound -- my advice is you may be making a serious gamble by doing this.

If you are using hibernation and don't already have such an option in your bootloader menu, by the way, it is a good idea to have one which contains noresume on the kernel line so you can choose to skip resuming from hibernation. As far as I am aware, there is unfortunately no such kernel line parameter to disable the use of swap, e.g. for system B when you know system A used the swap for hibernation.

Source Link
goldilocks
  • 90k
  • 33
  • 212
  • 272

The question is: Will the hibernated system survive after this?

If system B uses the swap space, which you might as well presume it will, then I really doubt system A will be able to reboot from hibernation successfully, and the consequences may be bad if it does.

If not, will the memory be corrupted or will A just be unable to resume?

Although the kernel docs do contain:

 * BIG FAT WARNING *********************************************************
 *
 * If you touch anything on disk between suspend and resume...
 *                              ...kiss your data goodbye.

This is meant to apply, I think, to the actual filesystem, since the same [src]/Documentation/power/swsusp.txt also notes:

The resume process checks for the presence of the resume device, if found, it then checks the contents for the hibernation image signature. If both are found, it resumes the hibernation image.

So, presuming that this signature is at the beginning of the swap device, and presuming that normal swap usage also starts at the beginning of the device, then normal swap usage will destroy the "hibernation image signature" and when system A resumes, it will not find such a signature and won't resume...

But while those presumptions seem reasonable, without any promise from the people who implemented the system, it is impossible to say they are completely sound -- my advice is you may be making a serious gamble by doing this.

If you are using hibernation and don't already have such an option in your bootloader menu, by the way, it is a good idea to have one which contains noresume on the kernel line so you can choose to skip resuming from hibernation. As far as I am aware, there is unfortunately no such kernel line parameter to disable the use of swap, e.g. for system B when you know system A used the swap for hibernation.