Long time no hard-core stuff post in this blog.
Recently I’ve been fucked up good by the problem that the driver (I ran the .run file from the official nvidia site, not the yum install kmod-nvidia way) installation just somehow gets altered now and then. Re-installation did work for a day or two, and broke again. I am very pissed off (of course), but more curious about why.
The reason and the solution are simple. People coming for a solution can read the following paragraph, get your ass out of trouble real soon:
Reason: prelink was fucking with nvidia binaries and libraries.
# prelink -ua && rm /etc/prelink.cache && . /etc/cron.daily/prelink
For people in a hurry, this is all you need.
How I tracked down the problem (general troubleshooting how-to):
First of all, there had to be something wrong before I have found the driver issue — one day, suddenly I find my Flash constantly crashing in Chrome. Some posts in the Chrome forum said it could have something to do with libGL.so (Of course, “some other posts” said I should disable one of the two Flash plugins, which worked like shit). So I re-installed the motherfucking driver, and…..
the installer prompted “The ‘NVIDIA Accelerated Graphics Driver for Linux-x86’ installation has been altered since it was originally installed.” before re-installation. But I didn’t care much — I thought the installation was just somehow corrupted. Re-installation worked like a charm for a day or two….
before the issue came back again. “This is not something random”, so I tried to see what I could do. I found (most of) the nvidia installation files with locate -e nvidia, then I played with some of the bin utils. nvidia-installer turned out to be useful. nvidia-installer --sanity told me the files that have been modified since they were originally installed (by comparing md5sums).
OK. Getting close. The million-dollar question: who the fuck changed the files? To answer it, auditd turned out be useful — a daemon together with a couple of utils to audit changes to file(s). You can learn those commands from elsewhere ‘cuz that’s what I did. Anyway, basically I just re-installed the driver, set a watch on one file that was altered, and… waited for the next time Flash crashing in Chrome.
When it did, prelink was identified to be the nasty guy (with ausearch).
OK. Things happened next is the 3-in-1 command, which I just stole from man prelink.
Thanks for reading and bearing with my curse and swear.
p.s. Actually,, I could have just digged more on the cron logs (containing prelink log) — but haiz,, I don’t really dig on that….