I have Windows 7 and Ubuntu 12.04 as dual-boot and on the same 500GB HDD.

I have partitioned the drive into NTFS file system from Windows before I installed Edubuntu 12.04 in the remaining free space.

Now, there is a drive(G:) accessible through Windows and has few folders.

  • I boot into Edubuntu and create a folder "LinTor" and download movies and few software from torrentz. Before I download, it showed 49GB free out of 62GB. After all the downloads it showed 31GB free out of 62GB.

  • Then I boot into Windows and I couldn't find this "LinTor" folder. I wondered that might be happening as I hibernate Edubuntu (using sudo pm-hibernate) and then boot into Windows. I then create another folder in the same drive(G:) with the name "001" to check if this was accessible from Edubuntu.

  • Now I reboot into Edubuntu to find that "LinTor" folder has disappeared and "001" folder wasn't showing up either. Surprisingly, the drive size still shows 31GB free out of 62GB but when I check it from Windows, it shows 49GB free of 62GB.

There is one thing I would like to mention. When I was trying to unmount the NTFS drive(G:) from Edubuntu before booting into Windows, it prompted me with this message:

Do you want to empty the trash before you unmount the drive? Once the trash is emptied the data is permanently deleted and cannot be recovered.

Please help me understand what could be the problem and how do I recover the missing folder?

  • Check your trash...what do you see?..empty? – Prasad RD Sep 19 '12 at 13:51

Before you reformat the drive there is a lot you can do to recover your data or attempt a repair. One option is to install testdisk from a Terminal with

sudo apt-get install testdisk

With no other disk attached (including USB media) run it by typing

sudo testdisk

From the first screen choose the option to create a new log. From the next screen you should see just one disk - press enter to proceed. On the next screen, press enter to select an Intel partition table type. Choose analyze on the next screen. You may be asked it you want Testdisk to check for Windows created partitions - select yes if so.

At the next screen you should see a list of partitions - how many depends on how you installed Linux. You can choose each one in turn by highlighting the appropriate one and pressing "P" to list the files and from there you will get the option to press "C" to copy files and or directories. They will go, by default, to the directory you were in when you started Testdisk. Make sure you have enough space before you start (run du -h in another Terminal tab if you can't remember).

At this point you will have a copy of your data without changing anything on your disk - Testdisk can read partitons which Windows cannot see and Linux hasn't got mounted. If you start running anything that attempts to repair the partition table (for example) you risk losing access to the data. A Format is your data's tombstone for sure.


If you have a ntfs partition you use in dual boot from both Linux and Windows ALWAYS shut down the one system if you want to boot the other. If you don't do so the partition will not be properly unmounted. If you use hibernate, a system remembers it's state and the usage flags for the partition are being held (I have to admit I'm not that much into the technical details here, maybe someone else can provide a more technical correct answer). As a consequence the other system (Windows) cannot access that partition properly. Even if you reboot and wake the previous system (Ubuntu) from hibernate Windows might have tried to access the partition in the meantime, so it's state changed. If you shutdown when changing systems you'll prevent those errors in the future.

I have no idea how to recover the lost files though. Sorry!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.