LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 01:10 PM   #1
ufmale
Member
 
Registered: Feb 2007
Posts: 386

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  >·Éf÷áf£ .ôA»ªU.<
0000260 16 24 00 cd 13 72 0f 81 fb 55 aa 75 09 f6 c1 01  >.$.Í.r..ûUªu.öÁ.<
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.ë-f3Òf.·...<
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 01:18 PM.
 
Old 08-16-2008, 02:02 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

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

Original Poster
Rep: Reputation: 30
I have files in d: (i.e., /dev/sda5). However, I cannot mount /dev/sda5.
 
Old 08-16-2008, 03: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, 03: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 03:39 PM.
 
Old 08-16-2008, 03: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, 04:13 PM   #7
ufmale
Member
 
Registered: Feb 2007
Posts: 386

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, 05: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, 06:21 PM   #9
ufmale
Member
 
Registered: Feb 2007
Posts: 386

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



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

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

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