Page 1 of 1

Recovery for /usr/bin directory, made a bad booboo!

PostPosted: Sep 16th, '13, 07:55
by onederer
:( Greetings!

Today, Mageia upgraded to the latest version. When it finished the upgrade, I logged out and rebooted into the new version. I went to clean out my email, when I came upon a note with a pass-code to download and try the free developer's version of SQL Anywhere for Linux.

I downloaded it, and un-zipped and un-tarred the file. I then proceeded to install the SQL database. When it had unravelled itself, and installed itself, I found that I was not able to complete the necessary tweaks. It was too complicated, and some things seem to have been missing. After trying for a while, I finally gave up, and decided to get rid of it.

Since it didn't come from the repository, it was useless to remove it with the "Install & Remove" application. I tried Dolphin, but the delete function, refused to delete the entire directory, or even parts or it. So now I resorted to the Konsole to nibble at the directories, and eliminate all of them.

It's a long process, but I tackled each and every individual directory and it's contents, slowly sending them to oblivion. However, on this one directory in the SQL directory, labeled "lib", when I started decimating this file, something went drastically wrong! In a way, it did me a favor, and blew up the entire rest of the remaining SQL setup. But for whatever reason, it also somehow, ended up in /usr/bin and evaporated everything in that directory. SQL had been installed in /opt/sql.../ .

Now that you know the story, the problem is that this is/was a brand new upgrade without my having to do any tweaks, or losing anything. That is, until the /usr/bin/ directory blew up. I also realize that I can run the previous version, since it is still in the Bootup menu. But I can't copy the /usr/bin files from the previous version, since the numbers will not match.

How do I find or copy just the entire contents of /usr/bin, and nothing else? This has to be for the latest version of Mageia. I don't have a CD, nor did I need one, up to now, to copy the latest version from an optical disk. I have two machines here with Mageia. But one is 32 bit, and the other is 64 bit. Not really compatible! Is there a layout on the Internet, with the files setup as they would be on a home computer?
If that was the case, I could use a "dd" command to produce the image of the directory.

Anyone got any solutions?? Comments and suggestions are welcome!

Cheers!

Re: Recovery for /usr/bin directory, made a bad booboo!

PostPosted: Sep 16th, '13, 17:36
by jiml8
Yeah, you made a bad booboo all right. My /usr/bin has 3317 entries in it. Not trivial.

If you don't have it backed up, you can't recover it in any reasonable amount of time. You'll have to reinstall.

If you are happy with your configuration, just move your /home and your /etc someplace safe before reinstalling. After reinstalling, copy /home and /etc back into place and you should have everything back.

For future reference, and to safeguard against future booboos, I would recommend that you employ the backup scheme I recently described here: https://forums.mageia.org/en/viewtopic.php?f=41&t=5957. Had you been backed up in this fashion, restoring /usr/bin would have consisted of the following command:

rsync --delete /backup/backup0/usr/bin/ /usr/bin

followd by a wait of maybe 2-3 minutes. Of course, you might have had to boot into a linux live distro before issuing this command.

Re: Recovery for /usr/bin directory, made a bad booboo!

PostPosted: Sep 16th, '13, 22:09
by zeebra
onederer wrote::( Greetings!

Anyone got any solutions?? Comments and suggestions are welcome!

Cheers!


If you updated any of those programs that need those bin files you will have a difficult time matching them up with the rest of the system. Perhaps impossible for a smooth running system.

What kind of computer do you have to not be able to reinstall again?

Re: Recovery for /usr/bin directory, made a bad booboo!

PostPosted: Sep 16th, '13, 23:29
by onederer
I couldn't provide all the details, because it is long. I tried to install Sybase Anywhere, using a key code sent to me by email to try the developers version. After installing it, I found that it wouldn't work. Finally gave up and decided to get rid of it. Couldn't delete the whole thing by using the trash can. Tried to delete it by using Dolphin, no such luck. Then I used Konsole to start picking out each and every directory and it's contents, and deleting everything. That was fine, until I ended up in a directory "/lib/". Something in there happened, and bombed the /usr/bin/ directory contents. How or why, I don't know. I'm still using that machine to write this. It doesn't seem to affect email management.

I am very leery about downloading and installing the latest .ISO version of Mamgeia, because when one does that, all the setups and tweaks go out the door. Scratch is the name of that game.
Bessides on the day that this happened, Mangeia had just upgraded my system. Didn't have a chance to backup and was lured by the Sybase installation prospect. Now, if I could get it to dist-upgrade again to rebuild the /usr/bin/* directory, and keep the rest of the system intact, that would be great! Too bad that I don't have another machine which I could copy the contents of /usr/bin/*, and transfer that to this machine. Oh, and another thing, the bootloader manager has the list of all the past upgrades. I believe that I "possibly" could boot into the prior version and hopefully it would be totally intact?? Maybe I could trick the system to upgrade again, and rebuild the /usr/bin/ directory to the latest version again?? Or, is that wishful thinking?

This is great! keep on sending the suggestion. There ought to be a solution! If not, with tears in me eyes, I'll have to go to the *.ISO route. So do you think that I could install Mangeia in a flash drive, and then copy the /usr/bin/ contents that way? This way it would not upset all my tweaks and setups. Is this feasible?

Cheers!

Re: Recovery for /usr/bin directory, made a bad booboo!

PostPosted: Sep 17th, '13, 03:00
by jiml8
Again, save /home and save /etc, and you save your setup.

Re: Recovery for /usr/bin directory, made a bad booboo!

PostPosted: Sep 17th, '13, 03:32
by Ken-Bergen
If you use the install DVD iso it should see your system and offer to upgrade it.
That may rebuild your /usr/bin.

Re: Recovery for /usr/bin directory, made a bad booboo!

PostPosted: Sep 17th, '13, 07:57
by onederer
Thanks for the tips!