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?

  • 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! Oct 11, 2010 at 19:13

1 Answer 1


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .