Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have two Linux installations on the same hard disk but on separate partitions. One of them, let's call it "A", is set up to use a third swap partition and the other one, let's call it "B", is set up to use no swap partition. "A" mounts only the swap partition and A's root partition. "B" mounts only B's root partition and no swap partition.
Now the problem is that when I hibernate "A", boot "B", shut down "B", and then boot back into "A", "A" does not resume from hibernation and instead boots up as if it had been shut down. The only cause that I can think of for this is that A's hibernation data in the swap partition is being overwritten or corrupted so "A" can't resume from hibernation, but I can't see how that would be happening because, as far as I know, "B" doesn't use the swap partition at all. There is no swap partition in B's fstab file so unless "B" is automatically using the swap partition anyway (even though it is not in the fstab) then I cannot see how the data in the swap partition could be overwritten or corrupted.
Is there anything else that could be causing this behaviour when attempting to resume from hibernation? Is there any other way for the data in the swap partition to get overwritten or corrupted? Is there a way to check that "B" is definitely not using the swap partition? If "B" is using the swap partition, how do I make sure that it doesn't?
Check whether A's getting resume command parameter to linux kernel while booting. See grub.cfg. For more info see Documentation directory under linux kernel sources.
"A" is getting the correct resume parameter as it always worked before I installed "B" and my grub configuration was not changed when I installed "B" (other than a manual addition of mine to put "B" in the boot menu but I didn't change "A" when I did that). Furthermore this issue only occurs when I boot "B" while "A" is in hibernation; if I hibernate "A" and then try to resume "A" without booting "B" then "A" resumes fine.
Afaik kernel has it's own swap mechanism, and it works regardless your fstab options.
I would suggest to dedicate a couple of gigabytes of hdd space and create another one swap partition especially for "B" system.
It might prevent first swap partition usage by "B" system since it would has it's own swap.
Afaik kernel has it's own swap mechanism, and it works regardless your fstab options.
I'm not too sure about that because otherwise why would there be a swap entry in the fstab file in the first place? My other Linux system has two hard disks and both of them have a swap partition but only the one in the fstab file gets used. Although on the other hand live systems usually use whatever swap partitions are available on a system, but I always assumed that they were specifically configured to automatically find swap partitions and not that that was a default behaviour - maybe it's the default behaviour when there aren't any swap partitions in the fstab file, in which case I need to figure out how to disable swapping altogether for "B" because I've got more than enough RAM for how I intend to use "B". I'll take a look at /proc/swaps next time I have "B" booted.
cat /proc/swaps does not list any swap partitions. Is there something else that "B" could be doing when booted that causes A's swap partition to be changed, or that could, by some other means, cause "A" to not resume from hibernation (BIOS/bootloader parameters being changed when "B" boots or something else like that)?
Your system B's initramfs might be tocuhing the swap. Unpack initramfs check it's scripts. Or view your boot logs.
Also while compiling and building linux kernel there is an option for which device is swap and resume partition to acts as space for hibernation. Thar might be the cause for system B's behaviour.
Your system B's initramfs might be tocuhing the swap. Unpack initramfs check it's scripts. Or view your boot logs.
Also while compiling and building linux kernel there is an option for which device is swap and resume partition to acts as space for hibernation. Thar might be the cause for system B's behaviour.
I'll take a look at the initramfs and boot logs but I would appreciate it if someone could point me in the right direction for what to look for as I would have absolutely no idea what to look for in the initramfs scripts or how to find the boot logs. But I'll be happy to look into those two matters if given a bit of guidance.
I don't understand the second part of your post - are you trying to say that the kernel is overriding the swap settings in the fstab? I have already established that there is absolutely no swap partition being used by "B".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.