Hello. I was trying to make a bootable flash drive from the startup disk creator, and when I went to erase the flash drive I accidentally erased the wrong drive, a 1TB removable drive. The operation took less than a second and gave no warning. I tried erasing the flash drive and it took about a minute, but it took but a second to erase the 1 TB drive, which is very surprising.

Please help, Gabriel

  • One year ago, I have made the same mistake with bash. Formatted the partition which the running OS was stored. Very fast, with no warning (you know, the super user rights) Everything started to act like monster. Restarted the computer and could not be able to start again. I was not able to find an answer. Lost my data and OS. Hope the best for you.. – Hilmi Erdem KEREN Apr 10 '12 at 18:16
  • i will cry!It seems to me that i am veeery fool!And i am angry.Maybe i am wrong nut no authentication warning for me this time.But i am not sure.As a last hope i cannot see it contents becausemaybe i pressed make it bootable,so when i connect it to the laptop i cannot see a thing,so is the undo way possible to see its contents?thanks – gabriel Apr 10 '12 at 18:23
  • 2
    Backups, backups, backups... – psusi Apr 10 '12 at 18:24
  • 2
    well, i have a question about this..1T backup?HOW? – gabriel Apr 10 '12 at 18:27
  • 2
    help.ubuntu.com/community/DataRecovery - start here - good luck – Ringtail Apr 10 '12 at 18:35

Try to recover the partition with TestDisk. Careful: don't write on the drive.

Instructions step-by-step:

  1. Install TestDisk
  2. Mount the drive
  3. Launch sudo testdisk (eventually enlarge the terminal)
  4. Create a new log file
  5. Select the drive
  6. Select partition Table (usually Intel should be good)
  7. Analyse
  8. Quick Search (this should found only the actual partition)
  9. [Enter]
  10. Deeper Search (this should find your old partition, you can stop it after it found it) Once you found what you think it's your partition select it with up/down arrows
  11. [P] for list files and look if it seems it
  12. [q] to quit list files
  13. [Enter]
  14. Write to save new partition table to MBR.

Look carefully: this don't overwrite / recover any data, just the MBR of the disk.

  • how can i do that? – gabriel Apr 10 '12 at 18:24
  • any steps for it?please! – gabriel Apr 10 '12 at 18:32
  • Sorry, I was sleeping (in my country it's morning now ;) ) – dadexix86 Apr 11 '12 at 8:14
  • 2
    Ok, added a step-by-step guide to the previous answer. – dadexix86 Apr 11 '12 at 8:23
  • Just GREAT help for me!thank you very much!i just have my files back!was so easy.With your help of course!thank you again! – gabriel Apr 11 '12 at 15:33
  • First, don't panic. If necessary and if you don't need your data urgently for your thesis or for a customer, take a nap, sleep one night and come back to your drive when the pressure has fallen.
  • Second, create a copy of your drive using dd (maybe ask a good friend to be sure you are not mixing the if and of parameters). NEVER use a recovery tool directly on the drive from which you are trying to recover the data. You could lose your last chance to recover it. For that, you will need a drive bigger than the drive you try to recover. 1TB is quite big, and might be expensive for you to buy a new drive. In that case, maybe borrow a drive from a friend or wait 6 months until you save the money and/or until the drives are cheaper. If you give up now and format your drive, you might regret it in 6-12 months.
  • Third, as suggested by dadexix86, give testdisk and photorec a chance (depending on the filesystem you have on your drive and the type of files you are trying to recover). Take your time to read the documentation to see if your filesystem is supported. And have a look at the tutorials on their website. And again, don't use it directly on the drive.
  • I like the advice to have a night's sleep first - when you're stressed it's tempting to stay up all night trying to fix it, but with a good sleep you'll be a lot more alert and make better decisions the next day. – Clive van Hilten Apr 10 '12 at 21:24

Take a look at this: Is there any recovery software available for ext4?

Placed here for your convenience:

Take a look at this:

Best tool to recover removed files

Formatted and lost 6 years worth of photo memories.. any way to get this back?

How to recover Ubuntu partition after computer failure?

Where the answers of some other people under those questions may also be helpful for you.

Additionally, take a look at this (quite long but it saved my life).

Recovering deleted data from deleted partition- solved from within the Israel Linux Remix Team System.

Good luck!

You may also wish to take a look at this: How to recover Deleted Files and Folders?

This last one shows how to use an easy way to bring back your partition in a few steps. After which I suggest you to back up your data and start again with your hard disk drive. (Format it and copy everything back on it).

Oh Sorry! Good luck!


As @Matthew said install test disk. If you have a USB startup disk of Ubuntu with some space allocated for storage you can install TestDisk by the command

sudo apt-get install testdisk

Testdisk looks like a command-line utility. But don't panic. You need not enter weird commands. It is easy to use.

Have this tutorial


Read Ubuntu Community Documentation


Google is your friend Wish you all the best


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.