||[Jul. 20th, 2007|05:04 pm]
I broke my laptop two days ago.
I mentioned to a friend he could try out the new ubuntu release, so I thought to myself; "hey! I should try it out too!" So, I rebooted from xp into ubuntu to update it to the latest version.
I apparently forgot my root password :(
No biggie! I'll just boot into xp, delete the linux partitions, and install the fresh new ubuntu!
I did so, and began bittorrenting the new ubuntu to my laptop, who eventually ran out of battery and auto-hibernated.
The next morning, I wanted to check my email, forgetting all about the excitement of the previous night. I quickly ascertain the lack of juice, plug lappy into the wall, and hit the power button.
Sadly, this lack of linux confused grub to no end, leading to the dreaded loading stage 1.5 ... error 17 issue, since its config was on the recently deleted linux partition.
So what! I can just boot off a xp cd, choose the recovery console, type in fixmbr, and Linus Torvalds is your uncle!
Well, I didn't have an xp disk handy, but I did have a year old version of BartPE on a USB flash drive. I knew it had diskpart on there, and I figured there must be some way to rewrite the MBR, so I was in a curious mood whilst dicking about with diskpart. NEVER BE IN A CURIOUS MOOD WHILST DICKING ABOUT WITH DISKPART.
DISKPART> select disk 0
Disk 0 is now the selected disk.
DISKPART> clean ?
The arguments you specified for this command are not valid.
DiskPart succeeded in cleaning the disk.
DISKPART> FUCK. Fuckity fuck fuck!!!one11eleven.
So, at this point I have NO partitions, a USB flash drive with BartPE on it, and a really pissed off attitude. I google "free partition recovery" on another PC to see if there are any decent options out there. It is at this point I wholeheartedly recommend TestDisk from CGSecurity. Allow me to quote from their blurb: "It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting your Partition Table)."
Best of all, it was a standalone directory that could be copied to a flash drive and run under BartPE! So, here I am, documenting my happiness at not having to reinstall everything.
Most interestingly, after the partitions were detected, recreated, the MBR was repaired (TestDisk did that too), the computer came out of hibernate when switched on. Now that's awesomeness.