I have two linux installs on my computer. Linux Mint 18 for general use and Subgraph OS because I think the concept sounds cool. I also have a Windows 10 partition for playing games that require recent versions of direct x

(Subgraph OS is still in alpha and using tor for everything makes it really slow online so I don't think I will use this much for now)

I want to have the linux mint install and the subgraph OS install use different swap partitions. How do I set this up? They both try to read each other's swap at the moment and it makes booting linux mint hang sometimes.

  • It is just a matter of create them on its installers(say, /dev/sda5 Mint Swap, and /dev/sda6 for Subgraph), and use different lines on their /etc/fstab
    – user34720
    Commented May 30, 2017 at 19:09
  • 1
    If I were you I would use the same swap partition for both. By construction when one's using the swap space the other isn't. If there are two, one of them is wasted.
    – Celada
    Commented May 30, 2017 at 19:24
  • @Celada, unless they're using suspend to disk (swap)
    – ilkkachu
    Commented May 30, 2017 at 19:51
  • Ok I managed it by editing the /etc/fstab files of each install and turning swap on and off. The difficulty is that both want to use different encryption keys.
    – Huw Evans
    Commented May 30, 2017 at 20:24
  • So now the /etc/fstab file of each install is the way I want it but on boot they still try to use both swap partitions. If I use sudo swapoff --all then sudo swapon --all THEN they just use the partition I want them to.
    – Huw Evans
    Commented May 31, 2017 at 12:03

1 Answer 1


I bet your problem is that you hibernate (suspend to disk) one kernel and then boot the other. This wouldn't work. Don't try to solve it by using different swap partitions for different systems. This will corrupt your filesystem(s) badly once the hibernated OS wakes up and tries to write some files after the other OS had manipulated the filesystem. You only can do it without risk of data loss if you make sure that you will not mount a filesystem already mounted by a hibernated kernel.

That being said, the partitions used for swap are configured in /etc/fstab.

  • Nothing is actually broken and I'm not in the habit of hibernating my system. The issue is just that I am asked for a decryption passphrase for the swap partitions every time I start mint which is kind of annoying.
    – Huw Evans
    Commented May 31, 2017 at 11:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .