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.

Is there a way to convert a FAT partition to ext3 (or other ext..) while keeping the data on it? I don't have access to a external USB hard disk to temporarily store the data, so I'd like to just convert it while the data sits on the partition. Is that possible?

share|improve this question
    
How big is your disk and how much data is there on it? I have an idea, but it requires you having enough space to store a copy of everything you wish to preserve. –  Chris Wilson Nov 20 '10 at 13:20
    
It is possible if you have at least as much free space as your largest file + the minimum size used by ext3 for FS headers & metadata. But doing it like that is not really safe if you don't have backups (which you obviously don't have) and depending on the free space available it might take a lot of time and manual work. –  JanC Nov 20 '10 at 13:36
    
Just assume my hard disk is 90% full. I can't copy the whole partition to a temporary filesystem. I think I will have to buy an extern hdd. –  Alexx Hardt Nov 20 '10 at 14:32
add comment

3 Answers 3

If you're not booting off the partition (is this even possible without using wubi?) and it's at least half free then just use gparted (paste apt:gparted in firefox).

  • Run it from the menu.
  • Find out the name of your partition using fdisk -l in a terminal. The partition named something like /dev/sda* where * is a number. Or look through the list in the upper right edge of gparted
  • Resize the fat32 partition to less then half of it's original size
  • Create a new ext* partition
  • Move all files over to the ext partition
  • Delete the old one and resize the ext partition.

Note that I've done this several times and it always worked as intended HOWEVER there are many reports of people that lost data this way. Depending on the amount of data you can use Ubuntu One or Dropbox to backup your stuff. They both offer 2 GB which is most probably not enough.

share|improve this answer
    
Hey, I used gparted to resize and move the partitions around. Now I just have to convert the filesystem. Apparently it's not possible to change a filesystem /with data on it/ without tricks? –  Alexx Hardt Nov 20 '10 at 14:29
    
You already split the partition have created ext and moved your files over? Then you can just delete the old fat one and resize ext. No converting needed here. –  turbo Nov 20 '10 at 15:08
add comment

There is no direct conversion possible. You will need to copy you data to another drive/partition, change the filesystem, then copy the data back :-(

share|improve this answer
add comment

It is posible to convert.

However, by definition, any conversion is risky, and the only way to guarantee you will "keep the data" is to do a back-up... but in that case it's simpler to delete partition -> create partition -> copy as per the other aanswers.

share|improve this answer
add comment

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.