Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: How to repair an erroneous update?

  1. #1
    Join Date
    Apr 2010
    Beans
    187

    How to repair an erroneous update?

    I think I may have screwed up in my latest update of 12.04. I missed the request to restart during a two batch update and when I restarted after running both consecutively, my boot process hangs with a purple screen. If I attempt recovery mode, it hangs on a black screen post. I can boot fine into the previous version, which is 3.2.0-38 generic, which I'm using now. I've tried completely removing 3.2.0-39 kernel packages in synaptic, expecting after that I'd then automatically boot into 3.2. 0-38 and be able to run the update again, this time more carefully. But maybe I've not removed all I needed to in synaptic, as rebooting produces exactly the same situation as before. And when I run the update manager I'm told that I'm up to date. I've searched on how to re-run an update, but drawn a blank. I'd be very grateful for some assistance and enlightenment.

  2. #2
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to repair an erroneous update?

    If you have not done it, run
    Code:
    sudo update-grub
    and reboot

  3. #3
    Join Date
    Apr 2010
    Beans
    187

    Re: How to repair an erroneous update?

    Thanks for that, but I'm afraid it hasn't worked; I have exactly as before. I'm pretty sure my attempt to use synaptic to remove 3.2.0-39 packages can't have worked. Is there a terminal command, or series of commands, that I can use from where I am now (3.2.0-38) that will absolutely clear out everything "above" that so I'm back to where I was when I'd just updated to that (however many updates back that may be)? Presumably then I can go through the update process again until I'm current. (I know I could do a fresh install, but that seems a bit drastic, and anyway I like to learn more through dealing with these glitches as they come up from time to time.)

  4. #4
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to repair an erroneous update?

    Quick fix:

    It won't purge the system completely from a kernel version, but I think sudo update-grub can't find it if you remove all '39' files from /boot

    So list the files with
    Code:
    ls -l /boot
    and remove those belonging to '39' with

    Code:
    sudo rm -i /boot/*-3.2.0-39-*
    --
    Or better:

    It should be possible to remove kernels completely using Synaptic, or by removing all packages with names containing the string '3.2.0-39' with
    sudo apt-get purge ..., in your case
    Code:
    sudo apt-get purge linux-headers-3.2.0-39*
    and
    Code:
    sudo apt-get purge linux-image-3.2.0-39*
    --
    Finally run
    Code:
    sudo update-grub
    to remove the boot option for the '39' kernel version.
    Last edited by sudodus; March 2nd, 2013 at 12:38 PM. Reason: added wild card * in sudo apt-get remove command lines

  5. #5
    Join Date
    Apr 2010
    Beans
    187

    Re: How to repair an erroneous update?

    That's worked. Thank you very much, sudodus. It's removed nearly a gigabyte of stuff and put me back to 0-25, but it's booting cleanly now and I can start to re-apply the updates. Many thanks.

  6. #6
    Join Date
    Apr 2010
    Beans
    187

    Re: How to repair an erroneous update?

    Woops! perhaps I spoke too soon: the update manager is still telling me there are no updates to install. Yet "uname -a" tells me I'm on kernel version 3.2.0-25-generic, when before I was on 3.2.0-38 (and 3.2.0-39 before the erroneous update). "Sudo apt-get update" doesn't do much either. I don't get it!

  7. #7
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How to repair an erroneous update?

    Hi

    As it's only the kernel you have manually removed, try just installing that

    Code:
    sudo apt-get install --reinstall linux-image
    You can also specify the specific kernel version to install if required.

    Code:
    sudo apt-get install --reinstall linux-image=3.2.0-39
    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  8. #8
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: How to repair an erroneous update?

    Quote Originally Posted by nickdc View Post
    Woops! perhaps I spoke too soon: the update manager is still telling me there are no updates to install. Yet "uname -a" tells me I'm on kernel version 3.2.0-25-generic, when before I was on 3.2.0-38 (and 3.2.0-39 before the erroneous update). "Sudo apt-get update" doesn't do much either. I don't get it!
    First try according to matt_symes's post, but reinstall '38' not '39'

    Then only if necessary try all of these commands in sequence
    Code:
    sudo apt-get update
    Code:
    sudo apt-get upgrade
    Code:
    sudo apt-get dist-upgrade
    --
    and finally
    Code:
    sudo update-grub

  9. #9
    Join Date
    Apr 2010
    Beans
    187

    Re: How to repair an erroneous update?

    Thanks for the continued help. I've tried your code, matt-symes, but I get an error:

    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Version ‘3.2.0-38’ for ‘linux-image’ was not found

    Same for 3.2.0-39

    sudodus, if I run the commands you suggest, won't it upgrade to 12.10? I want to avoid that if I can. I'm happy with 12.04 and so far have declined the option to upgrade.

  10. #10
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How to repair an erroneous update?

    Hi

    Just realised my previous command would have never worked

    Try this. Copy and paste into the terminal.

    Code:
    sudo apt-get install --reinstall linux-image-3.2.0-38
    Code:
    sudo apt-get install --reinstall linux-image-extra-3.2.0-38
    Kind regards
    Last edited by matt_symes; March 2nd, 2013 at 06:21 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •