Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The major bane when I update Ubuntu (which is way more frequent than Windows) is that I lose all installed application. To be precise I do a lot of Maple, Matlab, Geogebra & for all of those I install Java platform which too isnt very straightforward plus the license management things, which really give me craps. I don't install application in /home (to be made available to all users) thus a separate /home partition is meaningless. Can we circumvent this problem somehow such that Java dependent applications along with JDK doesn't blow away after update, may be by a separate partition (just like /home) where only custom (other than provided by Ubuntu Software Center) install application resides

Further: I use specific binary of Java (Java6 update 32), its an important requirement for me, thus I don't want to let it crash/overwritten or similar

share|improve this question

2 Answers 2

up vote 2 down vote accepted

A common solution for this is to install specific software under /opt or /usr/local and add a separate partition for that directory.

share|improve this answer
    
my reading (so far) reflects the need of having a dedicated /usr partition (along with /, /swap, /home & /boot for dual OS) is this correct. Because someone told me that /opt can be a folder in the /usr something like /usr/local/opt plus it can be formatted as NTFS? –  nightcrawler Nov 28 '12 at 10:49
1  
/usr is the place where applications that are delivered through the Ubuntu repositories are installed, and there are people that use a separate partition for /usr. /usr/local is also a very common place to but applications you installed yourself, but I would still suggest using /opt, because you'll only be installing some specific applications there and won't need a full /usr partition for that, but that could just be my opinion. –  fotomonster Nov 28 '12 at 10:54
    
...& I respect your opinion because I am not in the position yet to have my own :) so I really need a solution of NOT having to reinstall (custom) application after upgrade. You have clarified that even application from Ubuntu center reside in /usr so a separate /usr partition is out of question for compatibility issue. But would having a separate /usr/local & /opt partition be good enough? Does there Ubuntu default applications reside or just the custom ones? –  nightcrawler Nov 28 '12 at 11:08
    
Just decide if you want /opt or /usr/local, having both doesn't have any benefits. For future installation you'll just need to ensure that the software and its components are installed in that directory. For applications that are installed using configure + make or install scripts you'll maybe need to pass options to configure or install.sh to change the install directory. –  fotomonster Nov 28 '12 at 11:28

An upgrade of Ubuntu should leave any third-party applications installed and functional, with the caveat that if they depend on specific versions of libraries, upgrades to them could cause problems. If, OTOH, you do a fresh installation, you'll have problems unless you install your third-party applications to a separate partition that you do not erase. Conventionally, /opt is used for this purpose; /usr/local is supposed to be used for locally-compiled programs -- that is, programs written in C, C++, or other compiled languages that you download and compile yourself. Java doesn't qualify; Java programs would normally go in /opt if not installed via the package system.

The main problem with an upgrade rather than a wipe-and-reinstall is that upgrades sometimes don't work right; things sometimes get confused and leave the system unstable or unbootable. When they go right, though, upgrades are very convenient because they preserve most of your customizations. Thus, it may be worth setting aside separate /opt and/or /usr/local partitions in which you store third-party programs but also attempt an upgrade. If the upgrade fails, you can install fresh while telling the installer to not create new filesystems on your set-aside partition(s).

share|improve this answer
    
So can I install Java JDK in /opt would it be available universally? I mostly install it this way: lackovic.wordpress.com/2012/02/28/… can I change install location to my separate /opt partition. –  nightcrawler Nov 29 '12 at 5:22

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.