I used to have a swap partition on an old HDD, but that drive is now dead. Instead of creating a new swap partition on my main hard drive, I decided to create a swapfile instead. This works fine, only a little performance is lost compared to making a swap partition on the same drive, and it avoids dangerous and tedious partition resizing.
However, in /etc/rc.sysinit, the swap space is activated before the root filesystem is mounted with RW permissions, which means that activation of swap fails for swapfile-based configurations. The resolution to this problem is, of course, just a matter of relocating the single-line statement in question to a spot further down in the file, but it is still kind of annoying to have to do this.
I am thinking about filing a bug report about this problem, but before I do, I was just wondering if there is any particular reason why the script is set up in this way. Is it just a mistake, or is there some special consideration I have failed to take into account? I would think not, the only obvious problem would be the possibility of running out of memory before the filesystems are mounted, which should not be a concern for a distribution that only runs on i686 computers.
I am thinking about filing a bug report about this problem, but before I do, I was just wondering if there is any particular reason why the script is set up in this way.
Sounds like an oversight to me, feel free to file it and you'll find out. :-)
Yeah, well... I just didn't want to waste anybody's time. It's possible to miss something stupidly obvious and make a fool out of yourself (especially for me ), so I thought I'd better get a second opinion.
It's kind of funny how you don't generally tend to hear much about swapfiles under Linux. They're really good under certain situations, and the support for them is built right into the system, there's no need to do any arcane rituals to get it working... then again, it is the preferred choice in the Windows world, which many people seem to use as the benchmark for stupid decisions. I can't think why!