ubiquity-gtk installer crashes in focal 20.04.02 after partitioning due to existing EFI partition

Bug #1926672 reported by Pablo Hörtner
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In focal 20.04.02 the ubiquity-gtk installer (20.04.15.11/focal-updates) always crashes after the partition step.

Although this seems to be an old bug, I could not find a relevant bug report so far.

I am having this issue when installing Ubuntu 20.04 to removable media from an existing Ubuntu 20.04 system. I could reproduce the issue on a PC in UEFI mode and on another one in BIOS mode. Before reporting this bug, I tested the installer on both Live USB media and internal disks.

How to reproduce?

1. The install medium needs to be writable (i.e. no CD/DVD) and contain a mounted EFI partition (e.g. /dev/sda1), while the target presumably needs to be a removable medium or a secondary disk.
2. sudo --preserve-env=DBUS_SESSION_BUS_ADDRESS,XDG_RUNTIME_DIR sh -c 'ubiquity gtk_ui'
3. In the ubiquity installer create a GPT partition on the target medium (e.g. /dev/sdb) containing an EFI partition (e.g. /dev/sdb1) and a root partition (e.g. /dev/sdb2), and set the Grub target ("boot disk") accordingly.
4. The installer will ask for confirmation, stating that the partition table of both disks will change and that the two newly created partitions will be formatted. In case of an existing swap partition on the primary disk, this partition will also be formatted (which I consider another bug).
5. After the crash, you can notice that
   a. the new system has been partially installed, as /target (e.g. /dev/sdb2) is mounted and contains 329 MB
   b. the EFI partition of the install medium or primary disk (e.g. /dev/sda1) has been unmounted from /boot/efi and remounted to /target/boot/efi
   c. the target EFI partition (e.g. /dev/sdb1) has been created and formatted, but is unmounted and empty.

$ cat /target/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/sdb2 during installation
UUID=76ecfd0f-dae5-4801-9db0-7d8bc8d20b8f / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=A815-6B37 /boot/efi vfat umask=0077 0 1
# swap was on /dev/sda6 during installation
UUID=c2e0cb67-23de-4ab3-be19-4123e6229ade none swap sw 0 0

$ sudo du -shx /target/* | sort -h
4,0K /target/home
4,0K /target/lib64
4,0K /target/media
4,0K /target/mnt
4,0K /target/opt
4,0K /target/proc
4,0K /target/srv
4,0K /target/sys
4,0K /target/tmp
4,0K /target/writable
12K /target/dev
12K /target/root
16K /target/lost+found
16K /target/meta
84K /target/snap
96K /target/run
3,8M /target/etc
4,1M /target/boot
9,7M /target/sbin
9,8M /target/var
14M /target/bin
48M /target/lib
240M /target/usr

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ubiquity 20.04.15.11
ProcVersionSignature: Ubuntu 5.8.0-51.57~20.04.1-generic 5.8.18
Uname: Linux 5.8.0-51-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.17
Architecture: amd64
CasperMD5CheckResult: skip
Date: Fri Apr 30 00:34:13 2021
InstallCmdLine: BOOT_IMAGE=(loop)/casper/vmlinuz root=UUID=E6BD-0CD8 file=/cdrom/preseed/ubuntu.seed maybe-ubiquity debian-installer/language=de keyboard-configuration/layoutcode=de iso-scan/filename=/ubuntu-18.10-desktop-amd64.iso boot=casper persistent noprompt quiet splash --
InstallationDate: Installed on 2018-12-11 (870 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
SourcePackage: ubiquity
UpgradeStatus: Upgraded to focal on 2020-10-26 (185 days ago)
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu65
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 21.04
InstallCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.11.0-16-generic root=UUID=d58bb821-fce1-4730-802d-4afdcf512495 ro quiet splash vt.handoff=7
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
Package: ubiquity 21.04.19
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 5.11.0-16.17-generic 5.11.12
Tags: hirsute wayland-session oem-config
Uname: Linux 5.11.0-16-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Pablo Hörtner (redtux2000) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

The log attached is a 18.10 one and has this error

ubuntu /plugininstall.py: subprocess.CalledProcessError: Command '['apt-clone', 'restore-new-distro', '/target/ubiquity-apt-clone/apt-clone-state-ubuntu.tar.gz', 'cosmic', '--destination', '/target']' returned non-zero exit status 1.

did you report the issue from the system which had the problem or from another one?

Revision history for this message
Pablo Hörtner (redtux2000) wrote :

It just says that the initial install of my system was done with 18.10. Distro release is Ubuntu 20.04. This is my desktop system, as I wanted to confirm that the error does not only happen when installing from a removable media to another removable media, but also when installing from disk to removable media. I know that ubiquity is not intended to run from a normal desktop system, but as I said this was only for testing after having experienced the issue on several installs.

Additionally, I have just tested this with Ubuntu hirsute 21.04 (stable live iso), and I am experiencing the same issue (with ubiquity 21.04.19). I have also tested whether there is a difference if I boot into the installer directly from Grub, but it is just the same as booting into live mode first and then manually starting ubiquity.

This seems somehow dangerous, as it may break a current EFI installation. The crash directory inside install-logs-2021-05-02.0 is empty, so I cannot send you a stacktrace. I took some bad fotos of the error (in German), in case this helps.

Revision history for this message
Pablo Hörtner (redtux2000) wrote : Dependencies.txt

apport information

tags: added: apport-collected hirsute oem-config wayland-session
description: updated
Revision history for this message
Pablo Hörtner (redtux2000) wrote : OemConfigLog.txt

apport information

Revision history for this message
Pablo Hörtner (redtux2000) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Pablo Hörtner (redtux2000) wrote : ProcEnviron.txt

apport information

Revision history for this message
Pablo Hörtner (redtux2000) wrote : UbiquityDm.txt

apport information

Revision history for this message
Pablo Hörtner (redtux2000) wrote : UbiquitySyslog.txt

apport information

Revision history for this message
Pablo Hörtner (redtux2000) wrote :

Okay, having a closer look at the uploaded logs I just noticed the timestamp in syslog (20 December without year), so those logs are really old (probably from 2018) and misleading. Maybe apport uploaded logs from an older crash? In any case, the bug is still there. I will try again with 20.04 and 20.10, collect the logs and upload them here. Sorry for the confusion!

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
tags: added: ubiquity-21.04.19
Revision history for this message
Pablo Hörtner (redtux2000) wrote :

apport-cli is crashing on hirsute, so I cannot send you the debug log, but I have tried my setting (with existing swap and efi partitions) again, and am still getting the same error. I also took some screenshots and saved the debug log, in case you need it.

Just in case, "apport-cli -u 1926672" and "apport-collect 1926672" are crashing with the following error:

Traceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 597, in <module>
    app.run_argv()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 719, in run_argv
    return self.run_update_report()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 637, in run_update_report
    self.crashdb.update(self.options.update_report, self.report,
  File "/usr/lib/python3/dist-packages/apport/crashdb_impl/launchpad.py", line 419, in update
    bug.lp_save()
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 775, in lp_save
    response, content = self._root._browser.patch(
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 494, in patch
    return self._request(
  File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 438, in _request
    raise error
lazr.restfulclient.errors.PreconditionFailed: HTTP Error 412: Precondition Failed
Response headers:
---
content-length: 0
content-security-policy: frame-ancestors 'self';
content-type: text/plain
date: Fri, 21 May 2021 00:52:01 GMT
server: zope.server.http (HTTP)
status: 412
strict-transport-security: max-age=15552000
vary: Accept
x-content-type-options: nosniff
x-content-type-warning: guessed from content
x-frame-options: SAMEORIGIN
x-launchpad-revision: efc28e2b5d587feb8d4730501a578b7c3feee810
x-lazr-notifications: []
x-powered-by: Zope (www.zope.org), Python (www.python.org)
x-xss-protection: 1; mode=block
---
Response body:
---
b''
---

Revision history for this message
Pablo Hörtner (redtux2000) wrote :
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.