Cant write partition table to HDD

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
Dzeenis
Posts: 8
Joined: 14 Jan 2023, 12:32

Cant write partition table to HDD

#1 Post by Dzeenis »

Dear all,

i have been reading everythign throughout here, but i cant find anyone with similar problem. I have HDD which is not appearing in finder of my mac. I tired to mount it, it says error. then i tried test disk, i can see files an d folders, but it says, thats read only access so i cannot do anything.
I tried running deep search for partitons, but it was like whole night on and still 00 % of sectors done. So is my HDD dying or what?

Here is the log..

Code: Select all

Mon Feb 27 15:16:12 2023
Command line: TestDisk

TestDisk 7.2-WIP, Data Recovery Utility, November 2022
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Darwin, kernel 21.6.0 (Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64) x86_64
Compiler: GCC 4.2
ext2fs lib: 1.46.2, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none, curses lib: ncurses 5.7
Hard disk list
Disk /dev/disk2 - 249 GB / 232 GiB - 486998016 sectors (RO), sector size=512
Disk /dev/disk3 - 1000 GB / 931 GiB - 1953458176 sectors (RO), sector size=512
Disk /dev/rdisk2 - 249 GB / 232 GiB - 486998016 sectors (RO), sector size=512
Disk /dev/rdisk3 - 1000 GB / 931 GiB - 1953458176 sectors (RO), sector size=512

Partition table type (auto): EFI GPT
Media is opened in read-only.
Disk /dev/rdisk3 - 1000 GB / 931 GiB (RO)
Partition table type: EFI GPT

Interface Advanced
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=1953458175 (expected 1953458175)
hdr_lba_start=34
hdr_lba_end=1953458142
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]

Analyse Disk /dev/rdisk3 - 1000 GB / 931 GiB - 1953458176 sectors (RO)
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=1953458175 (expected 1953458175)
hdr_lba_start=34
hdr_lba_end=1953458142
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]
Current partition structure:
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]

search_part()
Disk /dev/rdisk3 - 1000 GB / 931 GiB - 1953458176 sectors (RO)
     MS Data                       64 1953458159 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB

Results
   P MS Data                       64 1953458159 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB


dir_partition inode=0
   P MS Data                       64 1953458159 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB
Directory /
      12 drwxr-xr-x     0      0    131072 11-Nov-2016 09:32 .Spotlight-V100
  260763 drwxr-xr-x     0      0    131072 28-Nov-2018 11:14 .fseventsd
  260767 drwxr-xr-x     0      0    131072 23-Dec-2016 07:56 zalias flash
  559023 drwxr-xr-x     0      0    131072 26-Oct-2016 18:19 Pictures
 1016181 drwxr-xr-x     0      0    131072 11-Nov-2016 10:03 .Trashes
  559018 drwxr-xr-x     0      0    131072 10-Nov-2016 10:07 Desktop
  559019 drwxr-xr-x     0      0    131072  6-Nov-2016 07:41 Downloads
      79 drwxr-xr-x     0      0    131072 16-Nov-2016 07:25 juodas hard
     105 -rwxr-xr-x     0      0      4096 16-Nov-2016 09:04 ._juodas hard
  558789 drwxr-xr-x     0      0    131072  3-Dec-2017 15:45 .TemporaryItems
X 260768 -rwxr-xr-x     0      0      4096 26-Apr-2018 08:17 ._zalias flash
X 742032 -rwxr-xr-x     0      0      4096 14-Nov-2016 10:12 ._Google Drive
 1100569 drwxr-xr-x     0      0    131072  3-Nov-2016 18:49 Documents
       0 0000 0000 00 00 00 00 00 00 00 00

interface_write()
 1 P MS Data                       64 1953458159 1953458096
write!
file_nopwrite(7,32,buffer,2(2/0/1)) write refused

Partition: Write error
New geometry
Disk /dev/rdisk3 - 1000 GB / 931 GiB - CHS 122091136 16 1 (RO) sector_size=512

Interface Advanced
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=1953458175 (expected 1953458175)
hdr_lba_start=34
hdr_lba_end=1953458142
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]

Analyse Disk /dev/rdisk3 - 1000 GB / 931 GiB - CHS 122091136 16 1 (RO)
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=1953458175 (expected 1953458175)
hdr_lba_start=34
hdr_lba_end=1953458142
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]
Current partition structure:
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]
 1 P MS Reserved                   34      32767      32734 [Microsoft reserved partition]

search_part()
Disk /dev/rdisk3 - 1000 GB / 931 GiB - CHS 122091136 16 1 (RO)
     MS Data                       64 1953458159 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB

Results
   P MS Data                       64 1953458159 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB

interface_write()
 1 P MS Data                       64 1953458159 1953458096
write!
file_nopwrite(7,32,buffer,2(0/2/1)) write refused

Partition: Write error
Partition table type (auto): EFI GPT
Media is opened in read-only.
Disk /dev/rdisk3 - 1000 GB / 931 GiB (RO)
Partition table type: Intel

Analyse Disk /dev/rdisk3 - 1000 GB / 931 GiB - CHS 122091136 16 1 (RO)
Geometry from i386 MBR: head=1 sector=1
BAD_RS LBA=64 1024
get_geometry_from_list_part_aux head=16 nbr=2
get_geometry_from_list_part_aux head=8 nbr=2
get_geometry_from_list_part_aux head=16 nbr=2
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
Current partition structure:
 1 P HPFS - NTFS              4   0  1 122091134  15  1 1953458096

Bad relative sector.
No partition is bootable

search_part()
Disk /dev/rdisk3 - 1000 GB / 931 GiB - CHS 122091136 16 1 (RO)
     HPFS - NTFS              4   0  1 122091134  15  1 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB
get_geometry_from_list_part_aux head=16 nbr=2
get_geometry_from_list_part_aux head=8 nbr=2
get_geometry_from_list_part_aux head=16 nbr=2
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1

Results
   * HPFS - NTFS              4   0  1 122091134  15  1 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB
NTFS signature is missing.
NTFS signature is missing.


dir_partition inode=0
   * HPFS - NTFS              4   0  1 122091134  15  1 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB
Directory /
      12 drwxr-xr-x     0      0    131072 11-Nov-2016 09:32 .Spotlight-V100
  260763 drwxr-xr-x     0      0    131072 28-Nov-2018 11:14 .fseventsd
  260767 drwxr-xr-x     0      0    131072 23-Dec-2016 07:56 zalias flash
  559023 drwxr-xr-x     0      0    131072 26-Oct-2016 18:19 Pictures
 1016181 drwxr-xr-x     0      0    131072 11-Nov-2016 10:03 .Trashes
  559018 drwxr-xr-x     0      0    131072 10-Nov-2016 10:07 Desktop
  559019 drwxr-xr-x     0      0    131072  6-Nov-2016 07:41 Downloads
      79 drwxr-xr-x     0      0    131072 16-Nov-2016 07:25 juodas hard
     105 -rwxr-xr-x     0      0      4096 16-Nov-2016 09:04 ._juodas hard
  558789 drwxr-xr-x     0      0    131072  3-Dec-2017 15:45 .TemporaryItems
X 260768 -rwxr-xr-x     0      0      4096 26-Apr-2018 08:17 ._zalias flash
X 742032 -rwxr-xr-x     0      0      4096 14-Nov-2016 10:12 ._Google Drive
 1100569 drwxr-xr-x     0      0    131072  3-Nov-2016 18:49 Documents

interface_write()
 1 * HPFS - NTFS              4   0  1 122091134  15  1 1953458096
write!

write_mbr_i386: starting...
file_nopwrite(7,1,buffer,0(0/0/1)) write refused
write_all_log_i386: starting...
No extended partition

Partition: Write error
file_nopwrite(7,1,buffer,0(0/0/1)) write refused
Write error: Can't write new MBR code.

Interface Advanced
Geometry from i386 MBR: head=1 sector=1
BAD_RS LBA=64 1024
get_geometry_from_list_part_aux head=16 nbr=2
get_geometry_from_list_part_aux head=8 nbr=2
get_geometry_from_list_part_aux head=16 nbr=2
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
 1 P HPFS - NTFS              4   0  1 122091134  15  1 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB

exFAT_boot_sector
 1 P HPFS - NTFS              4   0  1 122091134  15  1 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB
Boot sector
exFAT OK

Backup boot record
exFAT OK

Sectors are not identical.
copy original superblock over backup boot
file_nopwrite(7,12,buffer,76(4/12/1)) write refused
Write error: Can't overwrite exFAT backup boot record

exFAT_boot_sector
 1 P HPFS - NTFS              4   0  1 122091134  15  1 1953458096
     exFAT, blocksize=131072, 1000 GB / 931 GiB
Boot sector
exFAT OK

Backup boot record
exFAT OK

Sectors are not identical.

TestDisk exited normally.

recuperation
Posts: 2735
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Cant write partition table to HDD

#2 Post by recuperation »

Dzeenis wrote: 27 Feb 2023, 15:07 Dear all,

i have been reading everythign throughout here, but i cant find anyone with similar problem. I have HDD which is not appearing in finder of my mac. I tired to mount it, it says error. then i tried test disk, i can see files an d folders, but it says, thats read only access so i cannot do anything.
I tried running deep search for partitons, but it was like whole night on and still 00 % of sectors done. So is my HDD dying or what?
I hope it doesn't.
But you should open it in read/write mode instead of the read-only mode it is currently in.

Dzeenis
Posts: 8
Joined: 14 Jan 2023, 12:32

Re: Cant write partition table to HDD

#3 Post by Dzeenis »

Can You please help me find a way to do it? Because i read millions of tries on internet, and i cant..

recuperation
Posts: 2735
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Cant write partition table to HDD

#4 Post by recuperation »

The reddish marked section on the forum webpage when p.e. replying to a posting contains a link to the manual, that you as well downloaded contained within the Testdisk software package.

There is a chapter for your problem:

6.6 Running TestDisk, PhotoRec under macOS

Dzeenis
Posts: 8
Joined: 14 Jan 2023, 12:32

Re: Cant write partition table to HDD

#5 Post by Dzeenis »

So thats what i always do, sudo and confirm with password. Then i force unmount disk i want to repair, but its still in read only. I tried searching manual, forum here, but i cant find it how to connect it with write access.. did everything over over and over again according to your manual, googled all the internet. Dont understand if i miss somewhere something or my hard doesnt work properly and cant be connected write access?
Could You please help me connect it with write access?

recuperation
Posts: 2735
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Cant write partition table to HDD

#6 Post by recuperation »

I don't know your "hard".
Except for stating that it does not work for you, you do not deliver any helpful description.

Dzeenis
Posts: 8
Joined: 14 Jan 2023, 12:32

Re: Cant write partition table to HDD

#7 Post by Dzeenis »

Okay, understood that sounds fair.
I have WD 1Tb, and when i give all access and everything as stated steb by step guide, i select the drive in raw format ant it gives me (screenshot).
I cannot find anywhere what im doing wrong so i cannot get it in write access. Folowing that i cannot write any partion table changes to it..
what infor would be helpful for You to understand my problem better? I have posted log in first post, but maybe i should try something different and post again?
Attachments
E7D397E5-5BA3-4069-840E-632B2D310356.jpeg
E7D397E5-5BA3-4069-840E-632B2D310356.jpeg (69.91 KiB) Viewed 1428 times

Locked