You are not logged in.

#1 2018-01-28 00:11:58

synkka_maan
New Member
Registered: 2015-10-02
Posts: 4

Swap for multiple distros

Hi,

I seem to have made a silly assumption with my recent install. I decided to install Void Linux alongside my Bunsen Labs partition, and I figured I would try Arch some day as well.

I figured that each distro would need its own dedicated Swap space, and that these would automatically link to the relevant partition. But of course, now when I boot Bunsen Labs, I have to wait 1min 30s because Bunsen Labs isn't linked to any of the Swap's that I setup.

Any advice on how to resolve this would be appreciated.

Thanks.

Offline

#2 2018-01-28 00:20:06

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Swap for multiple distros

First run this command:

systemctl --type swap

Then use

sudo systemctl mask $unit

Replace $unit with the actual unit file names given in the output of the first command.

Be sure not to mask the swap unit file used by BunsenLabs though wink

Offline

#3 2018-01-28 00:31:47

nobody
The Great
Registered: 2015-08-10
Posts: 3,655

Re: Swap for multiple distros

Specify a swap partition as a pseudo-mount in /etc/fstab like so

/dev/zram0 none swap defaults 0 0

where you replace /dev/zram0 with the partition's device path. It'll recognize the swapspace without delay when you reboot. You may use a UUID in place of the path too.

Offline

#4 2018-01-28 10:03:19

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Swap for multiple distros

i don't multiboot much, but some installers don't like to use an existing swap partition so i have to check all installed distros' fstabs and adjust UUIDs.

Offline

#5 2018-01-28 13:38:22

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Swap for multiple distros

^ & ^^ some users prefer separate swap partitions for each distribution and in that situation masking the superfluous unit(s) is the correct approach for a GPT disk booted with systemd.

Offline

#6 2018-02-05 03:24:55

synkka_maan
New Member
Registered: 2015-10-02
Posts: 4

Re: Swap for multiple distros

twoion wrote:

Specify a swap partition as a pseudo-mount in /etc/fstab like so

/dev/zram0 none swap defaults 0 0

where you replace /dev/zram0 with the partition's device path. It'll recognize the swapspace without delay when you reboot. You may use a UUID in place of the path too.

I followed your advice, using this is a guide, http://www.linuxstall.com/fstab/
A quick change to the UUID and now both distros boot beautifully. big_smile

Offline

Board footer

Powered by FluxBB