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.

Braiam
  • 67,791
  • 32
  • 179
  • 269
S L
  • 1,919

2 Answers2

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.

Braiam
  • 67,791
  • 32
  • 179
  • 269
binW
  • 13,034
  • 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 03 '11 at 07:50
  • @explorex: you have access to all your files when booting a live system from USB or CD – Takkat Jan 03 '11 at 08:02
  • okay i will try, right now i am downloading one – S L Jan 03 '11 at 08:07
  • Can you be a bit more specific @binW? There's nothing wrong with explaining it in painstaking detail ;-) – Stefano Palazzo Jan 03 '11 at 08: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.

Jordan Uggla
  • 4,565