LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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-02-2008, 03:12 PM   #1
millsrobert
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
unformat a harddrive


I have just installed Linux on a 60GB hard drive that was partioned into three drives C,D,E I thought that when I was installing Linux it was just going to format C: the whole Hard Drive was formatteted Is there any way to recover files lost
robert
 
Old 12-02-2008, 03:37 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,318

Rep: Reputation: 126Reputation: 126
Is this a class assignment or something? It seems like we're getting a lot of these lately.

But to address your question quite brutally: Yes, there is a way that *some* of your data *might* be retrieved, if it was worth your time to spend hours on the process of running the program and identifying the lost files based on their content. But, given whole your implied experience, I'd say the data is gone, and just move on.
 
Old 12-02-2008, 03:46 PM   #3
mazhar_theone
LQ Newbie
 
Registered: Mar 2008
Posts: 14

Rep: Reputation: 0
It is possible to recover data if the partition is (only)formatted. But as you have re-partitioned the hard drive and file system is also changed from fat / NTFS to ext3 / swap etc... and some space (on HD plotters) may have been overwritten by Linux files / folder on your Hard drive, it is quite difficult recover old data.
 
Old 12-02-2008, 03:54 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I do not think this sounds like homework. Further, at least some of the data is probably recoverable.

First, don't do anything that could cause writing to the disk. The ideal way to proceed would be to boot from "Live CD" Linux or maybe put the drive into another computer and access it from there.

Next, we need to know the layout of the disk. It sounds like you selected automatic partitioning and let Ubuntu have the whole disk. This means that you no longer have the partitions you mention....but **some** data is still recoverable. Run "fdisk -l" and post the results here (In spite of my admonition, this can be done safely from your current linux setup.)

Some basics:
In the typical PC, a harddrive is set up with one or more partitions. The Windows culture mistakenly names these "drives"--eg the "C drive".

Partioning does not alter data--it only changes the addressing contained in the partition table.

Creating a filesystem on a partition WILL alter some data, and of course installing the new OS will overwrite a lot more data


I have little personal experience, but the tool most often recommended is "testdisk". Again, the ideal would be to run this from a different physical drive--or from live CD. (I don't know if testdisk is available on live CD.)
 
Old 12-02-2008, 04:23 PM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Check if the MBR was backed up (in the /boot directory).
Code:
:/boot> sudo file backup_mbr
backup_mbr: x86 boot sector; 
partition 1: ID=0x7,          starthead  32, startsector      2048,   3072000 sectors; 
partition 2: ID=0x7,  active, starthead   0, startsector   3084480, 147492765 sectors; 
partition 3: ID=0xf,          starthead 254, startsector 150577245, 222082560 sectors; 
partition 4: ID=0x17,         starthead 254, startsector 372666368,  18055168 sectors
You didn't indicate which distro you installed. SuSE's repair option can try to undelete a partition.

Look for a file in /boot that is 512 bytes long. You could use fdisk or sfdisk to repartiton the drive. This may ruin your linux install, but if all of the files are located before the ressurected second partition, running fsck may fix it. The partitions D: and E: may be recoverable. Use "fdisk -u" so that you use 512 byte sectors.

It would be safer if you worked from a live distro, or the rescue mode of your install disc.

Last edited by jschiwal; 12-02-2008 at 04:28 PM.
 
Old 12-02-2008, 05:46 PM   #6
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
Knoppix you may be able to recover some of your data.

http://www.shockfamily.net/cedric/knoppix/
 
Old 12-03-2008, 02:33 PM   #7
millsrobert
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Original Poster
Rep: Reputation: 0
unformat a harddrive

thanks for the usefull information
some of us are not experts at everything

regards
robert
 
Old 12-03-2008, 05:33 PM   #8
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,318

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by millsrobert View Post
thanks for the usefull information
some of us are not experts at everything

regards
robert
Robert,
I didn't quite mean to put you off; just to give you some idea of the task ahead of you. If it's important information that's not backed up, then there are several things you can do; beginning with making a byte-for-byte copy of the disk to a spare and then working with the spare to try to retrieve it. It's possible that if you can simply repartition the drive to what it was before you did this then the wiped partitions will magically reappear. It all depends on how much effort you want to put into it. If it's critical data and you're willing to learn and work, say so, and someone will go all out to help you with it.
 
  


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
freeware unformat/undelete utility chrisortiz Linux - Software 5 04-12-2011 07:53 AM
Unformat Hard Drive cekohler1 Linux - General 4 06-21-2007 10:53 AM
How can I unformat a Reiser partition? jamuz Linux - General 2 03-08-2006 04:08 PM
Undelete/unformat programs!? dreddete Linux - Software 1 10-22-2005 11:44 AM
Unformat/convert an HDD mehesque Linux - Hardware 1 05-15-2005 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:53 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