Comment 2 for bug 533970

Revision history for this message
Doug Morse (dm-dougmorse) wrote :

Hi,

A couple of quick comments.

First, as a temporary workaround,as root user I simply backed up and then removed the nvidia-common file in the /etc/kernel/postinst.d and /etc/kernel/header_postinst.d directories. Then, by running "apt-get -f install", I was able to get the kernel packages to finally finish installing correctly. Then, I copied the nvidia-common file back into the two directories mentioned, and everything with apt now works again (i.e., apt-get update, apt-get autoremove, etc).

In other words, running the following might temporarily help others with this problem:

sudo cp -pi /etc/kernel/postinst.d/nvidia-common /tmp/nvidia-common
sudo rm -f /etc/kernel/postinst.d/nvidia-common
sudo rm -f /etc/kernel/header_postinst.d/nvidia-common
sudo apt-get -f install
sudo cp -pi /tmp/nvidia-common /etc/kernel/postinst.d/nvidia-common
sudo cp -pi /tmp/nvidia-common /etc/kernel/header_postinst.d/nvidia-common

Second, here's what I've discovered technically that might help the experts figure out the correct solution. Non-experts may not wish to read any further.

I added a "set -x" command to the 2nd line of /etc/kernel/postinst.d/nvidia-common. This revealed the error return code 10 and error message line "RET='10 nvidia-common/obsolete-driver doesn'\''t exist'". This lead me to notice at least one problem:

(1) /usr/share/nvidia-common/obsolete-driver in fact does NOT exist

Apparently, it has been renamed to simply /usr/share/nvidia-common/obsolete.

At this point, I tried to diagnose further, and the problem clearly follows from the db_set commands within the /etc/kernel/[header_]postinst.d/nvidia-common files. However, being still somewhat new to Ubuntu/Debian (I come from RHEL world), I'm not familiar with debconf and could not readily find documentation what what db_set is suppposed to do (and looking at /usr/share/debconf/confmodule didn't help, as db_set simply calls _db_cmd "SET", which I couldn't quickly figure out what that does).

At any rate, I tried the following, all of which do not work:

(2) globally replacing "obsolete-driver" with "obsolete" does NOT work
(3) globally replacing "obsolete-driver" with "/usr/share/nvidia-common/obsolete" does NOT work.

I tried (3) because, after putting an "echo PWD=`pwd`" line at the start of nvidia-common script, I noticed it was being running from PWD=/, so I thought the problem might be a directory location, but still no joy.

At this point, I just gave up and tried removing the nvidia-common files from /etc/kernel, and, as I mentioned first, that worked for me.

For what it's worth, below is the relevant output from "apt-get -f install" from attempt (2) above, that is, "obsolete-driver" replaced with "obsolete" (the error message was the same in all cases, i.e., "RET='10 nvidia-common/obsolete doesn'\''t exist'").

Hope this helps folks get this resolved. It seems to be affecting a lot of people and a similar bug has high priority / triaged status. I'll crossref next.

Cheers,
Doug

run-parts: executing /etc/kernel/postinst.d/nvidia-common
+ . /usr/share/debconf/confmodule
++ '[' '!' '' ']'
++ PERL_DL_NONLAZY=1
++ export PERL_DL_NONLAZY
++ '[' '' ']'
++ exec /usr/share/debconf/frontend /etc/kernel/postinst.d/nvidia-common 2.6.31-20-generic /boot/vmlinuz-2.6.31-20-generic
+ . /usr/share/debconf/confmodule
++ '[' '!' 1 ']'
++ '[' -z '' ']'
++ exec
++ '[' '' ']'
++ exec
++ DEBCONF_REDIR=1
++ export DEBCONF_REDIR
+ db_set nvidia-common/obsolete false
+ _db_cmd 'SET nvidia-common/obsolete' false
+ IFS=' '
+ printf '%s\n' 'SET nvidia-common/obsolete false'
+ IFS='
'
+ read -r _db_internal_line
+ RET='10 nvidia-common/obsolete doesn'\''t exist'
+ case ${_db_internal_line%%[ ]*} in
+ return 10
run-parts: /etc/kernel/postinst.d/nvidia-common exited with return code 10