swapfile not created if user selects 'something else' during install

Bug #2000594 reported by Matthew Eaton
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

A swapfile is not created when the user selects 'something else' and creates a custom partition layout during installation. A swapfile is created using the 'erase disk and install ubuntu' option.

Steps to reproduce:
Boot to Ubuntu 22.04.1 installer
Select 'Something else" during installation
Create EFI system partition
Create root ext4 partition
Finish installation and reboot

ubuntu2@ubuntu2-Z690-AORUS-PRO:~$ ls -l /swapfile
ls: cannot access '/swapfile': No such file or directory

ubuntu2@ubuntu2-Z690-AORUS-PRO:~$ free -h
               total used free shared buff/cache available
Mem: 31Gi 1.2Gi 27Gi 493Mi 2.0Gi 29Gi
Swap: 0B 0B 0B

ubuntu2@ubuntu2-Z690-AORUS-PRO:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=54c4ff2f-6029-49dd-8548-53755871011f / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=2E7B-F985 /boot/efi vfat umask=0077 0 1

ubuntu2@ubuntu2-Z690-AORUS-PRO:~$ lsb_release -rd
Description: Ubuntu 22.04.1 LTS
Release: 22.04

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: ubiquity (not installed)
ProcVersionSignature: Ubuntu 5.15.0-56.62-generic 5.15.64
Uname: Linux 5.15.0-56-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Tue Dec 27 11:28:48 2022
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
InstallationDate: Installed on 2022-12-27 (0 days ago)
InstallationMedia: Ubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809.1)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Matthew Eaton (meaton) wrote :
Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Mostly an FYI, but there are cases where swapfile isn't wanted, for example an install where swap partition is created or just (re-)used (swap partitions can be more easily shared between OSes if dual booting).

I know with a flavor install I also QA-tested an install where an existing swapfile was re-used (ie. no format of partition; alas with Lubuntu which uses calamares not ubiquity; but I'd expect the same for both; that repair/re-install is not a testcase for Ubuntu Desktop so I can't recall when last tested with Ubuntu Desktop)

Revision history for this message
Matthew Eaton (meaton) wrote :

Yes those are all fair points. I just wanted to bring this up because this is different behavior than Ubuntu 20.04 which created a swap file if 'something else' was selected during install. If this is intended behavior then I'm okay with that too.

Revision history for this message
Kelvin Arruda Silva (kelvin-k-as) wrote :

Hey,

I always use 'something else' for installations. And the swapfiles were always created. I liked this behavior, it avoided creating a partition.

 On Ubuntu 22.04 this behavior doesn't occur, should I create a swap partition when selecting 'something else'? Or create swapfiles manually post install?

What's the recommendation?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.