LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-16-2008, 02:10 PM   #1
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Rep: Reputation: 30
Help with XP partition corrupted


I have been tring to study about the partition tables from the forums and have learn alot. However, I still cannot figure out how to fix my problem disk. I partition my xp drive as c:,d:, and e:.
Now, I cannot access my d: drive. When try to accesing in XP, it ask me to format the drive. In linux, it says the partition is not valid.

Here is the partition list from fdisk

Code:
Disk /dev/sda: 100.0 GB, 100030242816 bytes
240 heads, 63 sectors/track, 12921 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        3439    25998808+   7  HPFS/NTFS
/dev/sda2            3440       12921    71683920    f  W95 Ext'd (LBA)
/dev/sda5            3440        5472    15369448+   7  HPFS/NTFS
/dev/sda6            5473       12921    56314408+   7  HPFS/NTFS
The problem is my /dev/sda5 or my d: drive. Other drive is ok. Using
testdisk does not work.. it find the partition, but I cannot list files
from the /dev/sda5

Dumping the 512 bytes of /dev/sda2 partition info with dd /dev/sda2 | od -x

Code:
0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  >................<
*
0000660 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01  >................<
0000700 c1 ff 07 ef ff ff 3f 00 00 00 d1 09 d5 01 00 00  >.?.......<
0000720 c1 ff 05 ef ff ff 10 0a d5 01 90 94 b6 06 00 00  >.........<
0000740 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  >................<
0000760 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa  >..............U<
0001000
Dump of /dev/sda5

Code:
0000000 52 53 54 52 1e 00 09 00 00 00 00 00 00 00 00 00  >RSTR............<
0000020 00 10 00 00 00 10 00 00 30 00 01 00 01 00 f0 0e  >........0......<
0000040 c9 c0 7a d1 20 00 86 06 06 04 00 1b 00 00 40 00  >z .........@.<
0000060 08 08 00 02 00 00 00 00 01 00 ff ff 00 00 03 00  >..............<
0000100 28 00 00 00 e0 00 40 00 00 00 00 04 00 00 00 00  >(....@.........<
0000120 68 00 00 00 30 00 40 00 f1 d2 3d 4c 00 00 00 00  >h...0.@.=L....<
0000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  >................<
0000160 00 00 00 02 00 00 00 00 08 08 00 02 00 00 00 00  >................<
0000200 ff ff ff ff 00 00 00 00 00 00 00 00 08 00 00 00  >............<
0000220 4e 00 54 00 46 00 53 00 00 00 00 00 00 00 00 00  >N.T.F.S.........<
0000240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  >................<
*
0001000
Dump of /dev/sda6

Code:
0000000 eb 52 90 4e 54 46 53 20 20 20 20 00 02 08 00 00  >R.NTFS    .....<
0000020 00 00 00 00 00 f8 00 00 3f 00 f0 00 3f 00 00 00  >.......?..?...<
0000040 00 00 00 00 80 00 80 00 50 94 b6 06 00 00 00 00  >........P......<
0000060 04 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00  >................<
0000100 f6 00 00 00 01 00 00 00 24 b2 76 99 35 5d cd 50  >.......$v.5]P<
0000120 00 00 00 00 fa 33 c0 8e d0 bc 00 7c fb b8 c0 07  >....3.м.|.<
0000140 8e d8 e8 16 00 b8 00 0d 8e c0 33 db c6 06 0e 00  >......3...<
0000160 10 e8 53 00 68 00 0d 68 6a 02 cb 8a 16 24 00 b4  >.S.h..hj...$.<
0000200 08 cd 13 73 05 b9 ff ff 8a f1 66 0f b6 c6 40 66  >..s..f.@f<
0000220 0f b6 d1 80 e2 3f f7 e2 86 cd c0 ed 06 41 66 0f  >..?..Af.<
0000240 b7 c9 66 f7 e1 66 a3 20 00 c3 b4 41 bb aa 55 8a  >ff .ôAU.<
0000260 16 24 00 cd 13 72 0f 81 fb 55 aa 75 09 f6 c1 01  >.$..r..Uu..<
0000300 74 04 fe 06 14 00 c3 66 60 1e 06 66 a1 10 00 66  >t....f`..f..f<
0000320 03 06 1c 00 66 3b 06 20 00 0f 82 3a 00 1e 66 6a  >....f;. ...:..fj<
0000340 00 66 50 06 53 66 68 10 00 01 00 80 3e 14 00 00  >.fP.Sfh.....>...<
0000360 0f 85 0c 00 e8 b3 ff 80 3e 14 00 00 0f 84 61 00  >.....>.....a.<
0000400 b4 42 8a 16 24 00 16 1f 8b f4 cd 13 66 58 5b 07  >B..$.....fX[.<
0000420 66 58 66 58 1f eb 2d 66 33 d2 66 0f b7 0e 18 00  >fXfX.-f3f....<
0000440 66 f7 f1 fe c2 8a ca 66 8b d0 66 c1 ea 10 f7 36  >f.f.f.6<
0000460 1a 00 86 d6 8a 16 24 00 8a e8 c0 e4 06 0a cc b8  >.....$....̸<
0000500 01 02 cd 13 0f 82 19 00 8c c0 05 20 00 8e c0 66  >......... ..f<
0000520 ff 06 10 00 ff 0e 0e 00 0f 85 6f ff 07 1f 66 61  >........o..fa<
0000540 c3 a0 f8 01 e8 09 00 a0 fb 01 e8 03 00 fb eb fe  > ... ...<
0000560 b4 01 8b f0 ac 3c 00 74 09 b4 0e bb 07 00 cd 10  >..<.t.....<
0000600 eb f2 c3 0d 0a 41 20 64 69 73 6b 20 72 65 61 64  >..A disk read<
0000620 20 65 72 72 6f 72 20 6f 63 63 75 72 72 65 64 00  > error occurred.<
0000640 0d 0a 4e 54 4c 44 52 20 69 73 20 6d 69 73 73 69  >..NTLDR is missi<
0000660 6e 67 00 0d 0a 4e 54 4c 44 52 20 69 73 20 63 6f  >ng...NTLDR is co<
0000700 6d 70 72 65 73 73 65 64 00 0d 0a 50 72 65 73 73  >mpressed...Press<
0000720 20 43 74 72 6c 2b 41 6c 74 2b 44 65 6c 20 74 6f  > Ctrl+Alt+Del to<
0000740 20 72 65 73 74 61 72 74 0d 0a 00 00 00 00 00 00  > restart........<
0000760 00 00 00 00 00 00 00 00 83 a0 b3 c9 00 00 55 aa  >......... ..U<
0001000

I also compare the partition table of my other working computer (different disk size) that has c:,d:, and e:, so that I might find some clue to fix this problem. The content of first 512 bytes of good /dev/sda5 and /dev/sda6 seems to be pretty much the same, except only different those in underline bold, as following (first few bytes from /dev/sda6.

Code:
0000000 eb 52 90 4e 54 46 53 20 20 20 20 00 02 08 00 00  >R.NTFS    .....<
0000020 00 00 00 00 00 f8 00 00 3f 00 f0 00 3f 00 00 00  >.......?..?...<
0000040 00 00 00 00 80 00 80 00 50 94 b6 06 00 00 00 00  >........P......<
0000060 04 00 00 00 00 00 00 00 00 00 08 00 00 00 00 00  >................<
0000100 f6 00 00 00 01 00 00 00 24 b2 76 99 35 5d cd 50  >.......$v.5]P<
For my bad disk, I was thinking to just copy the first 512 bytes from /dev/sda6 to /dev/sda5 and modify those differences, but I don';t know what value I should put it. Does anyone know the spec, or how to fix this problem?

Last edited by ufmale; 08-16-2008 at 02:18 PM.
 
Old 08-16-2008, 03:02 PM   #2
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,835

Rep: Reputation: 260Reputation: 260Reputation: 260
Are there any files on /dev/sda5?
 
Old 08-16-2008, 04:32 PM   #3
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Original Poster
Rep: Reputation: 30
I have files in d: (i.e., /dev/sda5). However, I cannot mount /dev/sda5.
 
Old 08-16-2008, 04:35 PM   #4
kylibar
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Rep: Reputation: 0
Red face there are a few things you can do..

first off, what are you trying to do?? use the partition as a file system??? (storage disk)---OR are you trying to recover the OS?

(what the other guy said).... do you have any important files on the disk???

no matter....the same solution for all...(this is why i bought my external HDD usb interface...bout 40$, connectes to IDE&SATA)


if you just want some files off the partition.... and you DONT have an external interface that you can hook the HDD up to..

the only solution i can think of is to recover the partition by using a nice little program i found bout a year ago..its called "Find and Mount". forgot who made it, and i dont care, but its useful as can be. Ive found 2 copies of it, one for the linux kernel (ubuntu, redhat, ect) and one for the NT kernel (xp, vista)

if you HAVE an external interface that connects via USB.... use that.. more than likely youll be able to do your repairs that way (by using the disk as an external file system - storage disk) keeps the disk from "booting", much easier.

outside of that... if there is NOTHING important at all on the HDD.... |)amn dude, just earase it and start from scratch, sometimes its easier.

well... i hope i helped a little, good luck my friend
 
Old 08-16-2008, 04:37 PM   #5
kylibar
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Rep: Reputation: 0
ok...

Quote:
Originally Posted by ufmale View Post
I have files in d: (i.e., /dev/sda5). However, I cannot mount /dev/sda5.

ok, use find and mount, recover the partition, copy the files (it may take a while).... delete the partition, and make a new one or w/e u wanna do with it

i still think everyone needs an external usb interface for HDDs

if find and mount doesnt work, thats when i would definitly use some form of an external interface... hell u can make one pretty easy for less than 10 bucks do ur R&D (im not explaining that one-look on google for that, youll find it)

Last edited by kylibar; 08-16-2008 at 04:39 PM.
 
Old 08-16-2008, 04:37 PM   #6
fair_is_fair
Member
 
Registered: May 2005
Posts: 516

Rep: Reputation: 52
Did you designate driver letters for sda5 and 6 from Xp?
 
Old 08-16-2008, 05:13 PM   #7
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Original Poster
Rep: Reputation: 30
My understanding is that sda5 and sda6 is name because it is the logical drives. I created those partition using partition magic in XP (to create d: and e for data storage purposes.

I am still able to boot from this harddisk in XP (from the sda1 or c, but I cannot access data from d: drive. and yes. I would like to recover my files from this drive.

I think I just need to understand what those number highlighted in red mean, then I can fix it. I am going to try to download the find and mount and see if it can recover the drive.
 
Old 08-16-2008, 06:14 PM   #8
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
Please verify:
Are you running linux and trying to access /dev/sda5?
Or are you in windows and trying to access drive D:?

Your fdisk shows /dev/sda5 has an hpfs/ntfs file system, which is correct for windows/XP

If you are trying to access /dev/sda5 while booted into linux,
do you have ntfs-3g installed? it is required for mounting an ntfs file system in linux.
 
Old 08-16-2008, 07:21 PM   #9
ufmale
Member
 
Registered: Feb 2007
Posts: 385

Original Poster
Rep: Reputation: 30
The problem is not the ntfs. The problem is the partition has problem. I couldn't access the partition either in windows nor in linux.
I also tried the "find and mount", it does not work.. it seems like i am loosing the data.
 
  


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
partition table corrupted ravi_chobey Linux - Hardware 2 12-28-2007 04:11 AM
root partition corrupted donguai Linux - Software 2 04-02-2006 01:53 PM
Partition table appears to be corrupted havok1977 Linux - Hardware 2 03-13-2006 01:29 PM
possible to recover corrupted reiserfs partition???? hollywoodb Linux - Newbie 1 10-10-2003 06:44 PM
partition table corrupted narxist Linux - Software 2 06-04-2001 05:33 PM


All times are GMT -5. The time now is 10:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration