3May/113

Why Testdisk and Recuva are Awesome and I am an Idiot

Well hello there, how did the tubes treat you on your trip to this sad tale? Good? Excellent, now I must begin.

Like any good geek story, this one starts out with a command line and a slight overdose of mountain dew. I, being a generic geek have a large external hard disk with all my geeky treasures on it.  Folders filled with .iso's, install files for most of my common used programs and a batch file to install them, large amounts of tech manuals and awesome background pictures featuring both penguins and lolcats (not really, I swear).

I had recently decided to reconfigure my thinclient with an external hard disk rather than the 8gb thumb drive I had been using. Easy task, I just need to burn the latest arch netinstall .iso to my thumbdrive. Quickest route != unetbootin, but rather dd, which I love. Mostly. Plugged in the hard disk and thumb drive, navigated to /media/Teh Disk/iso/linux/ and then:

time sudo dd if=arch_2010_04_x64.iso of=/dev/sdc

and I walked away to use the restroom (Remember, mountain dew overdose, it happens).

By the time I came back dd had finished, informing me that the iso had been burned as it were. Thumb drive transferred to the thinclient and hit the power button.

Error "operating system not found"

Weird, ok - reboot, check bios, yeah usb is first boot option. Beep ............ Error "operating system not found"

Dang it dd, you told me you copied right. Thumb drive back to my trusty laptrap, plugged in. "Gentoo_netinstall" shows up, which happened to be the last name of that thumb drive. Hmm, that *is* strange. Must have not copied right, back to the command line:

cd /media/Teh Driveisolinux

error, no such directory.

Well ladies and gents, it hit me just then - and a quick df -h confirmed my idiocracy: /dev/sdc was my external, and /dev/sdb was the thumb drive, opposite of normal, true - but obviously possible.

Now, unfortunately the first couple hundred mb were overwritten, and the mbr totally jacked. (hey, it booted and installed arch so I guess not 100% bad)

So I fired up testdisk and did a scan on the hard disk, promptly found and restored the old mbr which brought my ntfs partition back. Tsk tsk, I know - and this is the final sad part of the story - due to not fully developed ntfs drivers for *nix, I had to toss in my Windows 7 (for portal 2 only, I swear) drive and recover from there. Then I fired up Recuva and directed it to scan my drive for all files. After about an hour (not bad for 250gb) it found most of  the files and I restored them to another external drive. (I checked this time)

Well, about 98% restored now, and only a few truncated files. A couple directories with nothing but mass amounts of unsorted files which is about to be my own special nightmare.

Moral of this story?

1. Always ALWAYS verify what command you are running and the correct syntax.

2. df -h or fdisk -l are magical ways to ensure you are looking at the correct /dev/sd*'s

3. Don't do anything on a full bladder. Ever.

I hope this sad story entertained you

 

--Badger32d

  • bai_hao

    I feel ya about the mass of unorganized files. I’m wading my way through organizing ton of files too. It’s been a few months of on and off work. :/

  • http://www.shortntough.com dreadpirate15

    Wow… Owch bro! I think I should post some of my own… ahem.. experiences with *nix commands. Whenever I DO have time 😉

    Also; emails coming soon!!!

  • Grizlbr

    Thank you I do not feel alone: Booting from int hd to install to thumb my bios determines what is where still working to determine what to edit to get internal boot back. Currently attempting to put a distro on thumb drive while in linux to recover wifes net book MBR when booting from thumb drive any informed directions?