3

All day today, I've been reformatting a USB flash drive repeatedly and I was doing this multiple times in a row, and I began to grow a little too careless...

Without paying attention, I accidentally reformatted my /dev/sda1 in the GNOME Disks manager utility in Fedora. I didn't overwrite all the data with 0s, but instead just did the quick rewrite.

After rebooting, my mistake was made clear when my laptop immediately booted into rescue grub mode.

I know /dev/sda1 was 512MB, so I think my actual data is safe and fine, on /dev/sda2. But is there a way I can get Fedora to successfully reboot again?

  • Possible but you'll likely be reinstalling the OS and restoring key files from backups. – mdpc Aug 25 '14 at 3:28
2

You can try recover some files with the program testdisk.

They have a good tutorial and in some Linux distros it's already included. If yours has it not, download from here.

| improve this answer | |
  • Using this now! Will share results after. – JWF Aug 25 '14 at 4:49
  • 2
    TestDisk did the trick! I successfully loaded Fedora Xfce onto a flash drive, booted from USB on my laptop, and then I downloaded TestDisk onto my live USB. From there, it was all straightforward and simple, and I am happy to say that I am typing this from my laptop once again without ANY data loss. :) Thanks much! – JWF Aug 25 '14 at 13:00
4

You may want to try booting into a recovery disk. System Rescue CD MAY be able to recover the data. It is better to do this from a live disk because then you are less likely to overwrite the information that is there.

When you delete a file it is not wiped, but instead the computer sees it as space that it can write over. As long as it has not been written over then you can recover whatever data is there. Depending on how you formatted the device you may or may not be able to recover it. Good luck.

Edit: Use Unetbootin to make a live usb.

| improve this answer | |
  • My only problem with this is that the only computer I have readily available for me is an iMac, and it does not seem there is a clear way to get this program onto a USB stick on a Mac. Not sure if this is much of an option for me in my current situation... :( – JWF Aug 25 '14 at 4:50
  • 2
    I added a link to unetbootin, which is a program that will aid in live cd creation on a usb. It works on Windows, Mac, and Linux. So as long as you have a usb (or cd) then you should be set to go. – Steven Walton Aug 25 '14 at 20:06

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.