Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 06-04-2004, 01:18 AM   #1
LQ Newbie
Registered: Aug 2003
Posts: 13

Rep: Reputation: 0
Data Recovery from former NTFS partition

Earlier tonight I was installing Gentoo on on my second hard drive and I was tottling along just fine...and then when I went to make the boot partition using mke2fs i accidentally typed in /dev/hda1 instead of /dev/hdb1

/dev/hda1 was my Windows XP (Home Edition) partition and it had lots of valuable data I didn't have on backup. Is there any (preferrably free) way to recover the data? The partiton is now formatted with ext2 and when I opened it up with Knoppix, it said it has an (empty) folder on it called "lost+found"

Any help would be GREATLY appreciated

Thanks in advance
Old 06-04-2004, 04:51 PM   #2
Registered: Jun 2004
Location: Britain
Distribution: Slackware
Posts: 186

Rep: Reputation: 31
Re: Data Recovery from former NTFS partition

Originally posted by exark237
using mke2fs i accidentally typed in /dev/hda1 instead of /dev/hdb1
Sh*t ...your partition looks like it's snafued as the chance of recovering an snafued partition is pretty slim.

it said it has an (empty) folder on it called "lost+found"
The /lost+found folder is where lost files and directories on an ext2 partition go if the ext2 partition gets corrupted - like FILExxxx.CHK from DOS's Chkdsk. Filenames and dirnames stored here look like 2859_3928, 1234_5, 7_7656, 7_7, etc. This has nothing to do with recoving data from overwritten partitions.

Is there any (preferrably free) way to recover the data? could try the following (I haven't tried this method), assuming you did not put any files on the partition, activated your swap partition, used 2 or more partitions on that disk, or checked for bad blocks.:

In a terminal or an xterm, log yourself in (or su yourself in) as root, and type:

# fdisk /dev/hda

Command (m for help): p

Here, record the output on paper (this is your existing partition layout.)
We need to change the partition ID from Linux to NTFS on /dev/hda1.

Command (m for help): t
Partition number:
Enter type (type L to list codes): <------ Here you put the partition ID for NTFS.

Partition 1 changed its type to NTFS/HPFS (or some other message)

Command (m for help): w (to exit fdisk)

# mount -t ntfs /dev/hda1 /mnt/hd

(If you get an error ending "too many mounted filesystems" type "modprobe ntfs" if it's supported and try the mount command again)

If this doesn't work, it looks like your data may be _very_ difficult to fix.

You may have to resort to professional data recovery solutions or get a file-system hacker to attempt it.
Old 06-10-2004, 01:17 PM   #3
LQ Newbie
Registered: Aug 2003
Posts: 13

Original Poster
Rep: Reputation: 0
Well, thank god, problem solved.

None of the ideas suggested above worked for me but I was able to use chkdsk on BartPE (dont know the URL at the moment, search google for PE Builder). In case others need this, here is the procedure I followed.

Ran the chkdsk utility with the /r switch.


Thats all. If I were to do it again, I would suggest running it twice cause I still have a few bad blocks etc. But other wise, it works like a charm.
Old 07-21-2004, 07:27 PM   #4
Registered: Nov 2003
Location: Pacific Northwest United States
Posts: 265

Rep: Reputation: 32
BARTpe is nice, but I'm wondering if you already had one of those BartPE Disks made back when your Windows partition was still healthy.

If there's a way to just download the files from

burn them,

boot them

and viola I have access to the Window XP NTFS files that weren't there,

that would make me happy.

As is the case for me, I don't one of those BartPE disks from before the drive became corrupted.

PEbuilder.exe seems worthless if you can't remember the directories from the old drive.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovery of lost data from FAT32 partition... devis Linux - Software 1 07-11-2005 09:10 AM
data recovery? xushi Slackware 2 07-04-2005 06:02 PM
need some help about data recovery! belkens Linux - Software 1 05-11-2005 05:16 AM
partition data recovery rlg Linux - Newbie 5 04-22-2005 01:27 AM
Help! Data Recovery - NOT a partition fault - ext3 carthaginian Linux - Newbie 0 10-16-2004 10:13 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration