LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-30-2009, 12:40 PM   #1
gbmonster
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Rep: Reputation: 0
Unhappy I formatted my main drive? How can I recover it?


I know this is an INCREDIBLY stupid thing to have done!

I was trying out Linux for the first time today, I was quite impressed but whilst trying to remove it again, having decided it wasn't quite where it needed to be for me yet... I chose to reformat the small drive that I'd installed it to. (This was all part of a GRUB removal issue that locked me out of my main Vista OS).

gparted was kind enough to warn me I'd lose data but I was pretty sure it was referring to the small 8gb drive.

It formatted my 160gb Vista drive!!!!

I still have the feeling that someone has torn my insides out.

Can anyone help? The only thing I can boot to is this Linux CD based version and the Vista Disk from which I can theoretically install Windows again.

I am trying to not touch the 160gb drive at all so far.

Help me PLEASE!

I'm off to boil my head for 10 mins or so.

GB x

Edit. aaargh... I'm so new to Linux I can't even install a pesky program! Found something called TestDisk that MIGHT do it. I want to cry!

Last edited by gbmonster; 10-30-2009 at 12:46 PM. Reason: Adding an update.
 
Old 10-30-2009, 01:17 PM   #2
rich_c
Member
 
Registered: Apr 2008
Location: UK
Distribution: openSUSE, Fedora
Posts: 386
Blog Entries: 74

Rep: Reputation: 81
Photorec might be what you want to recover your data. I'm not sure if it's on http://www.sysresccd.org/Main_Page.
 
Old 10-30-2009, 01:46 PM   #3
gbmonster
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the reply Rich,

I tried to create a CD for that SysRescCD but my system won't let me put a CD in as I'm busy running the Linux system from it. :-s

I don't think my pc is new enoug to boot from a USB stick, not that I have one big enough.

I think I'm going to have to go shopping for a new drive just so I can install vista to get the machine running and then hopefully recover the drive after that. or at least the files from it.

>...<
 
Old 10-30-2009, 02:07 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
You can use:
http://www.ultimatebootcd.com/

it has testdisk on there. Testdisk can recover lost NTFS partitions, see here:
http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

Usually testdisk is relatively safe to use, so you can use it right now to at least see if it can find the lost partitions, but indeed you may want to play it safer and make an image of the drive as is to another disk, then work on it.
 
Old 10-30-2009, 03:26 PM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
Hello gbmonster,

I'm not sure if you really formatted your Vista-partition.
Formatting a partition would mean to create a new filesystem on it. Did you do that? and if so, which filesystem?
If you only have partitioned the drive, it would be possible to recreate the partition-table and then boot the Vista-DVD and let it repair the masterbootrecord.
The question is: what did you do with gparted? If you've only deleted your Vista-Partition without doing anything additional it would be easy to create the partition with gparted again.

Markus
 
Old 10-30-2009, 04:22 PM   #6
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,807

Rep: Reputation: 215Reputation: 215Reputation: 215
Standard advice...

Before you use TestDisk. the utility that seems to be most frequently recommended for restoring partition tables here on the forum, you might use a copy of Clonezilla or use the command "dd" to make a clone copy of the HDD or space on the HDD where the partitions were found. Do not, of course, do anything that will write to the HDD.

Then try the restoration procedure on the copy, giving yourself the chance of failing and trying again on a new copy.

PartedMagic has both Clonzilla and TestDisk.

http://partedmagic.com/download.html

http://clonezilla.org/download/sourceforge/

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

Google will show you the way to more guides to TestDisk.

Last edited by thorkelljarl; 10-30-2009 at 04:53 PM.
 
Old 10-30-2009, 04:48 PM   #7
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
are you sure you formatted your 160?
maybe it just looks like you did.
 
Old 10-31-2009, 06:47 AM   #8
gbmonster
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Unhappy

I have installed ubuntu Linux on an 8gb drive I had kicking about. This allowed me to create a SysrescCD live disk and using THAT I was able to use testdisk to see what was there.

It does appear that all my data is intact and that it is the partition data that has been erased. Basically, as I remember, I used gparted to delete the partition which had Linux installed but thinking I was working on the small part I zapped the big 160gb one. Maybe a small tweak needed in the warning screen of gparted to stop muppets like me killing vital things!?

Anyway, it looks like testdisk would happily 'write' the correct partition data but I am terrified now of making things worse!

I just bought and installed a shiny new Seagate 500gb (Only 49.99 from Maplin!) SATA drive and I'm going to try cloning the old drive to it and recovering that. Thanks thorkelljarl it seems a fine idea.

Failing that I may try installing Vista to my new drive and use some windows based tools that I am more familiar with to copy what I need back from the wounded drive.

Now to work out how to install clonzilla to my 8gb increasingly useful Linux system rather than having to run it from a CD.

Linux may be fiddly still but I like it. ;-)
 
Old 10-31-2009, 06:54 AM   #9
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
Now that you have the drive, just make an image of the old HDD to the new one, then try using testdisk to recover the partitions on the old HDD.
 
Old 10-31-2009, 08:33 AM   #10
gbmonster
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Talking

Well... my first battle is won...

After lots of complaining messages from Clonzilla about the filesystem being too fubar to copy! I took a leap of faith on testdisk and wrote the partition data. I now have access to all my files via Linux. I'm about to disconnect my Linux drive to see if the Vista drive is happy to boot yet. Though with GRUB still wriggling about in the system I suspect I'll need to sort that out first.

Plan B is still to install Vista on the new drive and migrate all my important stuff over. It wouldn't hurt to use this whoops as an enema for the PC anyway.

Wish me luck. Any suggestions about grub gratefully received.

Thanks so much for all your help so far peeps.

GB x
 
Old 10-31-2009, 08:45 AM   #11
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,807

Rep: Reputation: 215Reputation: 215Reputation: 215
If Vista won't...

Congratulations on graduating from big problems to little problems. Sorry about Clonezilla.

If you have created another, a problem with the Vista bootloader, this may help you.

http://neosmart.net/wiki/display/EBC...r+from+the+DVD

Last edited by thorkelljarl; 10-31-2009 at 08:49 AM.
 
Old 10-31-2009, 11:14 AM   #12
gbmonster
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Talking

It's alive, ALIVE!!!

Fixed the partition, stopped GRUB annoying me and unplugged the LINUX drive and It all started as if nothing had ever happened! How cool is that!?!

I'm now in the throws of relocating all my personal files, very carefully, onto the new drive and considering my best options for backing up the vital ones.

Also going to give the EasyBCD a try and see if I can convince the PC to let me access Linux drive or Vista without too many annoying options screens at bootup. If it doesn't look easy I'll abandon Linux for now. :-(

Thanks to all for your help.

I'm gonna have a well earned beer now while I let files move about.

GBx
 
Old 10-31-2009, 11:17 AM   #13
gbmonster
LQ Newbie
 
Registered: Oct 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by thorkelljarl View Post
If Vista won't...
Congratulations on graduating from big problems to little problems. Sorry about Clonezilla.
By the way, I think Clonzilla could have done the job if I'd been advanced enough to use it to its full potential! So thanks, and definitely no need to apologise, it was a good plan and well worth the learning I gained from the detour.

GBx
 
Old 10-31-2009, 11:37 AM   #14
rich_c
Member
 
Registered: Apr 2008
Location: UK
Distribution: openSUSE, Fedora
Posts: 386
Blog Entries: 74

Rep: Reputation: 81
Now you're back in business, if you don't want dual boot at the moment try VirtualBox. Assuming you've got capable hardware I'm sure it'll meet your needs. Here's a tutorial.
 
  


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
recover files in formatted fedora pc sskraju Fedora 4 09-01-2009 12:46 PM
gparted says my main partition isn't formatted??? captainxark Fedora 3 08-06-2008 06:03 AM
Recover formatted EXT3 partition designator Linux - Software 10 03-29-2008 08:30 PM
Newby that needs to recover data from failed NAS drive (xfs formatted) MargJT Linux - Newbie 6 02-24-2008 02:13 AM
recover data from formatted hdd sebastiano Linux - General 5 03-27-2006 08:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:12 AM.

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
Open Source Consulting | Domain Registration