When installing Lubuntu 21.10, the Calamares installer GUI indicated the size of the Swap file would be 4Gb, but when this was checked afterwards, it shows 512Mb, which is what is described in the 21.10 Release Notes post.
Would the indication of a 4Gb Swap in the installer, be a bug?
Do you happen to have a screenshot that indicates that it will install using a 4GB swap? I don’t know that I have seen that before. Also, you did choose the “erase disk” option correct?
Yes, I chose the ‘erase disk’ option, it used the entire HDD. I do not have a screenshot of it, as did not think to take a picture of the GUI text referencing 4Gb. I have Lubuntu installed on two desktops and the other system also shows a 512Mb Swap, this other system has 8Gb of RAM installed.
I made sure to look at the screen when I installed it on the second system, then noticed the 512Mb size after it was installed.
Here are pictures of the installer on this system (with 8Gib RAM installed) as well as an htop screen. The installer indicates it will create a 7.7GiB Swap, but it only created 512MiB.
The installer can be used to create the following swap cases
swap partition of any size (as it’s manually done, either by you using pre-existing swap partition(s) or creating one and using it).
swap file of 512MB (21.04 & later)
There is no capacity within calamares (the installer used by Lubuntu) to use a different size of swap file than the default. That will hopefully change (in the future); but it’s just what it is currently.
If it indicated 4GB (on most screens no size is given since it’s not changeable), we’d need a picture or clues to chase up a bug, as currently that’s not possible with the calamares installer.
Attached is a picture of the installer running on my other desktop and a screenshot of htop from it.
Now that I have looked at both sets of pictures, the installer is incorrectly detecting the size of the current Swap partition on both systems. The installer also created a 512Mb Swap on this other desktop, not 4Gb as indicated.
Those screenshots both look like they were reusing an existing partition scheme. The erase disk would remove the entire partition scheme and only create what it needs for /boot and / (root dir.). The swap it creates is a file so it will not show on that screen since it is not a separate partition, it is contained in / or the root directory. The erase option may not show if you have an existing swap, you would need to unmount that before you begin the installer. Please refer to the note in our manual page.
Running the installer against the currently-installed Lubuntu, as well as against the previously-installed Debian, I was presented with only three options for both systems:
Install alongside
Replace partition (what I selected to install Lubuntu on both)
Manual partitioning
If the installer is using the existing partition scheme, then it should have displayed it would create a 512Mb swap, not 4.0Gb and 7.0Gb.
The “partitions” screen is (surprise, surprise) showing the partitions. If there is a swap partition, the swap partition is shown. The swap file is (surprise, surprise) not a partition.
Ideally, Calamares would reuse the existing swap partition instead of creating a swap file.
There is also a “summary” screen. On this screen, it could make sense to show, that a swap file is created.
Some people call it a swap file, some call it a partition, others say it either. Just ask Google.
My point is: the installer displayed it would create a considerably larger Swap than was actually created, which would appear to be a bug/defect in the installer.
swapfiles and swap partitions are 2 different things. This forum post discusses a little about the difference. The swap partitions you see in the summary page are leftover from your previous install, they were not created by Calamares. When you select reuse existing partition it only impacts the partition you selected and leaves all of the other ones untouched.
And it was Debian that created the larger swap files/partitions on the systems. So Calamares must have replaced that larger swap with the smaller 512Mb, when it installed Lubuntu.
Swap files and swap partitions are different. calamares will both happily use both (my systems often have both, swap partition being shared by my dual-boot systems), but certain options of install will cause existing swap partitions to be erased.
Many of my observations with swap files can be found here on a link I’d already posted.
We do QA-test installs that re-use swap partitions, though much of the QA checklist involves full disk installs that erase everything thus only the default 512MB swap file will exist post-install.
In my experience the installer will do whatever you instruct it, but yeah it’s silent in some options and could give more detail (in those cases it will re-use swap file where not formatted, or create swap file (512MB) if format). It’s the silence on some options that caused me to create the aforementioned wiki link (where you might note I use language used in our QA-checklist).
So it sounds like the Erase Disk option would have provided a much larger swap? On both systems, the installer did not offer this option, only the other three.