Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to reinstall Linux OS, and before that, I think I will partition my hard disk again. (I just use a simple one partition / for root, and make Linux automatically put all other directories there).

I often save software installations in /usr/local. So, my question is: suppose I create a new partition, /usr/local, and save data there; if I reinstall Linux again, can I continue to use this software and not need to install again?

I'm new to Linux World, so I'm not sure of these things.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

My suggestion on this was, make a backup of whole root fs (including /usr/local), then re-partition, mount all partition, and extract everything.

After that all your files would stand, and your disk got re-partitioned.

If you simply backup /usr/local, there's a risk that once your system libraries get updated, those software (non-static ones) might need re-linking.

share|improve this answer

You use both the phrase data and software. Generally,

  1. you can save data (files you created)
  2. you have to re-install software

If you download and compiled your own packages, and you put everything for them in /usr/local, then yes, you can probably save the software as well. But if you link them against shared libraries, you may still have issues if those libraries are outside of /usr/local and change when you re-install.

If you install software using your distributions package manager then you're probably going to need to re-install those packages, but you can save data in any partition you don't format.

share|improve this answer

If you partition your disk, you'll loose everything in /usr/local.

As to the real question, you certainly can continue using the software in usr/local. But be aware that your package manager doesn't know about it, and can very well update (or even delete) packages that something in /usr/local needs, and so it can stop working at any time.

share|improve this answer
    
I would phrase this the other way around. The package manager, for better or for worse, will not touch your stuff in /usr/local. If it depends on something elsewhere in the /usr filesystem like /usr/lib or /usr/bin it could still break, but if it's all statically linked, for example, you should be perfectly fine. –  tripleee Jan 24 '13 at 19:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.