LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 12-31-2014, 05:44 AM   #1
onlyonemac
Member
 
Registered: Dec 2014
Distribution: Ubuntu MATE
Posts: 65

Rep: Reputation: Disabled
Question Hibernation and Linux-Linux Dual-boot


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?
 
Old 12-31-2014, 07:01 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
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.
 
1 members found this post helpful.
Old 12-31-2014, 08:29 AM   #3
onlyonemac
Member
 
Registered: Dec 2014
Distribution: Ubuntu MATE
Posts: 65

Original Poster
Rep: Reputation: Disabled
"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.
 
Old 12-31-2014, 08:46 AM   #4
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
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.
 
Old 12-31-2014, 08:54 AM   #5
onlyonemac
Member
 
Registered: Dec 2014
Distribution: Ubuntu MATE
Posts: 65

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Teufel View Post
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.
 
Old 12-31-2014, 09:21 AM   #6
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
You might to try to instruct your "B" system to use swap only in critical cases to prevent out-of-memory:
Code:
echo 0 > /proc/sys/vm/swappiness
and see whould it help.
 
Old 12-31-2014, 11:38 AM   #7
onlyonemac
Member
 
Registered: Dec 2014
Distribution: Ubuntu MATE
Posts: 65

Original Poster
Rep: Reputation: Disabled
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)?
 
Old 12-31-2014, 10:49 PM   #8
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
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.

Last edited by veerain; 12-31-2014 at 10:51 PM.
 
Old 01-01-2015, 01:43 PM   #9
onlyonemac
Member
 
Registered: Dec 2014
Distribution: Ubuntu MATE
Posts: 65

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
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".
 
  


Reply

Tags
dual-boot, hibernation, linux, swap, swapfile



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Messed up boot sector - dual boot linux 64bit and linux 32bit littlejoe5 Linux Mint 17 12-02-2014 02:48 PM
Dual boot Linux Suse 10.0/Windows XP Pro, Linux non-boot novice-user LinuxQuestions.org Member Intro 1 05-29-2009 01:54 PM
Installing dual Boot 98/Linux - WONT 'LILO' Dual Boot !? L1nux3d Linux - Laptop and Netbook 15 02-11-2006 05:36 AM
dual boot - XP and Linux - Need to reinstall XP without effecting linux -LILO boot godofmind Linux - General 1 05-05-2004 08:13 AM
Linux Boot Floppy Went Bad on W2K-Linux Dual Boot rzward Linux - General 2 01-15-2003 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration