9 ms·
I think you're wrong on every single point you make. > Of what distro? Of any distro. I have done such configs with Ubuntu, Debian, openSUSE, SLE, Fedora, Cen
by lproven 5d ago
I think you're wrong on every single point you make.
> Of what distro?
Of any distro. I have done such configs with Ubuntu, Debian, openSUSE, SLE, Fedora, CentOS, RHEL, Alpine, Arch, you name it.
> If you mean that the example code shows the swapfile directly under / , well of course you don't have to do it that way.
Point missed. If you have a swap file created by the installer then you do not get to specify where that swapfile is, in any distro I have seen in my 30 years of working with Linux and 38 years of Unix. (Not that swap files were common on Unix in the 20th century.)
If you specify a swap partition then you choose where it is.
> I think this is untrue on both counts. First, nobody is going to dedicate an entire physical device to swap,
Incorrect assumption. You inserted "entire device" but I did not say that. A swap partition is part of a device. The clue is there in the name.
All my Thinkpads, for example, have 2 SSDs and typically I put root on the faster SSD and /home and swap on the slower SSD (or HDD). I typically configure 4-8GB of swap even if the machine has 32GB or more of RAM -- I rarely hibernate these boxes, TBH. That is plenty. If you hibernate, swap should be at least as big as RAM, or maybe 10-20% bigger in case it's already swapping when you hibernate.
> If the device is "separate" (from what, / ?)
Yes. More or less all typical Unix-like OSes read and write a lot to and from root in use, and under load, from swap. So, put them on different physical drives and spread the load.
This has been standard practice since the 1960s!
> But also it's trivial to put a swapfile on whatever device you want. It can be anywhere reasonably sane in the filesystem, you just give it a path.
It's extra manual config. A partition is one box in the installer and done. Zero manual config.
> The file could go on whatever partition the distros can share.
Again, you miss the point.
1. Distros do not by default mount one another's partitions.
> Maybe put it under /home or something.
You can but suddenly permissions and ownership become issues.
> It's your system, the FHS is up to your own interpretation.
It is preferable to do this in the installer and not worry about interpreting anything.
> Why would that matter? You're expecting a file not to survive the low-power state?
Have you read the other comments?
- zahlman 4d ago> If you have a swap file created by the installer then you do not get to specify Why should we care about what the installer does when it's trivial to change later? You said this is "bad advice, except for very simplistic scenarios" but people not in "very simplistic scenarios" are perfectly capable of running a few shell commands. Aside from which, typical home users are in very simplistic scenarios. The Mint installer defaults to a single partition aside from what's required for booting, and a swapfile at /swapfile. And tons of Mint users are doing just fine with that. They are not realistically going to distro-hop because it won't realistically solve any problems for them. Your overall argument seems to depend on accommodating some hypothetical power users who nevertheless want the installer to get it right for them. But in this case, why not petition the distro to improve the installer instead? > This has been standard practice since the 1960s! And? the point here is to identify a benefit of putting swap on a carefully chosen partition that cannot be realized by putting swap on a file at a carefully chosen path (since that choice also implicitly puts it on a specific partition). > You can but suddenly permissions and ownership become issues. I can't fathom why. I said /home, not ~. > Point missed. ... Incorrect assumption. ... Have you read the other comments? I consider this sort of commentary incivil (and the commenting guidelines support me in this). I also did not make an assumption at all; I considered one of two alternative meanings without introducing it with the word "if". That's why the second possibility does start with "if". This is just a rhetorical technique, dismissing the most absurd interpretations first exactly because they are easier to dismiss.