Patrick’s development blog

Recover lost partitions with Testdisk

Posted in Linux/GNU by Patrick on July 21, 2008

By mistake, I deleted some of my partitions and totally messed up my partition table a couple of days ago, removing the possibility of booting up my computer at all.  Luckily, I found a open source program called Testdisk.

Testdisk is a free data recovery software that can recover lost partitions and make partitions bootable again. Here’s how I recovered my Windows XP partition using a Ubuntu live-CD.

First, I enabled all uncommented repositories in /etc/apt/sources.list.

sudo su
nano /etc/apt/sources.list

Then I updated the package repository list and installed Testdisk:

apt-get update
apt-get install testdisk

When it’s installed, you can start it by typing its name in the terminal. You’ll be asked to create a log file (optional). After that, choose analyze and Intel/PC partition. Your partition table will be shown, wait until it’s analyzed. After the analyze is done, you can also choose to make a deep scan which is recommended. If you decide to recover a partition, just click the right arrow button so the current selection turns green and continue by pressing Enter. You’ll be asked to write this partition on the partition table. Do this.

That’s all, that worked for me at least. I only have some weird problems with my boot manager right now, but the partition is fully bootable.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: