PDA

View Full Version : [ubuntu] Reinstall and preserve the home directory?



Starks
December 20th, 2008, 12:17 AM
Is this possible without separate partitions?

taurus
December 20th, 2008, 12:28 AM
Don't think so unless you just want to reinstall on top of the older version without formatting the partition first.

Starks
December 20th, 2008, 12:32 AM
Don't think so unless you just want to reinstall on top of the older version without formatting the partition first.

How does one do that?

Michael.Godawski
December 20th, 2008, 12:33 AM
Is this possible without separate partitions?

You can always create a separate /home partition even if you forget to do so :p



http://www.psychocats.net/ubuntu/separatehome

taurus
December 20th, 2008, 12:36 AM
When you get to the partition screen, pick Manual and have the installer mount whichever partition as / but do not put a check mark on the box regarding format. Then, it will not format that partition.

However, is that what you really want to do, reinstalling the new version on top of the old one? I assume you want to reinstall because there is something wrong with the current version on your harddrive. Wouldn't it be better just to do a backup of your $HOME on a portable drive like USB first. Then when you reinstall, create a separate partition for /home so you don't have to worry about this scenario again.

Starks
December 20th, 2008, 01:57 AM
I've done separate partitions in the past, but usually after the installation.

It's always a pain in the ***.

anjilslaire
December 20th, 2008, 02:25 AM
much easier to create the separate partitions during install, not after...

albinootje
December 20th, 2008, 02:34 AM
Is this possible without separate partitions?

If you didn't have a separate /home partition, then this is not possible because the / partition needs to be formatted during a re-install.
Backing up /home to a usb-disk, and carefully putting it back is recommended instead.

markbuntu
December 20th, 2008, 03:22 AM
YOU DO NOT NEED TO REFORMAT TO REINSTALL!!!

A reinstall will overwrite all the files it needs to and leave the rest alone including your personal data files if you do not format during a reinstall. It will also leave many application files in /bin, /usr and /etc so you will not need to download them again. But then again, if that is where the problem is.... still, you should try that first because it may work and is not so drastic as reformatting.

Intrepid has a installation recovery option on the live cd so you should try that first.

SuperSonic4
December 20th, 2008, 03:29 AM
I think you can use gparted to make a blank ext3 partition and then make a note of where it is (dev/sdXX)


sudo mv /home /dev/sdXX

try at your own peril for it's untested, mv is move

albinootje
December 20th, 2008, 03:01 PM
I think you can use gparted to make a blank ext3 partition and then make a note of where it is (dev/sdXX)


sudo mv /home /dev/sdXX

try at your own peril for it's untested, mv is move

Let's assume /dev/sde4 is the new extra partition where /home will end up :
This is a better way to make a backup :



sudo mkdir /media/temp
sudo mount /dev/sde4 /media/temp
cp -arv /home /media/temp/


Moving your home with mv while using your Ubuntu installation at the same time, might not even be possible.
Copying with cp is prefered.