Partially overwrote /

Hi,

I’ve just done a big mistake, partly overwriting my root fs with that of another Linux distribution (Slitaz)!

Unfortunately, I’ve only backed up the “custom” part of it: /root, /etc, /usr/local, and /var/lib/scpm/profiles/*/file.

/home is safe.

Please help me recover my system!

(Maybe I could start off by reinstalling installed packages? But I don’t know how to do that. Yast doesn’t work anymore, I hope zypper will.)

Thanks

Not much you can do except reinstall. And restore what you have. You have done random damage to the file system.

I agree with gogalthorp. as it is unknown what you dameged (you do not tell how you have overwritten, but you coud even have destroyed the file system), the quickest way is to reinstall. You still have your users data (in /home) and you can still look into your save /etc config files when you doubt about how to reconfigure things (be carefull with outright copying back of individual files there).

Well, I think I have misphrased my first sentence. I should have said: I partially overwrote the root tree. I mean: many files have been replaced by those of Slitaz. So, for example, /usr/bin/ls now links to busybox!
I can probably determine which directories were affected (by inspecting modification times), if that helps you determine whether the mess can be repaired.

I stil tthink that reinstallation is quicker and more trustworthy.

> I stil tthink that reinstallation is quicker and more trustworthy.

+1 +far more trustworthy…


dd

On 2012-09-20 17:56, llevrel wrote:
>
> Well, I think I have misphrased my first sentence. I should have said: I
> partially overwrote the root tree. I mean: many files have been replaced
> by those of Slitaz. So, for example, /usr/bin/ls now links to busybox!
> I can probably determine which directories were affected (by inspecting
> modification times), if that helps you determine whether the mess can be
> repaired.

You could install another openSUSE system on another disk or partition, and then do a file compare.
As long as /etc or /var are intact, it might work.

This is not something we can guide you, there is not automation. You have to do it yourself. Use mc
as file browser.

Another procedure is to boot from the DVD of the same version, and choose upgrade of an existing
system. This might work if the rpm database is intact, maybe the entire /var and /etc have to be
intact. Might work, might not.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

On Thu, 20 Sep 2012 16:26:01 +0000, hcvv wrote:

> I stil tthink that reinstallation is quicker and more trustworthy.

Yep, I’d agree with that.

You can spend a lot of time trying to figure out what got messed up, or
just reinstall and restore what you did back up. The latter will be much
faster.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

OK. But then I’d need a means to get the list of currently installed packages, which I’ll check, and reinstall on this basis.
Can you help me wrt the relevant zypper commands?

rpm -qa

will give you a list of all installed RPMs

But you should have done this on your system much earlier (I do this and more every week and the output is saved together with the normal backup). As your system is borked, doing it now can work, or not, or partialy, or …

Even a paper list (or one in a document in your saved home directory) of those packages you installed above the default installation would have helped.

System administration is a task to be taken serious. Independent of the OS you manage, even on MS, you should document what you do.