Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Whenever I install, update or remove something, it fails and I get a message similar to what is below. After I restart, everything appears to work fine.

I just installed some updates using update manager, and here were the details shown in the "Package operation failed" window.

installArchives() failed: (Reading database ... 

[...]

run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.35-23-generic /boot/vmlinuz-2.6.35-23-generic
exec: 15: update-grub: not found
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.35-23-generic.postinst line 1010.
dpkg: error processing linux-image-2.6.35-23-generic (--configure):
 subprocess installed post-installation script returned error exit status 2

See the full log here.

How can I stop this happening?

share|improve this question
    
Post the output of sudo update-grub do you use the grub bootloader? or lilo? or burg? –  karthick87 Dec 11 '10 at 8:54
    
I believe it's GRUB2. I'm running 10.10. –  oadams Dec 11 '10 at 9:21
    
Pls post the output of sudo update-grub in pastebin. –  karthick87 Dec 11 '10 at 10:29
    
sudo: update-grub: command not found –  oadams Dec 11 '10 at 11:40
    
Could you post the output of sudo update-grub –  karthick87 Dec 12 '10 at 4:21

3 Answers 3

up vote 1 down vote accepted
+50

It sounds like update-grub has been removed. Do you recall deleting it? Try sudo apt-get install --reinstall grub-pc. Then see if apt works a little better.

share|improve this answer

Do you have burg installed? I'm guessing you most likely do. If you do, run:

sudo ln -s /usr/bin/update-burg /usr/bin/update-grub

in a terminal, or you can try to replace:

update-grub

with

update-burg

in

/etc/kernel/postinst.d/zz-update-grub

by running:

gksu gedit /etc/kernel/postinst.d/zz-update-grub

in your alt+f2 dialogue.

share|improve this answer
    
I'm not sure if I have burg installed. I can't find any trace of it around. Regardless, I tried changing /etc/kernel/postinst.d/zz-update-grub but the same problem persisted when I ran an update afterwards. –  oadams Dec 11 '10 at 5:09

This is a noted bug.

It looks like your kernel isn't working. At the grub menu when you're booting up, select a previous kernel (if you have the option to select which kernel you use). Example if you're using 2.6.35-23, try using 2.6.35-22. When it boots into Ubuntu using that previous kernel, try installing packages again. If it works without giving you any errors, you can safely know that your current kernel is broken. An option would be to just the kernel that works. If that does work, you will have to change your grub2 list to automatically boot into the previous kernel. (If you need to know how to do that, just let me know or search on AskUbuntu.com).

If you don't want to use a different kernel, trying updating your current kernel following this tutorial.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.