Page 1 of 1

Mint 19 Swap File vs. old swap partition (SOLVED)

Posted: Tue Jun 12, 2018 7:44 pm
by winemaker9
I'm currently running 18.3 Cinnamon and am planning on upgrading to 19 when it is fully released.
I've heard that 19 will be using a swap file as opposed to the current swap partition.
Questions:
Will this happen automatically?
If not
Do I need to do something, is the swap file created on updating or can I continue using the swap partition OR
Can I manually get rid of the swap partition and move that space into the "/" with 'gparted'

One other thing, is the new swap file dynamically sized or static like the partition?
Is there anyplace that goes into this a little deeper?

Thanks

Re: Mint 19 Swap File vs. old swap partition

Posted: Wed Jun 13, 2018 2:15 am
by catweazel
winemaker9 wrote:
Tue Jun 12, 2018 7:44 pm
I've heard that 19 will be using a swap file as opposed to the current swap partition.
Mint 19 is beta software so it's unsupported. Post your comments and questions on the Mint blog.

Linux Mint 19 "Tara" Cinnamon – BETA Release
Linux Mint 19 "Tara" MATE – BETA Release
Linux Mint 19 "Tara" Xfce – BETA Release

Re: Mint 19 Swap File vs. old swap partition

Posted: Wed Jun 13, 2018 2:25 am
by xenopeek
Yes, a fresh install of Linux Mint 19 will create a swap file (/swapfile). AFAIK it is fixed size but you can relatively easily resize it (disable swap, resize file, enable swap) or just add another swap file in addition to the default one.

I noted the commands to create a swapfile here viewtopic.php?f=46&t=270961#p1480094. If you want to resize I think you just need to run sudo swapoff /swapfile first and then you can run those commands to recreate the swapfile of the size you want. You can skip the final step of editing /etc/fstab.

If you upgrade in place (using Update Manager's menu option for that, which become available shortly after final release of Linux Mint 19) I think you will retain your swap partition. Should you want to switch from using a swap partition to a swap file, we can help with that. It's as simple disabling the swap partiton (with swapoff command, and removing it from /etc/fstab) and then using above link to create a swap file.

Edit: if you're installing Linux Mint 19 with disk encryption it will set up a encrypted partition and use LVM to subdivide that into a root volume and a swap volume. So in this case you won't be using a swap file.

Re: Mint 19 Swap File vs. old swap partition

Posted: Wed Jun 13, 2018 4:04 am
by Pierre
you can also use the 'something else' option in the LM19 installer,
- to point to that existing old swap partition - - this did work for me, when trying out yet another installation of LM19.

Re: Mint 19 Swap File vs. old swap partition

Posted: Wed Jun 13, 2018 4:17 am
by Sir Charles
xenopeek wrote:
Wed Jun 13, 2018 2:25 am

If you upgrade in place (using Update Manager's menu option for that, which become available shortly after final release of Linux Mint 19) I think you will retain your swap partition.
I can confirm that. I have upgraded from 18.3 to 19 beta by means of a "home made" upgrade path and my existing swap partition is recognized and used without the creation of any additional swapfile in LM 19.

Re: Mint 19 Swap File vs. old swap partition

Posted: Wed Jun 13, 2018 4:25 am
by xenopeek
Just to allay any doubts; you can use a swap partition and/or swap file on any Linux Mint version. It's just that for Linux Mint 19, for installation without disk encryption, it now defaults to using a swap file.

Swap files are more flexible (much easier to resize or change).

Re: Mint 19 Swap File vs. old swap partition

Posted: Wed Jun 13, 2018 7:24 am
by Sir Charles
xenopeek wrote:
Wed Jun 13, 2018 4:25 am
Swap files are more flexible (much easier to resize or change).
I just wondered if installingdphys-swapfilecould be a viable alternative?