Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
If I've understood you correctly, you also don't have an Ubuntu CD or a USB stick. Correct? –  Stefano Palazzo Jan 3 '11 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 –  Santosh Linkha Jan 3 '11 at 7:22
    
last time i made USB bootable and i installed –  Santosh Linkha Jan 3 '11 at 7:24

2 Answers 2

up vote 8 down vote accepted

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.

share|improve this answer
    
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.) –  Santosh Linkha Jan 3 '11 at 7:50
    
@explorex: you have access to all your files when booting a live system from USB or CD –  Takkat Jan 3 '11 at 8:02
    
okay i will try, right now i am downloading one –  Santosh Linkha Jan 3 '11 at 8:07
    
Can you be a bit more specific @binW? There's nothing wrong with explaining it in painstaking detail ;-) –  Stefano Palazzo Jan 3 '11 at 8:37

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.

share|improve this answer

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.