Partitions are automounted / Subiquity didn't display all my drives

Bug #2063192 reported by Simon Chopin
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
subiquity
Invalid
Undecided
Unassigned
ubuntu-desktop-provision
Fix Released
Undecided
Unassigned
livecd-rootfs (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

On the system I'm trying to install Ubuntu Desktop 24.04, there are multiple drives attached: 2 NVMe 1TB drives (nvme0n1 and nvme1n1), 1 SATA 256G SSD, 2 HDD (3TB and 4TB) in an USB enclosure (sdb and sdc), and the USB stick with the installation media.

When selection full disk install, the drop down doesn't have any reference to sdb.

Looking at the disk layouts, sdc has its filesystem directly on the drive while sdb has a standard GUID partition scheme with a single large partition, sdb1. Both disks were automatically mounted by Gnome.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: subiquity (unknown)
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.498
CloudArchitecture: x86_64
CloudID: nocloud
CloudName: unknown
CloudPlatform: nocloud
CloudSubPlatform: seed-dir (/var/lib/cloud/seed/nocloud)
CurrentDesktop: ubuntu:GNOME
Date: Tue Apr 23 08:37:14 2024
DesktopInstallerRev: 165
LiveMediaBuild: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240422.1)
ProcEnviron:
 LANG=C.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: subiquity
Symptom: installer
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Simon Chopin (schopin) wrote :
Revision history for this message
Simon Chopin (schopin) wrote :
Revision history for this message
Simon Chopin (schopin) wrote :
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/2063192

tags: added: iso-testing
Revision history for this message
Olivier Gayot (ogayot) wrote :

After investigating, here are my observations:

1. Partitions should not be automounted by gnome. There is supposed to be code in the desktop installer to prevent this from happening. I wonder if a time issue is causing the partitions to be automounted before the code is executed?

2. There is something inconsistent between sdc in the list of guided reformat scenarios but not sdb. IMO since both devices have a mounted filesystem (one at the disk level and the other at a partition level) they should both be excluded from the guided reformat scenarios.

* sdb is not considered a valid boot disk
  -> get_boot_device_plan(Disk(id=sdb)._reformatted()) returns False
* sdc is considered a valid boot disk
  -> get_boot_device_plan(Disk(id=sdc)._reformatted()) returns True

(the _reformatted() method returns a new instance of the disk descriptor with all partitions /that are not in use/ removed)

* For sdb, such disk would have partitions=[Partition(id=sdb1)] since sdb1 is in use
* For sdc, such disk would have partitions=[] since it has no partition.

I believe the get_boot_device_plan() forgets to look if the disk is "in use" ; i.e., if it contains a filesystem (not in a partition) that is already mounted.

Revision history for this message
Olivier Gayot (ogayot) wrote :

It looks like ubuntu-desktop-installer.service started after udisksd mounted partitions.

Apr 23 08:28:14 ubuntu udisksd[2405]: Mounted /dev/sdc at /media/ubuntu/BulkData on behalf of uid 1000
Apr 23 08:28:14 ubuntu kernel: EXT4-fs (sdb1): mounted filesystem a10530a3-4e0b-48f7-bf85-8c7cc57253cf r/w with ordered data mode. Quota mode: none.
Apr 23 08:28:14 ubuntu udisksd[2405]: Mounted /dev/sdb1 at /media/ubuntu/Data on behalf of uid 1000
Apr 23 08:28:14 ubuntu dbus-daemon[3245]: [session uid=1000 pid=3245] Successfully activated service 'org.gnome.evolution.dataserver.Calendar8'
[...]
Apr 23 08:28:18 ubuntu systemd[3216]: Starting ubuntu-desktop-installer.service - Ubuntu Desktop Installer...

Revision history for this message
Sebastien Bacher (seb128) wrote :

The inhibit is currently set up by the ubuntu-desktop-provision start script

https://github.com/canonical/ubuntu-desktop-provision/blob/main/ci/snap/bootstrap/local/launcher#L43

It feels like that's the sort of thing that should be part of the iso and generated by livecd-rootfs instead or is there any reason to not do it there?

Revision history for this message
Simon Chopin (schopin) wrote :

If a user is blocked by this because their drive is excluded, a workaround is to unmount the affected drive, and go back on the installer to refresh the list (not sure if that is even needed)

Olivier Gayot (ogayot)
summary: - Subiquity didn't display all my drives
+ Partitions are automounted / Subiquity didn't display all my drives
Revision history for this message
Dan Bungert (dbungert) wrote :

Marking fix released for livecd-rootfs, as the change was accepted.
Marking invalid for subiquity - if we anticipate further changes are needed, then let's discuss, but I'm not sure what that would be at this time.

Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
Changed in subiquity:
status: New → Invalid
Revision history for this message
Dan Bungert (dbungert) wrote :

Marking fix released for ubuntu-desktop-provision as this is present in the current ISO. If this is not the desired state, please correct.

Changed in ubuntu-desktop-provision:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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