Using dpkg in Recovery Menu fails if screen is installed

Bug #1438865 reported by Brian Murray
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
friendly-recovery (Ubuntu)
Fix Released
Medium
Martin Pitt
ubuntu-release-upgrader (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Using vivid with systemd the entry for "dpkg ... Repair broken packages" fails to do anything.

rm: cannot remove "/var/lib/pat/lists/partial/": No such file or directory
rm: cannot remove "/var/cache/apt/archives/partial/" No such file or directory
Unable to open "screenrc".

Tags: vivid
tags: added: systemd-boot vivid
Revision history for this message
Martin Pitt (pitti) wrote :

The two error messages are indeed confusing and should be quiesced. But here it does work in general; on a system with missing ubuntu-minimal, apt will propose to install it. Can you please re-check this? Thanks!

Changed in friendly-recovery (Ubuntu):
status: New → Incomplete
tags: removed: systemd-boot
Revision history for this message
Brian Murray (brian-murray) wrote :

I'm also using an encrypted lvm root partition which may make things more complicated. I removed ubuntu-minimal and running dpkg in the recovery menu still did nothing.

Revision history for this message
Martin Pitt (pitti) wrote :

I still cannot confirm this. I did a standard LVM+cryptsetup install (into a VM), started recovery, and the "dpkg" option runs apt and proposes to upgrade a few packages.

Revision history for this message
Martin Pitt (pitti) wrote :

This happens when "screen" is installed, then the release upgrader trips over 'Unable to open "screenrc"' and fails.

affects: friendly-recovery (Ubuntu) → ubuntu-release-upgrader (Ubuntu)
Changed in ubuntu-release-upgrader (Ubuntu):
status: Incomplete → Triaged
summary: - Using dpkg in Recovery Menu fails
+ Using dpkg in Recovery Menu fails if screen is installed
Martin Pitt (pitti)
Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → Fix Committed
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
affects: ubuntu-release-upgrader (Ubuntu) → friendly-recovery (Ubuntu)
Changed in friendly-recovery (Ubuntu):
importance: Medium → Undecided
status: Fix Committed → Triaged
status: Triaged → Fix Committed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package friendly-recovery - 0.2.29

---------------
friendly-recovery (0.2.29) vivid; urgency=medium

  * dpkg: Force release-upgrader to run without screen, as that fails under
    friendly-recovery. (LP: #1438865)
 -- Martin Pitt <email address hidden> Wed, 15 Apr 2015 17:42:08 -0500

Changed in friendly-recovery (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

While we've worked around this by setting RELEASE_UPGRADER_NO_SCREEN=1 in friendly-recovery, it'd be better to make sure that the screenrc file is loaded by the release-upgrader all the time.

So in DistUpgrade/DistUpgradeMain.py we should change how screenrc is loaded:

    # unset escape key to avoid confusing people who are not used to
    # screen. people who already run screen will not be affected by this
    # unset escape key with -e, enable log with -L, set name with -S
    cmd = ["screen",
           "-e", "\\0\\0",
           "-L",
           "-c", "screenrc",
           "-S", SCREENNAME]+sys.argv
    logging.info("re-exec inside screen: '%s'" % cmd)
    os.execv("/usr/bin/screen", cmd)

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
milestone: none → later
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.