LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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-04-2004, 05:38 PM   #1
amrgo
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora Core 2
Posts: 3

Rep: Reputation: 0
FC2 with XP - Lost my NTFS partition


Hello,

I have windows xp pro sp1
Maxtor 80GB ATA Harddrive divided into 2 NTFS partition, one is 20 Gb, and the other is 60Gb

I can't access my 60gb ntfs partition from windows or from linux..
here you are what happened..


I've installed FC2 with XP.
I got that dual boot problem, so I ran sfdisk -d /dev/hda | sfdisk --no-reread -H255 /dev/hda

sfdisk reported that it don't like my partitions and it did nothing,
I rewrote the sfdisk command with --force. sfdisk reported that it successfully wrote the partition table, then it reported that it can not access partition table and that I have to reboot.

I rebooted, then instead of getting the usual graphical GRUB screen i got a GRUB command line.. grub>

in the command line i wrote rootnoverify (h0,0) then chainloader +1 and then boot.

my xp loaded successfully. but I can only access 1 partition of my 2 partitions..
when i open my computer i can find the two partitions, but i can only access the C partition
And when I try to access the other partition (D Drive) windows prompts me to format the partition as it thinks it's unformatted

so now GRUB don't show the usual graphical screen which makes me think that something happened to linux too.

anyway, I don't really care too much about recovering linux or windows.
All I really want is to recover the second 60Gb NTFS partition. as it contains very important data.


Can anyone help please ?

Thank you
Amr Mostafa

Last edited by amrgo; 08-04-2004 at 05:47 PM.
 
Old 08-05-2004, 10:18 AM   #2
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
As for the NTFS dissapearing, it probably did if none of the systems don't recognize it. Well to get grub working again, you first must get to linux (not actually, you could do it from rescue mode, but it is better from linux itself)

At grub> command line type:

find /boot/grub/grub.conf

or

find /grub/grub.conf

Try both and only one wil produce results in form of "(hd0,1)", where hd0 stands for your primary harddisk, and 1 stands for your second partition on that harddisk.

Well, now you know where the grub.conf file is(it is on your /boot partition), you have to make that partition root:

root(hd0,1)

and replace the hd0,1 with the results you got from the find command.

Once there, depending on what find command got you the results:

cat /boot/grub/grub.conf or cat /grub/grub.conf

This will show you the contents of the grub.conf file:

Look for the lines:

title Fedora ....
kernel .....
initrd ......

Retype these lines, followed by enter (remember, use the TAB key to autocomplete, and you can always use cat /boot/grub/grub.conf to see the lines again) After you typed them all in, type boot to boot into linux.

You should now be in linux, happy you

Once there, switch to console (by pressing CTRL+ALT+F1, or simply opening the console in GUI).

Switch to root or login as root:

su
<your root password here>

You are now root, so be careful

type:
grub (and if that doesn't work, type: /sbin/grub)

You are now in grub> command line again.

type:

setup (hd0) or setup (hd0,1) if that is the harddisk, you got from the find command earlier.

This should produce some info

if errors of any kind occur, try this:

root (hd0,1) where hd0,1 are the results you got from find command earlier

and then:

setup (hd0) or setup (hd0,1) I am not sure which it is, but don't worry, the wrong one won't work, so you will now. One of them will produce some output, saying all went well.

Once you are done, type exit, and reboot. You should get the graphical boot screen.

Good luck!

Peace!
 
Old 08-05-2004, 05:23 PM   #3
amrgo
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora Core 2
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your great help!
I will try this when I go to home, I'm at work now

that was about GRUB, but don't you have any idea about how to fix NTFS ?
All my data are on the Harddisk, but somehow the boot sector is damaged.
Do you know how can I recover it ?

Thanks a lot again,

my respects,
Amr Mostafa
 
Old 08-06-2004, 05:25 AM   #4
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Sorry, I never played with fdisk to recover a partition. For a couple of reasons, on of them being, I usually made it worse, lost all partitions. To recover a partition, you really must know your hardware. You have to konwo everything about your harddisk. I didn't (don't), so I didn't (don't) play with it.
 
Old 08-07-2004, 10:13 AM   #5
amrgo
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora Core 2
Posts: 3

Original Poster
Rep: Reputation: 0
I have recovered 100% of my data using program called: GetDataBack. (http://www.runtime.org)

I was trying to recover my data by fixing the boot sector. but anyway, thank god a program like GetDataBack exists !
I tried Easy Recovery Pro, and I found it -really- useless.

Cheers,
Amr
 
Old 08-07-2004, 01:57 PM   #6
marghorp
Senior Member
 
Registered: Jan 2004
Location: Slovenia
Distribution: Slackware 10.1, SLAX to the MAX :)
Posts: 1,040

Rep: Reputation: 45
Nice work
 
Old 08-08-2004, 08:49 AM   #7
proudclod
Member
 
Registered: May 2004
Distribution: Fedora Core 2
Posts: 381

Rep: Reputation: 30
What I had to do was:

do the sfdisk to rewrite the mbr.

reinstall grub from the FC2 rescue disk (grubinstall)
 
  


Reply



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
Lost NTFS partition? Jongi SUSE / openSUSE 12 07-04-2005 09:21 AM
HELP PLEASE!!! Lost NTFS Partition frijj2k Linux - General 9 05-27-2005 10:44 AM
I lost my NTFS partition by mistake using GRUB yoonsangkyun Linux - Newbie 6 06-03-2004 07:53 PM
I lost my NTFS partition by reinstalling GRUB yoonsangkyun Linux - General 4 01-22-2004 02:25 PM
Lost XP HPFS/NTFS partition ajkhan Linux - General 3 09-19-2003 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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