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?
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.
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.
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.
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.
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).