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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-19-2012, 10:50 PM
|
#1
|
LQ Newbie
Registered: Mar 2012
Posts: 2
Rep: 
|
LInux file system overwritten by ntfs
I recently accidently installed windows 7 ntfs over my ext4 file system. Is there a free utility to recover my ext4 files after they have been overwritten by ntfs. I need a program that will work from the Windows environment but it needs to recover my /home directory from Fedora 14.
|
|
|
06-19-2012, 11:22 PM
|
#2
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Several generic points:
If you installed Windows on top of the old files, then trying to recover while running Windows will reduce the odds of recovery. In fact, you should not be running Windows at all---for anything.
Depending on the size and location of the old and new partitions, there's a chance of recovering at least some data----the point is that installing a filesystem does not necessarily wipe out old data.
I would NOT expect that you would recover any of the old filesystem structure---only individual files.
How to proceed:
1. Do not use that disk for anything---attempt the recovery only while running from a different disk, Live Linux CD, etc.
2. If the data is really valuable, then clone the disk before tryig anything.
3. the most commonly cited tools are photorec and testdisk---read up on them here: http://www.cgsecurity.org/wiki/Main_Page
|
|
|
06-20-2012, 12:42 AM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,384
|
Quote:
Originally Posted by Charles_N
I recently accidently installed windows 7 ntfs over my ext4 file system.
|
This could be read (at least) two different ways.
- if you actually installed the full Win7, you have overwritten a large portion of that ext4 filesystem. That portion is gone forever - no prospect of recovery. For the rest, try as above.
- if you merely re-formatted as NTFS (without actually writing any files), you may have a better chance. Again see the above, but in addition mkfs.ext4 has a "-S" (note that's a upper case ess) option. Be aware of the warnings in the manpage. Some time ago I tested this on ext3 after deliberately re-formatting as NTFS and it worked for my test-case.
I guess you never bothered with backups ?.
|
|
|
06-20-2012, 12:55 AM
|
#4
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Quote:
Originally Posted by pixellany
In fact, you should not be running Windows at all---for anything.
|
I still laugh when I see good Windows insults.
Quote:
Originally Posted by pixellany
1. Do not use that disk for anything---attempt the recovery only while running from a different disk, Live Linux CD, etc.
2. If the data is really valuable, then clone the disk before tryig anything.
3. the most commonly cited tools are photorec and testdisk---read up on them here: http://www.cgsecurity.org/wiki/Main_Page
|
This helps. However, to build on it, I would say, that if the data is very valuable, VERY, VERY, Valuable, Turn off the computer and take the drive out and take it to a data recovery lab. Expensive, but worth it.
|
|
|
06-20-2012, 05:59 AM
|
#5
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
[QUOTE=szboardstretcher;4707460]I still laugh when I see good Windows insults.
!!! I honestly did not mean it that way---but I see how it could be read. The point was that while running Window, files can be written to the disk
|
|
|
06-20-2012, 06:08 AM
|
#6
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Quote:
- if you actually installed the full Win7, you have overwritten a large portion of that ext4 filesystem. That portion is gone forever - no prospect of recovery. For the rest,
|
I'd agree that the chances are slim---but maybe not zero. What I'm thinking is that a filesystem stores data where it finds space---until the partition is full, the old data is still intact. (my understanding is that the creation of a filesystem, while it does wipe out the old filesystem---does not necessariy wipe out all the data.)
|
|
|
06-20-2012, 06:18 AM
|
#7
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,384
|
The bits that are overwritten are gone - the bits that aren't overwritten may be recoverable.
That's what I said.
|
|
|
06-20-2012, 07:05 AM
|
#8
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Quote:
Originally Posted by syg00
The bits that are overwritten are gone - the bits that aren't overwritten may be recoverable.
That's what I said.
|
Right......
I'm suddenly wondering what happens when a old file gets some new data written into the middle of it. In this case, photorec would still find the beginning of the file----but would it have any way of know that some of the data was not part of that new file?
|
|
|
06-20-2012, 07:33 AM
|
#9
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by pixellany
Right......
I'm suddenly wondering what happens when a old file gets some new data written into the middle of it. In this case, photorec would still find the beginning of the file----but would it have any way of know that some of the data was not part of that new file?
|
No, Photorec recognizes files only with using the commonly known headers/endings/whatever, but it doesn't care about the contents. This may end in Photorec "recovering" a file that is unusable because it is partially over-written or was fragmented.
|
|
|
06-20-2012, 01:40 PM
|
#10
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
In a very true sense it could be recovered 100%. I doubt anyone here could do it unless they had access to some very specialized hardware. Companies charge like $1500 or more to recover disks. They have a special magnetic detection that tries to find out what the disk was along with software.
Can you do it? Kind of doubtful but if the data is untouched by reason of the same disk geometry then maybe. Undoing a partition and recreating it gets a bit more difficult but not much more.
Last edited by jefro; 06-20-2012 at 01:41 PM.
|
|
|
All times are GMT -5. The time now is 08:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|