Unrecognized disk label of a external HD

I have a external HD that I can't seem to open. When I try to open it with gparted it says unrecognized disk. When I run gparted from the terminal this is what it says.

~ $ sudo gparted
======================
libparted : 2.2
======================
/dev/sdb: unrecognised disk label

When I run the fdisk command this is what it says.

~ $ sudo fdisk -l

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c8b89

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1245     9999360   83  Linux
/dev/sda2            1246        5478    33998849    5  Extended
/dev/sda3   *        5479       12161    53681197+   7  HPFS/NTFS
/dev/sda5            1246        1743     3998720   82  Linux swap / Solaris
/dev/sda6            1744        5478    29999104   83  Linux

Disk /dev/sdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

Might be that the disk label has not been initialized yet. Is this a new disk, or has it been used before? If it's already been used: under which OS and version?

I also get this message when I try to mount the HD. I tried with and without the force option.

~ $ sudo mount -t ntfs-3g /dev/sdb /media/hd-ntfs -o force
NTFS signature is missing.
Failed to mount '/dev/sdb': Invalid argument
The device '/dev/sdb' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

~ $ sudo mount -t ntfs-3g /dev/sdb /media/hd-ntfs
NTFS signature is missing.
Failed to mount '/dev/sdb': Invalid argument
The device '/dev/sdb' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

---------- Post updated at 04:57 AM ---------- Previous update was at 04:55 AM ----------

It has a NTFS partition. I use it in both windows xp and Linux Mint which is very similar to Ubuntu.

Is it a Western Digital unit?
what specific OS are you trying to mount it on?

No its Maxtor.

Linux Mint and Windows XP. Neither can open it.

Clearly the boot sector's been stomped on somehow at the very least.

Try sudo dd if=/dev/sdb count=$((2*16384)) | hexdump -C | less which should show a binary dump of the first sixteen megs of the drive. Hunt for NTFS in that listing in less by typing "/NTFS" and hitting enter. If it finds it that means the partition might still exist and might still be accessible if you can create a partition on the disk matching it's exact placement.

I saw it a few times. How would I pipe that in a log file? Less keeps on getting stuck on me when I try to search. This is the command I used and it just made a empty log file.

sudo dd if=/dev/sdb count=$((2*16384)) | hexdump -C | > /home/bob/Desktop/lspci

Since I do see NTFS how would I fix it?

---------- Post updated at 02:10 PM ---------- Previous update was at 01:59 PM ----------

I also found this and this looks promising :).

00007f80  eb f2 c3 0d 0a 41 20 64  69 73 6b 20 72 65 61 64  |.....A disk read|
00007f90  20 65 72 72 6f 72 20 6f  63 63 75 72 72 65 64 00  | error occurred.|
00007fa0  0d 0a 4e 54 4c 44 52 20  69 73 20 6d 69 73 73 69  |..NTLDR is missi|
00007fb0  6e 67 00 0d 0a 4e 54 4c  44 52 20 69 73 20 63 6f  |ng...NTLDR is co|
00007fc0  6d 70 72 65 73 73 65 64  00 0d 0a 50 72 65 73 73  |mpressed...Press|
00007fd0  20 43 74 72 6c 2b 41 6c  74 2b 44 65 6c 20 74 6f  | Ctrl+Alt+Del to|
00007fe0  20 72 65 73 74 61 72 74  0d 0a 00 00 00 00 00 00  | restart........|
00007ff0  00 00 00 00 00 00 00 00  83 a0 b3 c9 00 00 55 aa  |..............U.|
00008000  05 00 4e 00 54 00 4c 00  44 00 52 00 04 00 24 00  |..N.T.L.D.R...$.|
00008010  49 00 33 00 30 00 00 e0  00 00 00 30 00 00 00 00  |I.3.0......0....|

Remove the extra pipe.

sudo dd if=/dev/sdb count=$((2*16384)) | hexdump -C > /home/bob/Desktop/logfile.txt ; less /home/bob/logfile.txt

Much like I said; create a boot sector that matches the place where you found the partition. Without knowing where you found NTFS though, that may be difficult. I'm reluctant to give too general instructions lest it be my fault your drive gets messed up.

Here's a dump I managed to get from the very start of an NTFS partition:

00000000  eb 52 90 4e 54 46 53 20  20 20 20 00 02 08 00 00  |.R.NTFS    .....|
00000010  00 00 00 00 00 f8 00 00  3f 00 ff 00 3f 00 00 00  |........?...?...|
00000020  00 00 00 00 80 00 80 00  9b 7d 97 0f 00 00 00 00  |.........}......|
00000030  00 00 0c 00 00 00 00 00  10 00 00 00 00 00 00 00  |................|
00000040  f6 00 00 00 01 00 00 00  91 09 c8 74 39 c8 74 2a  |...........t9.t*|
00000050  00 00 00 00 fa 33 c0 8e  d0 bc 00 7c fb b8 c0 07  |.....3.....|....|
00000060  8e d8 e8 16 00 b8 00 0d  8e c0 33 db c6 06 0e 00  |..........3.....|
00000070  10 e8 53 00 68 00 0d 68  6a 02 cb 8a 16 24 00 b4  |..S.h..hj....$..|
00000080  08 cd 13 73 05 b9 ff ff  8a f1 66 0f b6 c6 40 66  |...s......f...@f|
00000090  0f b6 d1 80 e2 3f f7 e2  86 cd c0 ed 06 41 66 0f  |.....?.......Af.|

Since you only see a raw device though, not a partition, yours won't be at zero.

For some reason I can now see my partition in Nautilus (my file manager) but I can't mount it.

When I do this command should which one should I be using?

sudo fdisk /dev/sdb
sudo fdisk /dev/sdb1

Also more information is showing up in sudo fdisk -l. The first time I tried it I couldn't see the part I am putting in between stars below.

~ $ sudo fdisk -l

Disk /dev/sda: 100.0 GB, 100030242816 bytes
255 heads, 63 sectors/track, 12161 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c8b89

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1245     9999360   83  Linux
/dev/sda2            1246        5478    33998849    5  Extended
/dev/sda3   *        5479       12161    53681197+   7  HPFS/NTFS
/dev/sda5            1246        1743     3998720   82  Linux swap / Solaris
/dev/sda6            1744        5478    29999104   83  Linux

Disk /dev/sdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9503c6ab

**************************************************************************************************************************
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       24792   199141708+   7  HPFS/NTFS

**************************************************************************************************************************

It now thinks I at least have a valid partition table.

---------- Post updated at 05:35 PM ---------- Previous update was at 05:10 PM ----------

Could you please try? It now at least thinks I have a partition table :). Check my previous post.

See the 0xAA55 at offset 0x7FFD. This is the signature for the end of the NTFS boot sector. $BOOT in NTFS MFT terminology. This is MFT entry 7. It is the only NTFS metadata file that has a static location.

Per NTFS design docs, a backup copy of the boot sector always exists either at the middle of the volume or at last. To date, the backup copy has been placed in the last sector. Compare these two sectors to see if there is a difference.

Frankly, I don't think you will find a difference. Something else is going on. Did you "unmount" this disk cleanly the last time you used it?

I wasn't given the ability to do that. I was watching some videos in XP and all of a sudden I couldn't access my data any more. I don't understand what happened. I thought watching some videos is a very simple thing.

Hmm, NTFS dirty bit is probably set then. Try mounting it on a regular Windows system and running the chkntfs utility from the command prompt.

If my memory is correct you have to have a drive letter for chkntfs to work correctly. Is that correct? In windows It has no drive letter. I am also not able to assign it a drive letter with disk management. Is there a way to ignore this problem?

/dev/sdb. You don't fdisk a partition.

Well, my directions would've been on how to get that partition table back. That it has is both very good and very bad news; something's seriously wrong with either the drive or the USB cage for a sector to just vanish and return like that! Also good that you posted it here. Armed with that you have enough information to recreate it from scratch if it vanishes again.

If windows doesn't see the partition table, first off I would rewrite the same partition table back to it, just 'w' from fdisk /dev/sdb. If there's anything odd in it preventing windows from seeing the partitions, that may clear it.

What would the command be? I don't see anything in my man page's of fdisk about "w".

The fdisk commands are not listed in the man page for fdisk. Run fdisk and enter '?' for access to list of commands.

The command is w, typed into fdisk's prompt, then the enter key. Nothing more, nothing less.

Type ? then the enter key at fdisk's prompt to see all available options.

What would be a good next step? I rewrote the partition table and that didn't help :(.

Can you mount it in linux? mkdir /mnt/whatever ; mount -t ntfs -o ro /dev/sdax /mnt/whatever