Calamares automatically creates swapfile with manual partitioning without any warning

Bug #2062060 reported by ԜаӀtеr Ⅼарсһуnѕkі
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Calamares
New
Unknown
calamares (Ubuntu)
Triaged
High
Unassigned
calamares-settings-ubuntu (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

In Calamares, when doing Manual Partitioning, there is no option to choose whether or not to create a swapfile as there is with the Erase Disk option. Instead, one would need to create it outside of the installer. However, a swapfile is created nonetheless. This is neither indicated in the Partitions panel, nor in the Summary panel, as one would expect.

This appears to be caused by the `initialSwapChoice` value in /etc/calamares/modules/partition.conf which is set to `file`. Changing it to `none` eliminates the issue.

So there are two things that need to be fixed here:
 1. Calamares itself needs a change, including one or more of:
    1. Provide an option in Manual Partitioning to choose swapfile options
    2. Show the creation of swapfiles in the Summary panel
    3. Don't consider the value of `initialSwapChoice` when doing Manual Partitioning
 2. calamares-settings-ubuntu should change the value of `initialSwapChoice` to `none`, at least while these bugs in Calamares exist

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: calamares 3.3.5-0ubuntu3
ProcVersionSignature: Ubuntu 6.8.0-22.22-generic 6.8.1
Uname: Linux 6.8.0-22-generic x86_64
.etc.calamares.modules.after_bootloader_context.conf:
 ---
 dontChroot: false
 timeout: 120
 firmwareType:
     "*": "-rm ${ROOT}/home/${USER}/Desktop/lubuntu-calamares.desktop"
.etc.calamares.modules.finished.conf:
 ---
 restartNowMode: user-checked
 restartNowCommand: "systemctl -i reboot"
.etc.calamares.modules.fstab.conf:
 crypttabOptions: luks,keyscript=/bin/cat
 efiMountOptions: umask=0077
.etc.calamares.modules.shellprocess_logs.conf:
 ---
 dontChroot: true
 timeout: 30
 script:
     - calamares-logs-helper ${ROOT}
.etc.calamares.modules.unpackfs.conf:
 ---
 unpack:
     - source: "/cdrom/casper/filesystem.squashfs"
         sourcefs: "squashfs"
         destination: ""
ApportVersion: 2.28.0-0ubuntu1
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.496
CurrentDesktop: LXQt
Date: Wed Apr 17 12:48:11 2024
LiveMediaBuild: Lubuntu 24.04 LTS "Noble Numbat" - Beta amd64 (20240415)
RelatedPackageVersions:
 calamares-settings-ubuntu-common 1:24.04.28
 calamares-settings-lubuntu 1:24.04.28
 xfsprogs 6.6.0-1ubuntu2
 btrfs-progs 6.6.3-1.1build2
SourcePackage: calamares
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :
Changed in calamares-settings-ubuntu (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in calamares (Ubuntu):
assignee: Lubuntu Developers (lubuntu-dev) → nobody
milestone: ubuntu-24.04 → none
Changed in calamares-settings-ubuntu (Ubuntu):
assignee: nobody → Lubuntu Developers (lubuntu-dev)
milestone: none → ubuntu-24.04
Changed in calamares-settings-ubuntu (Ubuntu):
status: Triaged → Won't Fix
milestone: ubuntu-24.04 → none
assignee: Lubuntu Developers (lubuntu-dev) → nobody
importance: High → Undecided
Revision history for this message
Aaron Rainbolt (arraybolt3) wrote (last edit ):

There's not really any good way around this. The default behavior in the old Ubiquity installer was (IIRC):

* Don't create a swapfile by default when doing manual partitioning.
* Create a swapfile by default for any other installation mode.

With Calamares, we only have two options that aren't the same as this behavior:

* Always create swap unless using Erase Disk mode and the user explicitly turns it off
  OR
* Never create swap unless using Erase Disk mode and the user explicitly turns it on

Both of these are different from Ubiquity's behavior. Going with "never create swap" has slightly more danger than going with "always create swap", and it has a higher chance of confusing a user who's used to Ubiquity.

At some point (perhaps for the OO cycle), we should try and get in a feature that allows the user to customize which filesystem they want the swapfile to be on, like wxl mentioned. That would be my favorite solution, though it's too late to try it for this cycle.

In the short term, we may need to just release note this bug and try to fix it via an SRU to add some notice that a swapfile is being created on the Summary screen, or disable swapfile creation when using manual partitioning (both options that wxl covered above).

Revision history for this message
ԜаӀtеr Ⅼарсһуnѕkі (wxl) wrote :

I'm slowing my roll about changing the configuration. After discussing this further, there are a couple reasons why this is probably bad:

 1. It will mean that users used to using the Erase Disk option in Lubuntu will not get a swapfile by default. This goes against expected behavior.
 2. Ubiquity installs a swapfile by default, so we'd be deviating from the canonical behavior in Ubuntu.
 3. It's likely much easier to get a user doing manual partitioning (who we assume is a bit more sophisticated) to remove a swapfile than it is to get a less experienced user to install one.

Changed in calamares:
status: Unknown → New
To post a comment you must log in.