MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Usually this will undo the damage as it causes the original installation scripts to be re-executed.
I've often fixed some very severe problems caused by my own screwing around, this way.
It always pays to know which files you changed.
That way you can query rpm to find out the package that will restore operation instead of the blanket approach I gave you.
Lets say I screw up xdm and it no longer works.
Ok first I query rpm
rpm -qf /etc/X11/xdm/Xsession
or any of the xdm files I may have overwritten, erased, etc.
it comes back and tells me the name of the rpm which has the original file.
Pop the disk in, and urpmi or rpm -Uvh --force the file and you are back in business.
The menus are built dynamically via a script called update-menus.
It is likely that you have either screwed it up or screwed up something upon which update-menus depends.
One thing you can do is find the rpm containing update-menus and work backwards so to speak.
First re-install the package which contains update-menus, then run update-menus, and wait 15 minutes to see if your menus come back.
If no luck, find the packages upon which it depends using RPM. Re-install those. Try again. If still no luck keep working backward.
I wish there was a way to tell urpmi to force an install of a particular package and work backward "X" levels installing all the prior dependancies as well. That would be a quick and easy way to recover from major damage.
If you do have an operational RPM there are a few other things you can do...
For instance.
Tar off everything in /etc, then dump the existing list of installed packages...
i.e.
rpm -qa >> installed_files
Then boot from a Live CD of any distro, mount your Linux partitions and erase ALL but /etc/fstab and your home directories.
/etc/ contains your important customizations which will get restored a bit later.
Now re-install Linux telling it to use existing partitions (this will cause it to find the /etc/fstab file and use it!
Once done, set up your RPM sources as before and then
urpmi <<installed_files
urpmi will re-install EVERYTHING you had on your system before "fresh".
Now restore /etc from your prior tar backup.
All of your inconsistencies or erroneously overwritten files are fixed (except for /etc entries)
Thanks opjose everything seems to be working now. I reinstalled Firefox, Ximian Evolution, rpmdrake, harddrake and samba. I also rebuilt the menu as advised. I managed to install spamassassin using urpmi and it went well(using an RPM was how I screwed it up earlier). I even managed to itegrate it with evolution and it's filtering my spam
I'll keep the information you and Eule gave me handy for the next time I screw up
It only took 11hours to fix it this time I'm getting better
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.