Power cut during Ubuntu upgrade to 10.04 - boots to command line, apt-get and dpkg do not work

3

I was upgrading Ubuntu to 10.04, when a tripswitch tripped, cutting power to the computer. When it was restarted, it booted into a command line prompt. Google tells me to try:

sudo dpkg --configure -a

This gets me a lot of output that ends with a list of packages. I can't tell you what the output is, as piping the output to more/less does not work (still just all scrolls by and moves to next prompt), and redirecting it to a file just results in an empty file.

Google also suggested:

sudo apt-get install -f

This also didn't work.

Is a fresh install the only solution at this point?

Macha

Posted 2010-03-28T16:22:53.953

Reputation: 4 772

if redirecting the output to a file results in an empty file try redirecting STDERR to STDOUT.. That might help.. Use this: $<command> 2>&1 | tee cmd_output.log This should redirect STDERR to STDOUT and capture it in cmd_output.log file. If we have the error message for either apt-get or dpkg command, we can try to fix it.. – Vinay – 2011-05-23T09:23:22.763

Answers

1

are you able to access the sources.list ?

if so, modified it

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

$ sudo kate /etc/apt/sources.list

find and replaced all instances of "karmic" with "lucid". I think you've done these steps.

Then, Update and upgraded again.

$ sudo apt-get update && sudo apt-get dist-upgrade

This process took a long time but did produce an error relating to kdelibs5. The details are not so important, but was fixed using the following command apt-get straight up said to try this

$ sudo apt-get -f install

If this part works for you, you can then resume your update. Again, using:

$ sudo apt-get dist-upgrade

After that, Fix other applications

$ sudo apt-get install parted

Then, reboot

$ sudo reboot

if you can't get it , fresh install will be better .

Ye Lin Aung

Posted 2010-03-28T16:22:53.953

Reputation: 5 444

Doesn't work. Anything after sudo apt-get -f install just fails. – Macha – 2010-03-28T19:53:32.167

@Macha: But with what messages does it fail? – Bobby – 2010-06-10T09:10:16.727

1

sudo apt-get install --reinstall ubuntu-minimal
sudo apt-get install --reinstall ubuntu-desktop

Gabriel Solomon

Posted 2010-03-28T16:22:53.953

Reputation: 1 030

apt-get refused to install anything. I had to reinstall in the end. – Macha – 2010-04-07T13:24:16.730