Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a server running an older version of Ubuntu and with /var stored on a separate partition on a separate hard drive. I am attempting to update Ubuntu to 10.04, but I still want to store /var on a separate partition and hard drive. However, I don't want to format the drive which currently contains /var, as it has important data.

Is there some way to have 10.04 set up the new /var on this separate drive at installation, without formatting the drive and losing the old /var?

share|improve this question
2  
I don't understand the question: what is the connection between updating Ubuntu and formatting /var? An upgrade isn't going to format any partition! –  Gilles Oct 11 '10 at 19:13
add comment

1 Answer

If you specify partition tables manually, you can tell Ubuntu to use the old /var partition and mount it on /var. There is also a 'format' flag, so just make sure that it isn't set for that partition.

However, you'll want to be careful since the installer might overwrite files in /var. Or, it won't and some files in /var might be incompatible with newer versions of software that get installed - I've run into this with MySQL before.

You might also want to try the 'on-line' update (sudo apt-get do-release-upgrade). I've gone all the way from Ubuntu Server 8.10 to 10.04 smoothly on a couple machines. I would back up your /var and try this route. do-release-upgrade is cleaner than dist-upgrade, since it can take care of configuration changes, too.

share|improve this answer
add comment

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.