Page 1 of 1

Swap partition vs swap file?

Posted: Wed Jun 06, 2018 1:06 pm
by octathlon
I am still on Mint 17.2, planning to do a fresh install of 19 when it comes out. I read that instead of the usual swap partition, Mint now uses a swap file by default. Apparently this started sometime in version 18(?), but I haven't been able to find very much info on the implications.

I already have a swap partition, plenty of disk space available, and see no advantage to switching to a file, other than the ability to change its size later.

My questions are:
1. Will I be able to continue using my swap partition instead of a file, by mapping the partition to /swap at install as in the past?

2. If yes, then is there any reason I shouldn't just stick with my traditional swap partition?

Any other comments on file vs. partition welcome :)

Re: Swap partition vs swap file?

Posted: Wed Jun 06, 2018 1:55 pm
by sdibaja
I don't know the answer to that but would sure like to.


slightly off topic
I already have a swap partition, plenty of disk space available, and see no advantage to switching to a file, other than the ability to change its size later.
You actually can change the size of any partition later, Gparted is the preferred tool. (I did that just yesterday, I made it smaller)

Re: Swap partition vs swap file?

Posted: Wed Jun 06, 2018 2:24 pm
by pbear
I've only just started my research on the topic, but my preliminary understanding is that the main motivation for the switch to swap file (which apparently came in with Ubuntu 17.04) is simplicity. Main disadvantage is that it's complicated to set up for hibernation.

Pretty sure you'll still be able to use a swap partition, but haven't seen anything indicating exactly what steps to follow.

Re: Swap partition vs swap file?

Posted: Wed Jun 06, 2018 2:49 pm
by sdibaja
pbear wrote:
Wed Jun 06, 2018 2:24 pm
I've only just started my research on the topic, but my preliminary understanding is that the main motivation for the switch to swap file (which apparently came in with Ubuntu 17.04) is simplicity. Main disadvantage is that it's complicated to set up for hibernation.

Yes, you can still use a swap partition, but you'll have to do a custom ("Something Else") installation.
I did try "Something Else" with the M19 Beta... there no provision for even a /home partition ... I Did It but the contortions I needed to go thru were unreasonable. Maybe the older versions have a better installer.

Re: Swap partition vs swap file?

Posted: Wed Jun 06, 2018 3:08 pm
by octathlon
sdibaja wrote:
Wed Jun 06, 2018 2:49 pm

I did try "Something Else" with the M19 Beta... there no provision for even a /home partition ... I Did It but the contortions I needed to go thru were unreasonable. Maybe the older versions have a better installer.
That's bizarre, considering how many people use a separate partition for /home. :shock: Has there been any announcement about the change? I've watched a bunch of videos on the Beta and no one has mentioned that.
What did you do, then? Manually edit fstab to add it?

Re: Swap partition vs swap file?

Posted: Wed Jun 06, 2018 4:37 pm
by sdibaja
octathlon wrote:
Wed Jun 06, 2018 3:08 pm
sdibaja wrote:
Wed Jun 06, 2018 2:49 pm

I did try "Something Else" with the M19 Beta... there no provision for even a /home partition ... I Did It but the contortions I needed to go thru were unreasonable. Maybe the older versions have a better installer.
That's bizarre, considering how many people use a separate partition for /home. :shock: Has there been any announcement about the change? I've watched a bunch of videos on the Beta and no one has mentioned that.
What did you do, then? Manually edit fstab to add it?
I don't know about announcements. This was my first LM install for a couple years or more.

No editing of fstab, I did not even look. I will to see if there is a swap file.
My notes are tied up on that machine, but from memory... I quit the installer, used Gparted to create the required partitions, then running the installer again I selected them, changing the properties with right click options.... specifically not formatting any (to preserve my labels) and choosing ignore for all of the swap partitions except the one I created for M19 (being concerned that they would be formatted changing the UUIDs, forcing me to edit fstab on 4 or 5 other distros on that machine.)

Re: Swap partition vs swap file?

Posted: Wed Jun 06, 2018 5:53 pm
by pbear
Hey sdibaja. Notice I edited my prior post while you were in the process of replying. Sorry about that. Made the change because I THINK I saw the suggestion about Something Else installation somewhere last evening, but not certain (might have been inference) and don't recall where.

Anyhoo, I'm now giving it a test. Seems to work, actually. At least, acknowledged I had set up a swap partition (and also allowed me to designate root and home mount points). Same installer as 18.x, by the way, though maybe different from the one you used in the past.

Will post back when the install completes, but felt I should make this post to clarify the confusion (my fault) about the prior post.

ETA: Install now complete without a hitch. fstab shows swap on a partition, root and home mounted on their partitions. Not sure what you did differently, but that's the problem, not any inherent impediment to using a swap partition in LM19.

Re: Swap partition vs swap file?

Posted: Wed Jun 06, 2018 6:29 pm
by sdibaja
cool, I checked and my fstab looks normal with the sawp I intended to use... using the correct UUID

Re: Swap partition vs swap file?

Posted: Wed Jun 06, 2018 9:44 pm
by octathlon
Sounds like everything will be fine, then! :mrgreen:

Re: Swap partition vs swap file?

Posted: Thu Jun 07, 2018 4:03 pm
by JoeFootball
octathlon wrote:I read that instead of the usual swap partition, Mint now uses a swap file by default. Apparently this started sometime in version 18(?) ...
It's my understanding that this feature started with Ubuntu 17.04. Since Linux Mint 18.x was built on Ubuntu 16.04, it didn't appear until Linux Mint 19.

Joe

Re: Swap partition vs swap file?

Posted: Fri Jun 08, 2018 1:40 pm
by fabien85
Yes indeed, everytime I installed Mint 18.x it created by default a swap partition. I tried Xubuntu 18.04 and Mint 19 beta and they use a swap file, but you can force them to use a swap partition using the "something else" option in the installer. With that option you can also have a separate /home, it works as it always used to.
So you can keep having you setup the way you want, no pb.

Re: Swap partition vs swap file?

Posted: Fri Jun 08, 2018 3:03 pm
by Moem
octathlon wrote:
Wed Jun 06, 2018 3:08 pm
sdibaja wrote:
Wed Jun 06, 2018 2:49 pm
I did try "Something Else" with the M19 Beta... there no provision for even a /home partition ... I Did It but the contortions I needed to go thru were unreasonable. Maybe the older versions have a better installer.
That's bizarre, considering how many people use a separate partition for /home. :shock: Has there been any announcement about the change?
Are we sure this is a change? I've always had to make a /home partition by hand (Mint 17 and 18).
I would very much like to see an option for automated creation of a separate /home partition... doesn't even have to be default or recommended, just available.

Re: Swap partition vs swap file?

Posted: Fri Jun 08, 2018 3:42 pm
by sdibaja
Moem wrote:
Fri Jun 08, 2018 3:03 pm
>snip<
Are we sure this is a change? I've always had to make a /home partition by hand (Mint 17 and 18).
I would very much like to see an option for automated creation of a separate /home partition... doesn't even have to be default or recommended, just available.

Perhaps the Mint 19 installer is different than years past. I don't know. I forget.

Moem: just for grins download MX Linux and try their installer. I think it is pretty slick...
but maybe it is not "user friendly" for the typical LM user.

Re: Swap partition vs swap file?

Posted: Fri Jun 08, 2018 3:44 pm
by octathlon
Moem wrote:
Fri Jun 08, 2018 3:03 pm
Are we sure this is a change? I've always had to make a /home partition by hand (Mint 17 and 18).
I would very much like to see an option for automated creation of a separate /home partition... doesn't even have to be default or recommended, just available.
I think I just misunderstood. :oops: I thought sdibaja was saying that "something else" didn't give you the option to point /home or /swap to a different partition any more. But from the other responses here, it sounds like "something else" still works the same, no changes.

Re: Swap partition vs swap file?

Posted: Fri Jun 08, 2018 3:45 pm
by Moem
sdibaja wrote:
Fri Jun 08, 2018 3:42 pm
Moem: just for grins download MX Linux and try their installer. I think it is pretty slick...
but maybe it is not "user friendly" for the typical LM user.
Been there, done that... and yes, I agree on both counts.

Re: Swap partition vs swap file?

Posted: Sat Jun 09, 2018 7:09 am
by diesel79
Moem wrote:
Fri Jun 08, 2018 3:03 pm
octathlon wrote:
Wed Jun 06, 2018 3:08 pm
sdibaja wrote:
Wed Jun 06, 2018 2:49 pm
I did try "Something Else" with the M19 Beta... there no provision for even a /home partition ... I Did It but the contortions I needed to go thru were unreasonable. Maybe the older versions have a better installer.
That's bizarre, considering how many people use a separate partition for /home. :shock: Has there been any announcement about the change?
Are we sure this is a change? I've always had to make a /home partition by hand (Mint 17 and 18).
I would very much like to see an option for automated creation of a separate /home partition... doesn't even have to be default or recommended, just available.
I second that. I'd also love to see an automated creation processes for separate /home partition.

Re: Swap partition vs swap file?

Posted: Sat Jun 09, 2018 7:16 am
by Moem