How to repair a faulty /usr partition?

Asked by ZioNemo on 2011-06-04

I suffered a bad crash due to repeated power fails.
System wouldn't boot anymore.
I was able to boot a live CD (a Live USB pen, actually) and to manually run fsck on all my partitions.
Everything went ok save for /usr, where several files were badly thrashed.
System boots in rescue mode, but it doesn't in normal (graphical) mode.
Several programs are not-functional because of missing system libs (in /usr/lib/...)
What can I do to repair?
Ideally I would like to reinstall all packages without touching my settings.
Is that possible somehow?
Any advice?
I would like to avoid reinstalling from scratch.
I just ran "sudo aptitude u U g g" and it worked fine, but didn't completely solve my boot problem (unsurprisingly).

Regards
ZioNemo

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
2011-06-04
Last reply:
2011-06-04
mycae (mycae) said : #1

Try forcibly reinstalling xorg and its dependencies

You could probably do something like this, but I can't guarantee it will work:

aptitude reinstall `aptitude search xorg | egrep '^i' | awk '{print $3}'`

also, delete your xorg.conf file.
find /etc/X11 -name xorg.conf -exec rm {} \;

And uninstall any proprietary drivers you are running.

sudo aptitude remove nvidia-96

(or the ATI equivalent).

Id try each of those in sequence.

mycae (mycae) said : #2

Oh, note that you cannot simply run aptitude from the liveCD -- this will only affect the live session -- you have to get to a console in your actual install.

Can you help with this problem?

Provide an answer of your own, or ask ZioNemo for more information if necessary.

To post a message you must log in.