LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-02-2006, 08:52 PM   #1
anubis26
Member
 
Registered: Jan 2005
Location: Somewhere in the Central Timezone
Distribution: Suse 10.0
Posts: 128

Rep: Reputation: 15
Lost access to windows partition, due to typo in command


I was trying to repair a flash drive, following a post on this forum, and accidentally issued /sbin/mkdosfs -F32 /dev/sda1
instead of /sbin/mkdosfs -F32 /dev/sdf. sdf is my flash drive and sda1 is a 120 gig windows ntfs partition. I rebooted knoppix and it sees sda1 and sda2 (suse, is fine) and sees nothing on the partition. It cannot have destroyed it as the command took less than a second to execute. It provided no output. When I try booting into Windows, I get a message saying that this is not bootable, please insert a system cd. Please help, as I had a website project due Friday on it!
 
Old 08-03-2006, 01:14 AM   #2
ckin2001
LQ Newbie
 
Registered: Jul 2006
Location: Chambana
Distribution: debian
Posts: 17

Rep: Reputation: 0
You could try a windows restore disk. Or you could try tools from http://www.linux-ntfs.org/ - they have one called mkntfs. The tools would probably give you a way to recover the data, at the very least.
 
Old 08-03-2006, 03:18 PM   #3
anubis26
Member
 
Registered: Jan 2005
Location: Somewhere in the Central Timezone
Distribution: Suse 10.0
Posts: 128

Original Poster
Rep: Reputation: 15
Alright, I'm compiling everything (required libraries), but have 2 questions:
-Is the restore disk the installation disk (I have no other disks)
-Will mkntfs also format it, or bring it back, like reversing mkdosfs?
 
Old 08-03-2006, 04:52 PM   #4
anubis26
Member
 
Registered: Jan 2005
Location: Somewhere in the Central Timezone
Distribution: Suse 10.0
Posts: 128

Original Poster
Rep: Reputation: 15
Everything is going down the drain.
After installing glibc, my linux won't boot, shutdown, so I am using Knoppix now.
Also mkntfs started overwriting sda1 with 0's, so I pulled the plug at 2%. Now the computer doesn't regonise the type of partition on it!
 
Old 08-04-2006, 11:00 AM   #5
anubis26
Member
 
Registered: Jan 2005
Location: Somewhere in the Central Timezone
Distribution: Suse 10.0
Posts: 128

Original Poster
Rep: Reputation: 15
..(bump)..
 
Old 08-04-2006, 11:19 AM   #6
zLinuxz
Senior Member
 
Registered: Feb 2002
Location: Shanghai, CHINA
Distribution: RH 5.0,5.1 6.0,6.1 7.0,7.1,7.2,7.3.,8.0,9.0, RH Enterprise, Fedora C1, C2
Posts: 1,216

Rep: Reputation: 45
oh, oh.
sometimes is so frustrating using the SU user, hehe.

I also suggest restoring your windows with your intallation disk, but you will lose linux booting capability, so make bzdisk

;-)
 
Old 08-04-2006, 11:54 AM   #7
anubis26
Member
 
Registered: Jan 2005
Location: Somewhere in the Central Timezone
Distribution: Suse 10.0
Posts: 128

Original Poster
Rep: Reputation: 15
Ok, should I run mkdosfs again to give it a recognizeable filesystem type? I don't think the XP disk would help since officially the partition is blank. I did find a program called foremost http://foremost.sourceforge.net/
which won't install on Knoppix. I have burned my data from the Linux partition to CD's and will reinstall Suse, from there run foremost to see if I can pick anything up... but as I said, my most urgent question is: DO I NEED TO RUN MKDOSFS AGAIN?

UPDATE: I'm just gonna go ahead and do it, won't wait for any replies here...
UPDATE: Just mkdosfs'ed it, now starting to reinstall suse

Last edited by anubis26; 08-04-2006 at 01:32 PM.
 
Old 08-04-2006, 11:40 PM   #8
anubis26
Member
 
Registered: Jan 2005
Location: Somewhere in the Central Timezone
Distribution: Suse 10.0
Posts: 128

Original Poster
Rep: Reputation: 15
Major Update: I repaired Suse with the installation cd, foremost did not work. Neither did Active@ NTFS Reader, nor Active@ Partition Recovery. The only thing that did, however, was the R-Studio Emergency Demo http://www.data-recovery-software.ne...Download.shtml
however it is limited to <64 KB files, and $80 is a considerable amount of dough to pay. Would anyone here know of a comparable program that is freeware/shareware/costs less? Please keep in mind that I can only run linux and livecd stuff, while most programs are for windows on the same machine (No other computer in my house has SATA drives, so I cannot transfer the drive to another box). Thanks.
 
Old 08-04-2006, 11:50 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
I don't know the windows tool you're talking about, but I had success with
accidentally a re-imaged machine with these:

http://www.vanheusden.com/recoverdm/

http://jbj.rapanden.dk/magicrescue/


Cheers,
Tink
 
Old 08-05-2006, 12:35 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
I wonder if the structure of the filesystem influences the actions of the recovery software (foremost in this case). Makes sense - FAT (data strucure) will be significantly different to NTFS, and hence trying to locate the data may well be handled differently.

Personally I'd reformat as NTFS and try recovery then - on an image of the real data of course. If you fugg it up you just take another copy and try something else.

Nobody has mentioned backups yet ... interesting ...
 
Old 08-05-2006, 01:07 AM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
Quote:
Originally Posted by syg00
Nobody has mentioned backups yet ... interesting ...
That'll be because it's too late for that; like telling a chain-smoker
with an amputated leg about the benefits of not smoking. It won't
bring his leg back.


Cheers,
Tink
 
Old 08-07-2006, 11:47 PM   #12
anubis26
Member
 
Registered: Jan 2005
Location: Somewhere in the Central Timezone
Distribution: Suse 10.0
Posts: 128

Original Poster
Rep: Reputation: 15
how would i reformat to ntfs without overwriting the disk / where can i make an image without having to pay for proprietary software...
 
Old 08-08-2006, 01:58 AM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
Quote:
Originally Posted by anubis26
how would i reformat to ntfs without overwriting the disk / where can i make an image without having to pay for proprietary software...
dd if=/dev/<windowspartition> of=/path/to/img/file bs=2048
or something like that will create an image of what's currently
there. Before you go and do that check with a hex-editor that
it still makes sense (i.e. if there's only 0's - don't bother). If there's
no hex-editor installed, just the device. If it looks like mostly gibberish
you may be lucky. If it's homogenous except for the first couple
of 100 bytes you're out of luck.

Whether re-formatting with NTFS *won't* wipe the content I can't
tell, I never tried it ...


Cheers,
Tink
 
Old 08-08-2006, 02:27 AM   #14
zani
LQ Newbie
 
Registered: Jan 2006
Location: Sydney
Distribution: Ubuntu
Posts: 11

Rep: Reputation: 0
The only way I can see of getting the data back is editing the MBR, but I seriously suggest you don't try that unless you're happy with reformatting the drive if you make a mistake...

Once you change a partition type (even if you just define the partition as free space without giving it a different partition type), you can be fairly sure you've lost the data. Obviously this is why you need to backup before doing any work with partitions...

There are some commercial recovery tools that might give you a chance of getting the data back, but I don't know any of them...
 
Old 08-08-2006, 02:31 AM   #15
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,986
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
Quote:
Originally Posted by zani
Once you change a partition type (even if you just define the partition as free space without giving it a different partition type), you can be fairly sure you've lost the data.
Eh? So how did I manage to preserve data on my
bosses machine using ntfsresize in the past? I even
DELETED a partition and re-created it with a smaller
size, and the data was there... ;}



Cheers,
Tink
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 98 was lost when Linux 9 was installed. The partition was properly created. lereisch Linux - Software 1 06-14-2005 10:25 AM
How can I access files in my Windows 98 partition from my Linux partition, /w BASH? Fabyfakid Linux - Newbie 4 09-17-2004 11:05 PM
Can't Access Windows Partition nostrum Linux - Newbie 8 06-18-2004 11:17 PM
Lost Windows Partition? Unifex Linux - Newbie 7 03-20-2003 04:08 PM
Again, how to access windows partition MrPolite Linux - General 26 06-29-2002 02:34 AM


All times are GMT -5. The time now is 01:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration