9

I want to reinstall Ubuntu keeping my data intact. I have 160 GB hardrive (sata or pata I don't know but it's slim and made in China) with a 40 GB ext3 partition, a 4GB swap memory and 3 other partition with a FAT32 file system. I have around 4GB space on my drive where Linux is installed.

I'd like to keep the data intact, especially the Downloads folder, desktop, and /var/www; And I no longer have access to any other machines or external storage devices.

3
  • If I've understood you correctly, you also don't have an Ubuntu CD or a USB stick. Correct? Jan 3, 2011 at 7:20
  • 1
    i don't have DVD-Rom but there is USB port where i installed ubuntu from. Since i don't have ubuntu OS i am downloading one
    – S L
    Jan 3, 2011 at 7:22
  • last time i made USB bootable and i installed
    – S L
    Jan 3, 2011 at 7:24

2 Answers 2

9

Just copy the directories that you want to save i.e Downloads, /var/www and Desktop to another partition, install Ubuntu to that 40 GB ext3 partition and after installation copy the directories back.

4
  • do you mean i can copy files while installing ubuntu? i don't have access to sudo command (it's disabled and the only partition that is accessible to me is the partition where linux is installed and i don't want to delete other drives.)
    – S L
    Jan 3, 2011 at 7:50
  • @explorex: you have access to all your files when booting a live system from USB or CD
    – Takkat
    Jan 3, 2011 at 8:02
  • okay i will try, right now i am downloading one
    – S L
    Jan 3, 2011 at 8:07
  • Can you be a bit more specific @binW? There's nothing wrong with explaining it in painstaking detail ;-) Jan 3, 2011 at 8:37
4

In the installer, choose the option for advanced partitioning, then select your existing / or /home partition. In the box that appears, make sure the filesystem selected matches the existing filesystem of that partition, and that the format box is not checked. Proceed as normal through the rest of the options.

Copied from a comment by Evan on a previous Ask Ubuntu question: What's your recommendation on drive partitioning schemes for a desktop and home server?

According to the comment this will only preserve /home, /usr/local, /usr/src, and /var/local, so you will probably have to move /var/www and anything else you want to preserve into your /home directory (at least temporarily) to prevent it from being overwritten.

You must log in to answer this question.

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