Swap partition vs swap file?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Swap partition vs swap file?
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
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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Full-time Linux user since 2007, Mint since 2014
Re: Swap partition vs swap file?
I don't know the answer to that but would sure like to.
slightly off topic
slightly off topic
You actually can change the size of any partition later, Gparted is the preferred tool. (I did that just yesterday, I made it smaller)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.
Peter
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Re: Swap partition vs swap file?
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.
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?
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.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.
Peter
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Re: Swap partition vs swap file?
That's bizarre, considering how many people use a separate partition for /home. 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?
Full-time Linux user since 2007, Mint since 2014
Re: Swap partition vs swap file?
I don't know about announcements. This was my first LM install for a couple years or more.octathlon wrote: ⤴Wed Jun 06, 2018 3:08 pmThat's bizarre, considering how many people use a separate partition for /home. 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?
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.)
Peter
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Re: Swap partition vs swap file?
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.
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?
cool, I checked and my fstab looks normal with the sawp I intended to use... using the correct UUID
Peter
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Re: Swap partition vs swap file?
Sounds like everything will be fine, then!
Full-time Linux user since 2007, Mint since 2014
- JoeFootball
- Level 13
- Posts: 4674
- Joined: Tue Nov 24, 2009 1:52 pm
- Location: /home/usa/mn/minneapolis/joe
Re: Swap partition vs swap file?
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.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(?) ...
Joe
Re: Swap partition vs swap file?
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.
So you can keep having you setup the way you want, no pb.
Re: Swap partition vs swap file?
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.
If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Re: Swap partition vs swap file?
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.
Peter
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Mate desktop https://wiki.debian.org/MATE
Debian GNU/Linux operating system: https://www.debian.org/download
Re: Swap partition vs swap file?
I think I just misunderstood. 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.
Full-time Linux user since 2007, Mint since 2014
Re: Swap partition vs swap file?
Been there, done that... and yes, I agree on both counts.
If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
Re: Swap partition vs swap file?
I second that. I'd also love to see an automated creation processes for separate /home partition.Moem wrote: ⤴Fri Jun 08, 2018 3:03 pmAre 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?
The interesting thing is: when I suggested this, I got the impression that it might be in the cards:
If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!