Upgrade to 12.04 did not complete normally and has left a problem with package management though machine is working

Asked by Peter Errity on 2012-06-09

The problem occurred when I used alt-tab to try and capture some text from pop up information windows during dist-upgrade from 11.10 to 12.04 . Trying to return to the upgrade window using alt-tab was problematic. As far as I can remember the last item I saw during the install was asking if I wanted to accept changes to a network config file (which I tried to capture for later review) but on trying to alt-tab back to the pop up window, to close it and continue, the screen went blank and I had no further control/input or output to the upgrade process. It had been running for about 90 minutes and was almost complete. I left it for another hour and then decided to reboot. Machine came up though I had lost my bluetooth keyboard connection (known issue which I subsequently fixed)

The only problem I appear to have now is with package management. I followed a thread to assist in identifying the problem which asked me to post results of command line output here.

This is the sequence (please note I had to use 'cntrl c' twice because nothing was happening - see lines that start with "0% [Connecting to 192.168.1.1^C")...

peter@Silverstone-desktop:~$ sudo fuser -vvv /var/lib/dpkg/lock
[sudo] password for peter:
peter@Silverstone-desktop:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"
peter@Silverstone-desktop:~$ uname -a
Linux Silverstone-desktop 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:51:22 UTC 2012 i686 i686 i386 GNU/Linux
peter@Silverstone-desktop:~$ sudo rm /var/lib/apt/lists/lock
peter@Silverstone-desktop:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
peter@Silverstone-desktop:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
peter@Silverstone-desktop:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
peter@Silverstone-desktop:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
peter@Silverstone-desktop:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
peter@Silverstone-desktop:~$ sudo rm -rf /var/lib/dpkg/updates/*
peter@Silverstone-desktop:~$ sudo rm -rf /var/lib/apt/lists
peter@Silverstone-desktop:~$ sudo rm /var/cache/apt/*.bin
peter@Silverstone-desktop:~$ sudo mkdir /var/lib/apt/lists
peter@Silverstone-desktop:~$ sudo mkdir /var/lib/apt/lists/partial
peter@Silverstone-desktop:~$ LANG=C;sudo apt-get clean
peter@Silverstone-desktop:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
peter@Silverstone-desktop:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
peter@Silverstone-desktop:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
0% [Connecting to 192.168.1.1^C
peter@Silverstone-desktop:~$ sudo dpkg --configure -a
peter@Silverstone-desktop:~$ sudo dpkg --clear-avail
peter@Silverstone-desktop:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
peter@Silverstone-desktop:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
peter@Silverstone-desktop:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade
0% [Connecting to 192.168.1.1 (192.168.1.1)] [Connecting to 192.168.1.1 (192.168.1.1)] [Connecting to 192.168.1.1 (192.168.1.1)]^C
peter@Silverstone-desktop:~$

I was able to remove a package 'Bluez' in Synaptic but could not reinstall it
'apt-get install' in terminal allowed me to re-install the bluez package (with its dependencies)

Update manager 'check' shows progress bar but does not finish and details window is empty even when server is changed from Ireland to Main.

apt-get update in a terminal shows same error as above '0% Connecting to 192.168.1.1'

Is there anything I can do to recover package management?

many thanks

Question information

Language:
English (Botswana) Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Peter Errity
Solved:
2012-06-10
Last query:
2012-06-10
Last reply:
Peter Errity (perrity) said : #1

I have tried...

sudo dpkg --configure -a

But 'apt-get update' stills hangs with...

0% [Connecting to 192.168.1.1 (192.168.1.1)] [Connecting to 192.168.1.1 (192.168.1.1)] [Connecting to 192.168.1.1 (192.168.1.1)]

Peter Errity (perrity) said : #2

Begining to think is is a network issue though internet and connection to home server work fine.

from another thread I tried this...

sudo apt-get update -o Debug::acquire::http=true

and get the same error...

0% [Connecting to 192.168.1.1 (192.168.1.1)] [Connecting to 192.168.1.1 (192.168.1.1)] [Connecting to 192.168.1.1 (192.168.1.1)]

Peter Errity (perrity) said : #3

I found the dist-upgrade main.log and am able to compare it to a previous upgrade log. It appears to have stopped short of tidy up and a few other jobs.

This is an extract of lines FROM THE EARLIER SUCCESSFUL UPGRADE that do not appear to have completed this time round...

2011-10-15 01:49:55,863 DEBUG Start checking for obsolete pkgs
-
-
2011-10-15 01:50:15,306 DEBUG Finish checking for obsolete pkgs
2011-10-15 01:50:15,326 DEBUG The following packages are marked for removal: libfolks-telepathy22 liblash3 libxcb-aux0 python-fstab l$
2011-10-15 01:51:19,440 INFO cache.commit()
2011-10-15 01:54:19,106 DEBUG plugins for condition 'PostCleanup' are '[<dpkg_status_plugin.DpkgStatusPlugin object at 0xab49c6c>]'
2011-10-15 01:54:19,107 DEBUG running quirks plugin <dpkg_status_plugin.DpkgStatusPlugin object at 0xab49c6c>
2011-10-15 01:54:19,122 DEBUG DpkgStatusPlugin found 0 cruft items
2011-10-15 01:54:19,122 DEBUG plugins for condition 'oneiricPostCleanup' are '[]'
2011-10-15 01:54:19,122 DEBUG plugins for condition 'from_nattyPostCleanup' are '[]'
2011-10-15 01:54:19,122 DEBUG quirks: running PostCleanup
2011-10-15 01:54:19,122 DEBUG running Quirks.PostCleanup
2011-10-15 01:54:19,123 DEBUG Running PostInstallScript: './xorg_fix_proprietary.py'
2011-10-15 01:54:19,530 DEBUG icon theme changed, re-reading
2011-10-15 01:54:29,806 DEBUG enabling apt cron job

So the question is - Can I manually complete the tidy up and any missing jobs?

Any help would be much appreciated.

Peter Errity (perrity) said : #4

Searched for threads on netowrk issues with apt-get update generally referring to problems with resolv.conf but mine looked normal.

Decided to do a clean install from Live CD (Ubuntu User Magazine)

Currently working through re-install of my favourite pacakages (using Synaptic which it seems is no longer installed by default) so 'sudo apt-get update' now working again in Terminal.

This may more painful than waiting to see if recovery was possible but at least I'm working with a clean install

LESSON LEARNED: Don't mess while a dist-upgrade is running - better still run it in Terminal