Saturday, August 20, 2011

Restoring Lost Hard Drive Partitions With TestDisk

After 6 months of running Windows 7 on my Sony Vaio, I accidentally ran a rogue EXE file while trying to install a driver for an HTC Evo so I could install an Android app on a co-worker's smartphone.

By the next day, my Windows 7 installation was showing some signs of being defeated. By 5pm that Friday, I was no longer able to boot into Windows 7.

To make a long story short, I installed Ubuntu 11.04 after moving all the data from the laptop to an external media drive. Since that time, I have been struggling to get the 11.04 installation running smooth on the laptop.

I installed Linux Mint 11 to see if it would be any better. Since it is based on Ubuntu 11.04, it suffered from the same freezing problems.

After following some advice on the vaio-f11-linux Google Group, I upgraded Mint 11 to the 2.6.39 Kernel. I started with Linux Mint because it wasn't my production OS and all my data was still accessible on the Ubuntu partition. Mint is also based on Ubuntu, so if he kernel upgrade went without problems, I may consider doing the same on Ubuntu. On Mint, with the new kernel, the problem I was facing with the laptop freezing appeared to be resolved.

Because I've been telling my coworkers I'm going back to Windows 7 if this isn't resolved, I went ahead and repartitioned my hard drive and installed Windows 7. Also, I'm facing a problem with my USB Controller, which Sony says can be resolved by updating the BIOS, a task only possible from Windows 7 64 Bit. I left the other operating systems intact and also left room for more Linux OS installs to see if another platform might run better on the Vaio. Even if I move to Windows, I still want to see if I can get a good, stable Linux platform running on the Sony Vaio.

So, I ended up triple booting Ubuntu 11.04, Linux Mint 11, and Windows 7.

However, after recovering Grub2 after the Windows 7 install removed it, I noticed that all of the Logical partitions on the extended partition were missing, and in their place was 1 large unallocated block.

GParted and the Ubuntu Disk Utility both showed the same scenario. I decided to just go ahead and reinstall Mint as all of the steps I did to make it stable were still fresh in my mind.

After getting the live CD loaded, I thought to Google the situation first. I'm glad I did, because it led me to a really cool utility by CGSecurity called TestDisk.

TestDisk 6.12 detected the lost partitions and repaired them, all from the Mint Live CD. After rebooting and running update-grub, I'm now writing this article from my formerly missing Linux Mint 11 installation.

Had it not been for this tool, I'd be spending another weekend installing operating systems.

Basically, if you think you've done something to your hard drive. STOP! Download TestDisk, and see if it can help you rebuild your partition tables or save any lost data.

8 comments:

Anna said...

Great and Useful Article.

Online Java Training

Online Java Course

Java EE course

Java Course in Chennai

Java Training in Chennai

Java Training Institutes in Chennai

Java Interview Questions

Java Interview Questions

Suseela Susiee said...


Great and useful article. Creating content regularly is very tough. Your points are motivated me to move on.


SEO Company in Chennai

Kanye Co Jamila said...

Great Article
IEEE Final Year Projects for CSE
IEEE Project Centers in Chennai

Praylin S said...

Very adorable post with creative writing. This is really worth reading. I'm glad that I came across your article. Keep us updated.
C C++ Training in Chennai
C++ Training in Chennai
Unix Training in Chennai
Unix Shell Scripting Training in Chennai
LINUX Training in Chennai
LINUX Course in Chennai
C C++ Training in T Nagar
C C++ Training in Anna Nagar

cynthia williams said...

Learned a lot from your post and it is really good. Share more tech updates regularly.
AWS Training in Chennai
DevOps Training in Chennai
Angularjs Training in Chennai
RPA Training in Chennai
Blue Prism Training in Chennai
UiPath Training in Chennai
Data Science Course in Chennai
ccna Training in Chennai
R Programming Training in Chennai

jack said...

Hi buddies, it is great written piece entirely defined, continue the good work constantly.
Social Media Marketing

Aditi Ray said...

TreasureBox is operated by a group of young, passionate, and ambitious people that are working diligently towards the same goal - make your every dollar count, as we believe you deserve something better.
pop up gazebo
sofa bed
shoe rack nz

Peter watson said...

This is really an excellent blog as well as its content.
Sex Toys

Google