Tech Support Guy banner
Status
Not open for further replies.

Solved: Hard Drive Files Gone "The disk in drive D is not formatted"

11K views 29 replies 3 participants last post by  mocks1 
#1 ·
I sometimes switch hard drives between computers. As far as I know, this is not a drive with an OS on it-- just data files. I plugged it in after it was unused in another computer for quite a while. The drive shows up in Device Manager has a drive letter assigned and is listed in the BIOS. When I click on it in My Computer to see the contents, I get the following message:

"The disk in drive D is not formatted"

"Do you want to format it now?"

When I look at the Disk Properties page for that drive--the file system says RAW

Before I try a program to recover files from it--I seem to remember that it could be a Master Boot Record (MBR) problem on the drive. The files should still be there--just the locators and pointers to files and folders directories are missing--such as drive tables?

Is there a safe way to get Windows to recognize the drive contents by using a DOS command to rewrite MBR---such as FIXMBR without destroying the files on drive?

What DOS commands and switches should I use? I have a Windows XP CD or I can use a floppy disk. Is it better to try the time consuming file recovery process first before attempting to write to the drive using DOS FIXMBR commands?

I will start a scan now to see if there is any recoverable data while I wait for any helpful info and replies

Thank you, in advance, for any help that anyone can provide!

I am using Windows XP SP2 and drive is a Samsung hard drive showing as 32 GB RAW

I'll keep checking this post frequently tonight--while I work on issue
 
See less See more
#2 ·
I searched through hundreds of topics on this site and I did not see anything with the message that "disk is not formatted"

Google searches bring up too many unrelated pages about formatting hard drives.

If this topic is in the wrong forum--please let me know
 
#4 ·
I took the hard drive from a machine that was running Windows XP

Thanks for the info and link to Testdisk--I will research and try it/learn it

Are there any precautions I should take to keep from corrupting OS hard drive partition tables while trying to repair the other hard drive?

I just want to be sure before I start changing things
 
#6 ·
The swapping of a hard disk between computers or even within one computer can inadertently corrupt a few binary bits in the partition table, possibly by static electricity, casuing it not recognised. It has happened regularly to me as I use one single data disk for all of my operating systems and swap hard disk between internal and external connections.

I found the best way is to get a second opinion, say by boot up a Linux. All I need in the end is just to correct the error in the partition table, mostly restoring the partition ID (7 for NTFS) or delete spurious entries at the end of the partition table.

The corrections I mentioned above is the hard disk partition table, 16 bytes for each of the 4 primaries, inside the MBR. The internal data of the partition are rarely affected and never touched.

The complete destruction of the partition table in the MBR does not affect the data inside the partitions as long as one has a record and so is able to rebuild it. I have rebuilt partitions regularly in the past when I put 63 partitions in IDE disks. Many older Linux would take over the entire hard disk without asking me for permission.

Typically a MS Windows encounters a partition it does not support (except Fat16, Fat32 and NTFS) then it will regard it as foreign. If the partition table has entries it cannot cope it would treat it as a raw disk, even though the error is trivial and correctable. Thus putting the hard disk through another operating system will reveal more information.
 
#7 ·
saikee thanks for your reply

How do I determine which are "spurious entries at the end of the partition table"

Anyone have any good links on what a proper partition table for an NTFS partition should look like in a partition editor?

The hard drive model is a Samsung SP0842N .... Actual size is 80 GB
 
#8 ·
Testdis is relatively safe, and any changes you make with it will not affect the data on the drive. So even if you have no luck with it, you can still recover your files.

You need to run it, make a guess about which partition that it finds after a scan is the one you lost, and then write the changes to disk. You may then be able to open the drive normally.

The damage done to partitions created in Vista by XP is said to be due to a "bug" in XP's logical disk manager. But considering that XP came out before the new partition type used by Vista, I hardly think that it can be considered a "bug" since that would imply that XP should have been prepared for unknown future partition types and a new version of NTFS.

But, if you partition your drives in XP instead, those partitions will be Vista-compatible and will not be deleted when moved between machines.
 
#9 ·
mocks1,

The partition shown by Linux has more details. The following is mine
Code:
root@saikee-desktop-1:/home/saikee# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbe153241

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       12158    97659103+   7  HPFS/NTFS
/dev/sda2           12159       24316    97659135   17  Hidden HPFS/NTFS
/dev/sda3           24317       36598    98655165    5  Extended
/dev/sda4           36599       60801   194410597+  83  Linux
/dev/sda5           24317       24438      979933+  82  Linux swap / Solaris
/dev/sda6           24439       25654     9767488+  83  Linux
/dev/sda7           25655       26870     9767488+  83  Linux
/dev/sda8           26871       28086     9767488+  83  Linux
/dev/sda9           28087       29302     9767488+  83  Linux
/dev/sda10          29303       30518     9767488+  83  Linux
/dev/sda11          30519       31734     9767488+  83  Linux
/dev/sda12          31735       32950     9767488+  83  Linux
/dev/sda13          32951       34166     9767488+  83  Linux
/dev/sda14          34167       35382     9767488+  83  Linux
/dev/sda15          35383       36598     9767488+  83  Linux
Basically the starting and finishing cylinder numbers are listed for each partition (2nd & 3rd columns). A healthy partition should have cylinder number in consecutive order but this is not mandatory. A spurious partition table may list additional partitions that use the same cylinder number, usually at the end.

In the above partition table I have Xp in sda1 and Vista in sda2. I hide the Vista to boot Xp and vice versa when booting Vista because I installed each one independently (both have own boot loader).

I have 10 Linux installed between sda6 to sda15 sharing the same swap partition in sda5. My data is in sda4 which can be mounted in Xp or Vista using free drivers.

You could run the Elvandil suggested testdisk program, which is free from download, that will try to build up your partition table by examining the filing indexing system and to modify the partition table accordingly. If the internal data has not be overwritten Testdisk has the ability to generate the partition table again in some cases.

Linux supports almost every PC system and will recognise all their partition types and will not reject a partition foreign to itself. The partition types recognised by Linux are
Code:
                                                                cfdisk (util-linux-ng 2.14.2)

                                                                    Disk Drive: /dev/sda
                                                             Size: 500107862016 bytes, 500.1 GB
                                                    Heads: 255   Sectors per Track: 63   Cylinders: 60801

       Name                    Flags                 Part Type            FS Type                         [Label]                      Size (MB)
 -----------------------------------------------------------------------------------------------------------------------------------------------------------
       sda1                    Boot                   Primary             NTFS                            []                           100002.96

 01 FAT12                 12 Compaq diagnostics    4F QNX4.x 3rd part       81 Minix / old Linux     A8 Darwin UFS            E1 DOS access
 02 XENIX root            14 Hidden FAT16 <32M     50 OnTrack DM            82 Linux swap / Solaris  A9 NetBSD                E3 DOS R/O
 03 XENIX usr             16 Hidden FAT16          51 OnTrack DM6 Aux1      83 Linux                 AB Darwin boot           E4 SpeedStor
 04 FAT16 <32M            17 Hidden HPFS/NTFS      52 CP/M                  84 OS/2 hidden C: drive  B7 BSDI fs               EB BeOS fs
 05 Extended              18 AST SmartSleep        53 OnTrack DM6 Aux3      85 Linux extended        B8 BSDI swap             EE GPT
 06 FAT16                 1B Hidden W95 FAT32      54 OnTrackDM6            86 NTFS volume set       BB Boot Wizard hidden    EF EFI (FAT-12/16/32)
 07 HPFS/NTFS             1C Hidden W95 FAT32 (LB  55 EZ-Drive              87 NTFS volume set       BE Solaris boot          F0 Linux/PA-RISC boot
 08 AIX                   1E Hidden W95 FAT16 (LB  56 Golden Bow            88 Linux plaintext       BF Solaris               F1 SpeedStor
 09 AIX bootable          24 NEC DOS               5C Priam Edisk           8E Linux LVM             C1 DRDOS/sec (FAT-12)    F4 SpeedStor
 0A OS/2 Boot Manager     39 Plan 9                61 SpeedStor             93 Amoeba                C4 DRDOS/sec (FAT-16 <   F2 DOS secondary
 0B W95 FAT32             3C PartitionMagic recov  63 GNU HURD or SysV      94 Amoeba BBT            C6 DRDOS/sec (FAT-16)    FB VMware VMFS
 0C W95 FAT32 (LBA)       40 Venix 80286           64 Novell Netware 286    9F BSD/OS                C7 Syrinx                FC VMware VMKCORE
 0E W95 FAT16 (LBA)       41 PPC PReP Boot         65 Novell Netware 386    A0 IBM Thinkpad hiberna  DA Non-FS data           FD Linux RAID autodetec
 0F W95 Ext'd (LBA)       42 SFS                   70 DiskSecure Multi-Boo  A5 FreeBSD               DB CP/M / CTOS / ...     FE LANstep
 10 OPUS                  4D QNX4.x                75 PC/IX                 A6 OpenBSD               DE Dell Utility          FF BBT
 11 Hidden FAT12          4E QNX4.x 2nd part       80 Old Minix             A7 NeXTSTEP              DF BootIt
Also Linux does not reject a hard disk with doggy partition table. That is why it is a excellent utility to salvage a MS Windows disk because you can repair an unbootable or unreadable (by software only) hard disk.
 
#11 ·
Thank you again Elvandil and saikee and for taking the time to post links and screenshots! I ran Testdisk and it found 3 partitions on the drive. I remember now that this was an old 80 GB drive from an old Dell installation. What I probably did was delete all the data from the one visible 72 GB partition--I kept the small hidden 47 MB Dell Utility Partition and the hidden Dell OS restore image partition intact.Here is a screenshot of results:



When I ran quick search function with Testdisk it came back with a message that the partition will be unrecoverable as displayed below:



Note that it says "the harddisk seems too small"
 
#13 ·
After hitting continue button I get this screen:



More coming after this, in case anyone's reading in real time--it takes a while to create, gather and upload each screenshot one at a time. I had ONE Wordpad file with all my screenshots pasted in from the other computer (planning on pasting them in from Wordpad as I typed up my post), but I have to copy them out one at a time into Microsoft Paint, make a JPG out of that and than upload to Photobucket. What happens to these screenshot links if Photobucket goes out of business and someone is reading this post a year or two from now---is it filled with a bunch of dead links? I do understand the website is probably trying to keep the total size of files stored on their servers lower by requiring links to other websites to retrive picture/attachment data

I see saikee used code to paste in a picture(?) a few posts above--I'll have to figure out how to do that the next time (once I get much needed sleep!). Anyone want to post how to do that or a better solution for pasting in screenshots QUICKLY?
 
#14 ·
Drive checks out with drive checker, smart status good in BIOS:



Here is the Partition Table:



and the Boot Records for 2 of the partitions on the drive (Dell Utility and NTFS):





I don't have screenshots for the Dell Image Restore partition yet which is a hidden partition3--I'll post them later
 
#15 ·
Couldn't I just edit the cylinder value to the Last Physical Sector value of 9728 displayed below or one number higher of 9729? I thought when I looked at a normal drive, the Physical Geometry value was one above the last Last Physical Sector value?

Last partition on the drive (Dell Restore Image Partition):



Here is screenshot of NTFS partition that I am trying to recover/read from within Windows XP



Using Testdisk "Change Drive Geometry" option:





If I change the number of cylinders to 9728 or 9729 will that help Windows and the BIOS recognize total and proper drive size? Once I have proper drive size recognized, wouldn't that make it more likely Testdisk will be able to recover partition and than fix Partition Table or Master Boot Record (MBR)?

Much earlier before I ran Testdisk, I went into the BIOS to try to manually edit the drive size, but the Award type BIOS would only let me Auto recognize the drive size instead of the option that other BIOS' have that let you manually specify the cylinders, heads etc
 
#16 ·
Here are the rest of the screenshots showing more detailed info if anyone needs to see data to figure out what is going on with this drive and how to get the settings back to normal again. They are in order from start of the drive to the end of drive:

Dell Utility





Unreadable NTFS Partition





Dell Restore Image Partition





MOST INFO AND SCREENSHOTS FROM POWERQUEST PARTITION MAGIC AND PARTITIONINFO 8.0 -- WINDOWS NT/2000 VERSION

===========================================================================================================
Disk Geometry Information for Disk 3: 4111 Cylinders, 255 Heads, 63 Sectors/Track
System PartSect # Boot BCyl Head Sect FS ECyl Head Sect StartSect NumSects
===========================================================================================================
DellUtility 0 0 00 0 1 1 DE 5 254 63 63 96,327
0 1 80 6 0 1 07 1023 254 63 96,390 148,858,290
Info: End C,H,S values were large drive placeholders.
Actual values are:
0 1 80 6 0 1 07 9271 254 63 96390 148858290
Error #109: Partition ends after end of disk.
ucEndCylinder (9271) must be less than 4111.
0 2 00 56 0 1 DB 512 254 63 148,954,680 7,341,705
Info: Begin C,H,S values were large drive placeholders.
Info: End C,H,S values were large drive placeholders.
Actual values are:
0 2 00 9272 0 1 DB 9728 254 63 148954680 7341705
Error #107: Partition begins after end of disk.
ucBeginCylinder (9272) must be less than 4111.
Error #109: Partition ends after end of disk.
ucEndCylinder (9728) must be less than 4111.
 
#17 ·
I would not be able to advise on your hard disk unless you paste the output of the Linux terminal command "fdisk -l".

One thing I have been aware of is that each partitioning tool can have its own opinion and the diagnostics are not always the same, therefore you must be very careful in taking up the advice. I tend to stick to a few reputable partitioning tools.

Your information does suggest your hard disk has 9278+ cylinders with 255 heads and 63 sectors. That is a good news as 255 head and 63 sectors are now standardized on the LBA mode. The 4111 cylinder x 255 heads x 63 sectors x 512 bytes/sector gives only about 34 Gb whereas 9278 cylinders offers 76Gb. Do you know how big is your hard disk? or how many partitions you have created inside?

The disk has been reported to have 3 partitions of

(1) Type DE - Dell utility
(2) Type 07 - NTFS
(3) Type DB - CPM

You will find the above types listed in my post of #9.

My suspicion now is the last partition could be erroneous and an spurious entry. I would be able to offer suggestion if I could see the "fdisk -l" output as it details the start and ending cylinder numbers of every partition.

You can download any Linux iso and burn it into a bootable CD to use it as a utility. A Live CD run the operating system on the CD only and does not need to use your hard disk. The suitable distro I would use in you case is Slax because you can manipulate the files in a desktop as a root user whereas most Linux does not permit it in the name of security Linux doesn't get infected because it has a very secure arrangement on the file ownership, which is also used by Vista.

My recommended strategy, without seeing the report by "fdisk -l" is to make a record of the current geometry layout. What I think you should do then is to delete the 3rd partition of Type DB as I don't think you have such a CPM partition. reboot the system to see if the disk become health again or not.

Failing that I would delete the 2nd NTFS partition but recreate it as the same Type 7 with the end boundary changed to the end of your hard disk. This is likely what you have had before. You then reboot and see if the partition becomes health again or not. Under no circumstance you write anything on the partition itself because that would change your filing index inside the NTFS partition.

I recommend to do this with the Linux CD. To test if the hard disk health or not just issue the "fdisk -l" terminal command because the error messages will be reported.

To test if a NTFS partition healthy or not you can mount it with Linux. If a Linux can mount it then you will be able to read its content and write it on another medium thereby salvage everything, even if XP refuses to boot it. The terminal commands to mount your second partition in Linux will be like
Code:
mkdir /mnt/sda2
mount /dev/sda2 /mnt/sda2
ls /mnt/sda2
Every Linux can mount a NTFS partition regardless it is bootable or not. Once it can be read your partition is saved. A Linux will not be able to mount a NTFS partition if its superblock (filing indexing system) has bee trashed. In which case you need to use Testdisk to recover what is left if that can be done at all.

Good luck!
 
#18 ·
Sorry about the fact that it takes so long to get to the bottom of this post because of all the screenshots. I just wanted to post as much info as I could so that people could get a better sense of what is going on with my 80 GB Samsung hard drive (and to help others that might have a similar problem in the future--should this issue be solved)

saikee, I will use a Linux Boot/Live CD and post back my results

My main question to all is:

If I go ahead and change the drive geometry to a cylinder value of 9728 or 9729, is the change reversible and will not damage my hard drive physically or software(ly)!!

If anyone has any links to tutorials on working with partition tables and editing/rebuilding drive geometry, it would be most appreciated.
 
#19 ·
I can confirm that everything you do with partitioning, ie. creation, deletion or modification is reversible as long as you do not format, overwrite or change the data inside the partitions.

Here is a thread I have ust written to use a script to generate 56 partitions in a 1,5TB hard disk. I had to delete all the partitions and tried many times in order to make it working. I started with 182 partitions but due to the various limitations I settle for 57 partitions in the end. I specified the size of each partition by the starting and ending cylinder numbers and the instructions were generated by a loop.

In the old days when we used Dos a hard disk must have the partitions created first before they can be formatted. The MS Windows systems mix the two operations together. The partitioning is always reversible. The formatting is not.
 
#21 ·
Tried Slax on CD and it hung on boot (twice), Dam Small Linux (DSL) wouldn't even boot up--it skipped and went right to Windows. I tried running DSL from within Windows and it started program up and I typed the fdisk -l command but it gave me some message about SDA not found or accessible. I don't know Linux commands at all, so I gave up. Knoppix boot CD hung also and it made Caps light and Scroll Lock light on keyboard blink on and off over and over (first time I've seen that)

I've used Linux disks a couple of times before though not sure if I did on the particular somewhat old computer I am trying to work on that has a Celeron Pentium 2 900 Mhz processor

I'll keep trying to get fdisk results and post back when I do

I might just change the Cylinder value to 9728 using Testdisk and see what happens
 
#24 ·
DSL is an old distro and good for certain applications. I suggest you download the latest Ubuntu. DSL should call your hard disk /dev/hda because it is still with the 2.4 kernel whereas the rest has moved to 2.6.28.

If your PC does not have a standard graphic card then it is possible some Linux will have a problem to match it with the generic drivers.

You can ceratinly try to extend the cylinder by one. The "fdisk -l" command should display all the partitions of every disk in your box.

You can also try the command "cfdisk /dev/sda" or "cfdisk /dev/hda" or "sfdisk -l". If the disk has illegal entries cfdisk may refuse to read it that is all. fdisk is your last line of defence.
 
#26 ·
Sorry I keep missing when you are on because I had a few real-time questions about Linux several times over the last 12 hours

Here's the latest update:

I increased cylinder size to 9729 and hard drive size then showed as correct 80 GB within Testdisk program

I was then able to find correct partition 2 as NTFS

I then tried to write new info to see if my computer would than recognize partition. I did the required reboot but I noticed in BIOS that drive was still registering as 33 GB. I attempted to change size in BIOS again and no good. I don't know if it is the drive sending wrong geometry info or the Award BIOS is working wrong

I continued booting up and, indeed the size was back to 33 GB. I fiddled around with settings and things in Testdisk but it is getting ridiculously complicated and I am not sure if I can ever get Windows to recognise the only partition of the 3 that I want.

I tried a 1 hour test extracting data from the NTFS partition which actually has between 56 GB-and 76 GB of files. I extracted two folders worth about 550 MB and it took 1 hour and 10 minutes. It will take 5-7 days to extract it all 24 hours a day and even than... lots of the files will probably be corrupted. I figure this will happen because a lot of zip, wordpad, word and picture files were unreadable from the test extraction

A hundred and fifty people have read this Thread and I am surprised that almost no one has had a similar issue or ways to fix it---ahhhhh I must be exhausted, hungry and cranky.

I still love Tech Support Guy and all these great people

HelpOnThe.Net Is Amazing and I see why it has been around for so long..................
 
Status
Not open for further replies.
You have insufficient privileges to reply here.
Top