Reinstall Ubuntu (with preserving existing data) shows error message due to "Could not get lock /target/var/cache/apt/archives/lock"

Bug #1798369 reported by Łukasz Zemczak on 2018-10-17
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
APT
New
Undecided
Unassigned
ubiquity
New
Undecided
Unassigned
apt (Ubuntu)
Undecided
Unassigned
ubiquity (Ubuntu)
Undecided
Unassigned

Bug Description

When trying to reinstall an existing Ubuntu cosmic installation using latest 18.10 desktop images, the install shows an error dialog around the end of the installation with an "Error restoring installed applications". Looking at the syslog such a traceback can be seen:

apt_pkg.Error: E:Could not get lock /target/var/cache/apt/archives/lock - open (11: Resource temporarily unavailable), E:Unable to lock directory /target/var/cache/apt/archives/

After reproducing this on a live session, after chrooting into /target indeed any apt-get install operations result in the same lock-file error. The whole syslog of the reinstall attached to the bug.

Test case:
 * Download latest cosmic image
 * Install cosmic on the whole disk (can be on a VM)
 * (optional) Boot into the system and leave a file in the home directory (to leave a trace, just in case)
 * Reboot and install cosmic using the first option in ubiquity: Reinstall Ubuntu
 * Finish configuration

The install itself doesn't fail, but around the end of the installation process the error dialog appears. System is still bootable but left with old packages.

Paul White (paulw2u) wrote :

Also seen running 'manual partitioning' test case.

Launchpad Janitor (janitor) wrote :

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

Changed in apt (Ubuntu):
status: New → Confirmed
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/1798369

tags: added: iso-testing
Balint Reczey (rbalint) wrote :

I installed cosmic in a KVM vm using virt-manager, then ran update-manager to update a few packages leaving the lock file behind, restarted to the installer, chose reinstall and the installer is stuck in systemd[1]: Started Cleanup of Temporary Directories.

Łukasz Zemczak (sil2100) wrote :

We decided this is not a release blocker as actually, what I missed mentioning earlier, this does not cause actually the installation to fail (the title was wrong). The install still finishes but at the end the user is presented with an error message that the refresh of installed applications failed. The message however does mention that everything is ok with the system just with the applications left in previous state and risk of them not working without a reinstall (or something similar). The system is bootable and still works.

Changing description to make that clear.

tags: added: release-dd-incoming
summary: - Reinstall Ubuntu (with preserving existing data) fails due to "Could not
- get lock /target/var/cache/apt/archives/lock"
+ Reinstall Ubuntu (with preserving existing data) shows error message due
+ to "Could not get lock /target/var/cache/apt/archives/lock"
description: updated
Changed in apt (Ubuntu):
status: Confirmed → Invalid
tags: added: rls-dd-incoming
removed: release-dd-incoming
tags: added: ubiquity-18.10.12
tags: added: cosmic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers