Using dpkg in Recovery Menu fails if screen is installed

Bug #1438865 reported by Brian Murray on 2015-03-31
This bug affects 1 person
Affects Status Importance Assigned to Milestone
friendly-recovery (Ubuntu)
Martin Pitt
ubuntu-release-upgrader (Ubuntu)

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: added: systemd-boot vivid
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
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.

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.

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) on 2015-04-15
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
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
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/ 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",
           "-c", "screenrc",
           "-S", SCREENNAME]+sys.argv"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  Edit
Everyone can see this information.

Other bug subscribers