LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2008, 06:15 PM   #1
Painkiller08
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Rep: Reputation: 0
Unhappy Accidentally converting NTFS to Ext3...


Hi everyone..
My computer suddenly stopped booting up normal, (black screen like for hours until it eventually booted...) so I decided to switch over to Ubuntu 6.1 since I had the live cd floating around my room for a while..
I have a 160Gb hdd, in it, I had windows uE v7 and about 50 Gb worth of downloads and aroung 5Gb of my dad's work so I told the live cd to resize my hdd so that it would install ubuntu in a separate partition.. anyway.. I don't know how I ended-up doing it but I accepted the convertion of my WHOLE NTFS harddrive to an EXT3 file system... It was done so quickly I can't believe it reformatted it.. but rather just converted the file system...
but anyway.. when I realised what had happened I rebooted immediatly and it won't even try to startup saying that there is not a valid OS on the hdd.....

I'm in deep sh*t guys.... I don't know what to do..

Is there anyone out there that could give me a hand??

Last edited by Painkiller08; 12-12-2008 at 06:17 PM.
 
Old 12-12-2008, 06:27 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Is there only one partition presently. Usually an install program will have a swap partition as well. If the start and end points of the partition didn't change, perhaps changing the ID of the partition to NTFS and running recovery software might help restore some of the files. Try to repair the filesystem itself. If that isn't possible, you could try testdisk or photorec to recover files of it.

After a disaster like this, it is usually best to save and image of the HD and use the utilities on the image. That way you won't make things worse using the utilities.
 
Old 12-12-2008, 06:27 PM   #3
Quads
Member
 
Registered: Jul 2008
Location: Indiana
Distribution: Fedora, Ubuntu, Slackware
Posts: 203

Rep: Reputation: 34
It probably didn't destroy the data, just the framework to get to it, since you said it happened so fast you didn't know what happened. I don't know much about windoze anymore, but I'm sure there are NTFS recovery tools out there, if not packaged on the disc, then available online somewhere. Maybe someone else here can help you out more
 
Old 12-12-2008, 06:37 PM   #4
pentode
Member
 
Registered: Dec 2005
Location: Oregon
Distribution: Debian Testing
Posts: 488

Rep: Reputation: 38
If you have a Live CD, you should be able to boot on the CD alone, then see what you can see on the unmounted hard drive. The Live CD should have some disk recovery tools. I wouldn't get your hopes up though.
 
Old 12-12-2008, 07:28 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Start with taking an image of that drive - an external won't cost much. Disconnect the external and use it to restore the original to it's current (broken) state if/when you screw up and do more damage.
Then try testdisk to get the old partition layout back. You may then be lucky to get some use out of M$oft recovery console. Else you might have to rely on something photorec to get the files (that are still intact) back.

Search LQ using some of those names I mentioned - quite popular.
 
Old 12-12-2008, 08:22 PM   #6
Painkiller08
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Oh dear... I just ran a Winxp installation CD and it recognizes my hdd as;
C: Partition1 [Unknown] 156320 MB ( 156319 MB free)


... this must mean its been scrubbed clean doesn't it..?=(
 
Old 12-12-2008, 08:44 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
No it just means the M$oft installer is too stupid to recognise any filesystem except those M$oft sell. Mind you, the Ubuntu devs have plenty to answer for as well for their installer.
Use the open system tools suggested above.
 
Old 12-12-2008, 09:25 PM   #8
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,787

Rep: Reputation: 211Reputation: 211Reputation: 211
A Good Idea?

I would follow the advice of those who have tried it before. Make a cloned image of the HDD and give your rescue project the luxury of not having to be just perfect the first time.
 
Old 12-12-2008, 09:33 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Isn't that what I said first ???.
 
Old 12-12-2008, 09:49 PM   #10
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,275

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by syg00 View Post
Start with taking an image of that drive - an external won't cost much. Disconnect the external and use it to restore the original to it's current (broken) state if/when you screw up and do more damage.
Personally, I would do any restoration work on the copy (not the original) and keep the original as virgin as possible; including never mounting it, and only using dd to get its contents from now on.
 
Old 12-12-2008, 10:11 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
That's the sensible way to do it - but we're dealing with NTFS. If you need windoze to do anything (like CHKDSK) it'll have to be on the internal.
I just find it easier to work on the disk, and restore if necessary when dealing with Redmond. Each to their own
 
Old 12-13-2008, 05:56 AM   #12
Painkiller08
LQ Newbie
 
Registered: Dec 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I thank you all for your contributions, but, I have a real problem trying to understand what you are talking about... What is "an image of the harddrive" .. and how do I take it??

I have another harddrive (about 12gb) on which I could try installing winxp or/and ubuntu to see if I can look into my hdd.. I tried looking into it thru the live cd but It didn't appear in the My computer list.. just the dvd writer and dvd reader.. although it did appear in the device manager... :S but it said "Status: Unknown"

I really need this stuff explained to my little by little.. it's the first time I may be dealing with hdd recovery..
Thx anyways
 
Old 12-13-2008, 07:52 AM   #13
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,036

Rep: Reputation: 96
To start with, you need a seperate hard disk to make a copy of the problematic disk (this needs to be big enough to contain the entire disk image so should be at least 160GB in capacity, I would choose a slightly bigger size as not all disk manufacturers agree on what exactly constitues 160GB)

This disk can be either internal or external, but it makes sense to use an external, so that you can disconnect it easily to prevent anything happening to your "safe copy" whilst you try to fix the issue.

Was the initial disk a SATA or PATA/EIDE drive?

If it is a PATA/EIDE drive it is probably either /dev/hda or /dev/hdb

If it is a SATA drive it is probably something like /dev/sda or /dev/sdb

I would advise using a Live CD to do the actual work.

To make a copy:
  1. Boot from Live CD
  2. Attach External Drive (ensuring it is big enough to store the backup) and mount it
  3. Ensure you know which device name is being used for the damaged disk
  4. use DD to make a copy of the device (The Dangerous Bit)

dd is refered to frequently as "Data Destroyer" with good reason. It will do exactly what you ask it to do (even if you didn't mean it)

Assuming that your affected disk is /dev/hda and your spare drive is mounted at /media/external the dd command to make a backup would be:

Code:
dd if=/dev/hda of=/media/external/backup_image
You can then unmount and detatch the External device with your backup and attempt your recovery.
 
Old 12-13-2008, 08:07 AM   #14
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Quote:
If it is a SATA drive it is probably something like /dev/sda or /dev/sdb
If it is a recent 2.6 kernel that the live cd uses, then the device will look like a scsi device. Some of the code in the kernel was unified and a driver used for pata drives was removed.
 
Old 12-13-2008, 08:23 AM   #15
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,036

Rep: Reputation: 96
Fair point, sometimes I forget! (must be my age)
 
  


Reply


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
Accidentally formatted a NTFS partition with ext3 kamran_pro Linux - Software 1 10-29-2006 03:31 AM
converting from ntfs to ext3 xushi Slackware 26 09-24-2006 04:11 PM
Accidentally Formatted NTFS Partition... Looking to Recover Data Adam A Flynn Linux - Software 5 08-13-2006 12:59 PM
Help needed to recover data from ext3 file system where mkfs was issued accidentally kapilsampath Linux - General 4 04-26-2005 08:52 AM
how to convert ext3 to ntfs? cannot even see ext3 partition parv Linux - Hardware 1 12-31-2004 03:56 PM


All times are GMT -5. The time now is 06:00 PM.

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