Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running Ubuntu 10.4 virtualized under Xen and the grub-pc package is broken and apt-get notifies me every time I run it.

I just want to configure apt-get / aptitude to ignore this package permanently.

How do I do this?

Errors were encountered while processing:
 grub-pc
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up grub-pc (1.98-1ubuntu7) ...
dpkg: error processing grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 grub-pc
share|improve this question
add comment

2 Answers

up vote 1 down vote accepted
echo 'grub-pc hold' | dpkg --set-selections

or, through aptitude, you can mark the package as hold

However, since they are moving forward with grub2, you might take a look at the .postinst file to see why it is failing.

/var/lib/dpkg/info/grub-pc.postinst

put set -x somewhere below their initial bits of code then do:

apt-get -f install

and post the error message reported.

also, post the output from

dpkg -l | grep grub
share|improve this answer
    
Thanks, I disabled it and modify the .postinst file to exit 0. This should solve the problem. –  sorin Oct 3 '10 at 8:15
add comment

Edit

grub-common.postinst and grub-pc.postinst

Delete everything below the third line so they both look like this:

!#/bin/bash
set -e
share|improve this answer
add comment

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.