basic concept of repairing external HD

Using TestDisk to repair the filesystem
Post Reply
Message
Author
stefanM
Posts: 1
Joined: 08 Dec 2012, 05:40

basic concept of repairing external HD

#1 Post by stefanM » 08 Dec 2012, 06:10

Hi,

I have encountered trouble with my external Western Digital HD (USB). Suddenly, the notorious "The drive is not formatted, do you want to format it now?" windows dialog is shown whenever I plug it into any of my pc's.

As far as I can tell the cgssecurity tools are the best free ones of their kind so I tried my luck. So I went through the step-by-step guide for TestDisk on the wiki (http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step) and it looked all good. Inside TestDisk I can see the files and proper files structure (so I think I can exclude hardware damage) and the program said it repaired the boot sector (boot sector status: ok, sectors are identical... before that they were unidentical, status of boot sector: bad).

So I figured that after a reboot the disk should work again. But it does not, same error when I plugin the disk.
Is my assumption wrong that the disk working again properly is the expected outcome? Did I miss any relevant steps?

I would be very thankful to anyone who is willing to offering his time and knowledge and I'd be happy to provide any additional information required to help me out.

best regards,
stefan

Sponsored links

LaurenBacall
Posts: 3
Joined: 09 Dec 2012, 12:14

Re: basic concept of repairing external HD

#2 Post by LaurenBacall » 09 Dec 2012, 12:52

Not to hijack the OP's thread but I'm wondering the same thing. I followed the step-by-step, rebooted and unfortunately the drive is in the same condition as before.

From reading various responses in the forums it looks as though I'll need to attach some screenshots and the log file, but as there are numerous unanswered threads I held off from immediately posting mine.

Mine is an external (non-booting) drive that only has one partition, and one day I encountered the same Windows message as the OP. I don't get any 'unreadable filesystem' messages like some users, and I can see my original files in TestDisk.

So I'm left to presume that what TestDisk did was write the identical (non-working) partition table back to the drive again, accomplishing the same faulty result. Am I correct? If I am does anyone know how to "correct" the faulty partition table for this particular Windows problem?

Thanks.

nunofrednunes
Posts: 1
Joined: 14 Dec 2012, 14:30

Re: basic concept of repairing external HD

#3 Post by nunofrednunes » 14 Dec 2012, 15:44

Hi,

I faced the almost exact same situation. But i'm not sure that this is a Filesystem repair situation... maybe more about the partition... (but i'm a big noob in this part of IT...)
My external 2,5" IDE 60gb HDD connected through USB 2.0 - the infamous "The drive is not formatted, do you want to format it now?" appearing.
Ran TestDisk and after the deepsearch it showed me 2 partitions: 1 FAT32 with a small size and the label (pqservice)
and my usually single displayed NTFS partition with the regular 55~gb size and the regular folder structure inside it.
Both were showing as deleted partitions and when i tried to change them both to primary or logical it showed the bad sector error. I changed only the NTFS partition to primary and proceeded with the write command that lead me to the reboot info. After reboot the disk displayed the same message...
I'm really unsure about what is the next step (or the right one...) to make the partition show up correctly in windows but meanwhile found another thing that might prove useful.
Go with the undelete function of TestDisk and recover your files and folders. If you get all your files back, maybe you can go with the regular format of the disk. I'm trying it right now...

http://www.cgsecurity.org/wiki/Undelete ... h_TestDisk

If anyone can point me in the best direction for the recovery of the "accessible" status of my normal NTFS partition i would still be greatly thankful!

LaurenBacall
Posts: 3
Joined: 09 Dec 2012, 12:14

Re: basic concept of repairing external HD

#4 Post by LaurenBacall » 15 Dec 2012, 04:43

Thought I'd add some screenshots and the log in case anyone can offer feedback.

Image
Image
Image

The last image is after the deeper search. I wrote the partition table as it appeared in the second screenshot to the drive, but the drive still has the formatting issue after rebooting.

Any help it would be greatly appreciated.

The log:

Code: Select all

Sun Dec  9 21:43:52 2012
Command line: TestDisk

TestDisk 6.13, Data Recovery Utility, November 2011
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Windows XP SP2
Compiler: GCC 4.3, Cygwin 1007.7
Compilation date: 2011-11-15T08:36:54
ext2fs lib: 1.41.8, ntfs lib: 10:0:0, reiserfs lib: 0.3.1-rc8, ewf lib: 20100226
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(/dev/sda)=160041885696
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(/dev/sdb)=500106780160
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive0)=160041885696
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive1)=500106780160
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\C:)=15728640512
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\D:)=20972526592
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\E:)=123338073600
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\V:)=500112425984
filewin32_getfilesize(\\.\Z:) GetFileSize err Incorrect function.

filewin32_setfilepointer(\\.\Z:) SetFilePointer err Incorrect function.

Warning: can't get size for \\.\Z:
file_pread(4,1,buffer,312592769(19457/254/63)) lseek err Invalid argument
file_pread(5,1,buffer,976784129(60801/254/63)) lseek err Invalid argument
Hard disk list
Disk /dev/sda - 160 GB / 149 GiB - CHS 19457 255 63, sector size=512 - WDC WD1600BEVE-00WZT0, FW:01.01A01
Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63, sector size=512 - WD 5000BEV External, FW:1.75

Partition table type (auto): Intel
Disk /dev/sdb - 500 GB / 465 GiB - WD 5000BEV External
Partition table type: Intel

Interface Advanced
Geometry from i386 MBR: head=255 sector=63
NTFS at 0/32/33
Info: size boot_sector 976769001, partition 976782082
get_geometry_from_list_part_aux head=8 nbr=1
get_geometry_from_list_part_aux head=16 nbr=1
get_geometry_from_list_part_aux head=32 nbr=1
 1 E extended LBA             0  32  1 60801 254 63  976782114
 5 L HPFS - NTFS              0  32 33 60801 254 63  976782082 [Media]
     NTFS, 500 GB / 465 GiB

Analyse Disk /dev/sdb - 500 GB / 465 GiB - CHS 60801 255 63
Geometry from i386 MBR: head=255 sector=63
NTFS at 0/32/33
Info: size boot_sector 976769001, partition 976782082
get_geometry_from_list_part_aux head=8 nbr=1
get_geometry_from_list_part_aux head=16 nbr=1
get_geometry_from_list_part_aux head=32 nbr=1
Current partition structure:
 1 E extended LBA             0  32  1 60801 254 63  976782114
No partition is bootable
 5 L HPFS - NTFS              0  32 33 60801 254 63  976782082 [Media]
Ask the user for vista mode
Computes LBA from CHS for Disk /dev/sdb - 500 GB / 465 GiB - CHS 60802 255 63
Allow partial last cylinder : Yes
search_vista_part: 1

search_part()
Disk /dev/sdb - 500 GB / 465 GiB - CHS 60802 255 63
NTFS at 0/32/33
filesystem size           976769001
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               61048194
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS              0  32 33 60801  47 23  976769001 [Media]
     NTFS, 500 GB / 465 GiB
file_pread(5,8,buffer,976771057(60801/47/32)) lseek err Invalid argument
file_pread(5,3,buffer,976771065(60801/47/40)) lseek err Invalid argument
file_pread(5,3,buffer,976771112(60801/48/24)) lseek err Invalid argument
file_pread(5,8,buffer,976771128(60801/48/40)) lseek err Invalid argument
file_pread(5,11,buffer,976771175(60801/49/24)) lseek err Invalid argument
file_pread(5,2,buffer,976773097(60801/79/56)) lseek err Invalid argument
file_pread(5,8,buffer,976771072(60801/47/47)) lseek err Invalid argument
file_pread(5,8,buffer,976771080(60801/47/55)) lseek err Invalid argument
file_pread(5,3,buffer,976771088(60801/47/63)) lseek err Invalid argument
file_pread(5,2,buffer,976771136(60801/48/48)) lseek err Invalid argument
file_pread(5,8,buffer,976771151(60801/48/63)) lseek err Invalid argument
file_pread(5,11,buffer,976771198(60801/49/47)) lseek err Invalid argument
file_pread(5,2,buffer,976773120(60801/80/16)) lseek err Invalid argument

Results
   L HPFS - NTFS              0  32 33 60801 254 63  976782082 [Media]
     NTFS, 500 GB / 465 GiB

interface_write()
 1 E extended LBA             0  32  1 60801 254 63  976782114
 5 L HPFS - NTFS              0  32 33 60801 254 63  976782082 [Media]
simulate write!

write_mbr_i386: starting...
write_all_log_i386: starting...
write_all_log_i386: CHS: 0/32/1,lba=2016

Analyse Disk /dev/sdb - 500 GB / 465 GiB - CHS 60802 255 63
Geometry from i386 MBR: head=255 sector=63
NTFS at 0/32/33
Info: size boot_sector 976769001, partition 976782082
get_geometry_from_list_part_aux head=8 nbr=1
get_geometry_from_list_part_aux head=16 nbr=1
get_geometry_from_list_part_aux head=32 nbr=1
Current partition structure:
 1 E extended LBA             0  32  1 60801 254 63  976782114
No partition is bootable
 5 L HPFS - NTFS              0  32 33 60801 254 63  976782082 [Media]
Ask the user for vista mode
Allow partial last cylinder : Yes
search_vista_part: 1

search_part()
Disk /dev/sdb - 500 GB / 465 GiB - CHS 60802 255 63
NTFS at 0/32/33
filesystem size           976769001
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               61048194
clusters_per_mft_record   -10
clusters_per_index_record 1
     HPFS - NTFS              0  32 33 60801  47 23  976769001 [Media]
     NTFS, 500 GB / 465 GiB
file_pread(5,8,buffer,976771057(60801/47/32)) lseek err Invalid argument
file_pread(5,3,buffer,976771065(60801/47/40)) lseek err Invalid argument
file_pread(5,3,buffer,976771112(60801/48/24)) lseek err Invalid argument
file_pread(5,8,buffer,976771128(60801/48/40)) lseek err Invalid argument
file_pread(5,11,buffer,976771175(60801/49/24)) lseek err Invalid argument
file_pread(5,2,buffer,976773097(60801/79/56)) lseek err Invalid argument
file_pread(5,8,buffer,976771072(60801/47/47)) lseek err Invalid argument
file_pread(5,8,buffer,976771080(60801/47/55)) lseek err Invalid argument
file_pread(5,3,buffer,976771088(60801/47/63)) lseek err Invalid argument
file_pread(5,2,buffer,976771136(60801/48/48)) lseek err Invalid argument
file_pread(5,8,buffer,976771151(60801/48/63)) lseek err Invalid argument
file_pread(5,11,buffer,976771198(60801/49/47)) lseek err Invalid argument
file_pread(5,2,buffer,976773120(60801/80/16)) lseek err Invalid argument

Results
   L HPFS - NTFS              0  32 33 60801 254 63  976782082 [Media]
     NTFS, 500 GB / 465 GiB

interface_write()
 1 E extended LBA             0  32  1 60801 254 63  976782114
 5 L HPFS - NTFS              0  32 33 60801 254 63  976782082 [Media]
write!

write_mbr_i386: starting...
write_all_log_i386: starting...
write_all_log_i386: CHS: 0/32/1,lba=2016
You will have to reboot for the change to take effect.

TestDisk exited normally.

LaurenBacall
Posts: 3
Joined: 09 Dec 2012, 12:14

Re: basic concept of repairing external HD

#5 Post by LaurenBacall » 23 Dec 2012, 05:27

Anyone? I don't currently have another drive to backup an image to, and need some advice soon.

Having looked through all the threads in the forum related to the issue it seems the ultimate advise for a (presumably) currupted partition table is to copy the data to another drive, but I then wonder what the purpose of TestDisk is actually for as I thought it could repair such tables.

Even so I am certainly glad for such utilities, I just wish I had more knowledge to fix this issue with them :D .

BTW, Merry Christmas to everyone! :P

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest