Switch to full style
Data recovery and disk repair questions and discussions related to old-fashioned SATA, SAS, SCSI, IDE, MFM hard drives - any type of storage device that has moving parts
Post a reply

Hitachi HDD checksum

November 8th, 2024, 20:11

Hi.
Im changing the firmware on an Hitachi HDD that i have but the HDD is flashing the firmware back to a original firmware because, i believe, the checksum is not matching.
Does any one knows how to calculate Hitachi Checksum or can calculate the checksum for me?
tks.

Re: Hitachi HDD checksum

November 8th, 2024, 20:27

Show us the firmware. I have some knowledge in this area, but it depends on the model.

Re: Hitachi HDD checksum

November 8th, 2024, 20:41

In attachment.
The file is not zipped. Its directly the firmware, forum was complaining about .bin
Attachments
HDDFIX.zip
(512 KiB) Downloaded 126 times

Re: Hitachi HDD checksum

November 8th, 2024, 22:55

That's a ROM dump. This is only a small part of the firmware. The bulk of the firmware is stored in a reserved System Area (SA) on the platters.

There are three 0x1000-byte regions which have their own 16-bit XOR checksum plus a 32-bit CRC (?). I don't know the algorithm for the latter. I'm not even sure that it is a CRC.

I have extracted those three components and computed their checksums. The E2CH region has an XOR16 sum of 0x0000, but the NVRAM regions, which are identical, have an XOR16 sum of 0x1400. Something is wrong here (they should be 0x0000).

Code:
Offset(h) 00   02   04   06   08   0A   0C   0E

00002000  4532 5052 3230 3032 4747 3247 4243 4D30  E2PR2002GG2GBCM0
00002010  2020 2020 2020 4554 3538 3337 4E34 3331        ET5837N431
00002020  4C41 5241 F021 1803 6462 0E0E 0007 0003  LARAð!..db......
........
00002FF0  0000 0000 0000 0000 0000 8883 E7D3 41FC
                                   ^^^^^^^^^ ----
                                 32-bit CRC   16-bit XOR

Code:
Offset(h) 00   02   04   06   08   0A   0C   0E

00007000  4532 4348 0000 0000 0000 0000 0000 0000  E2CH............
........
00007FF0  FFFF FFFF FFFF FFFF FFFF 13D3 8630 2FD4
                                   ^^^^^^^^^ ----
                                 32-bit CRC   16-bit XOR
Attachments
facsi.7z
(4.1 KiB) Downloaded 125 times

Re: Hitachi HDD checksum

November 9th, 2024, 22:52

Hi fzabkar.

Thanks.
But im not sure if I fully understood. The file I sent was the one I modified. So the checksum on the file was incorrect.

I have this file from another drive that was locked and then unlocked by some third party. I checked the differences between them and tried to apply on the ROM of this other drive, same brand, model, etc.
It lacks the checksum. I will try the one you provided.

Re: Hitachi HDD checksum

November 9th, 2024, 23:19

Can you upload the other ROM?

Re: Hitachi HDD checksum

November 10th, 2024, 12:25

sure. the files with shorter name are mine, the ones with bigger are the other unlocked by 3rd party
Attachments
hdd.7z
(139.96 KiB) Downloaded 133 times

Re: Hitachi HDD checksum

November 10th, 2024, 13:22

I just checked the file you sent. the checksum is the same as the one on my file...

Re: Hitachi HDD checksum

November 10th, 2024, 14:52

Code:
HDDFIX_E2CH_7000_7FFF.BIN:   xor16be = 0x0000
HDDFIX_NVRAM_2000_2FFF.BIN:   xor16be = 0x1400    <---------
HDDFIX_NVRAM_3000_3FFF.BIN:   xor16be = 0x1400    <---------
PM25LV040_20170322_140616_E2CH_7000_7FFF.BIN:   xor16be = 0x0000
PM25LV040_20170322_140616_NVRAM_2000_2FFF.BIN:   xor16be = 0x0000
PM25LV040_20170322_140616_NVRAM_3000_3FFF.BIN:   xor16be = 0x0000

HDDORG_E2CH_7000_7FFF.BIN:   xor16be = 0x0000
HDDORG_NVRAM_2000_2FFF.BIN:   xor16be = 0x0000
HDDORG_NVRAM_3000_3FFF.BIN:   xor16be = 0x0000
PM25LV040_20170322_140616_DF_E2CH_7000_7FFF.BIN:   xor16be = 0x0000
PM25LV040_20170322_140616_DF_NVRAM_2000_2FFF.BIN:   xor16be = 0x0000
PM25LV040_20170322_140616_DF_NVRAM_3000_3FFF.BIN:   xor16be = 0x0000

Firmware Original Bloqueada\HDDORG_NVRAM_2000_2FFF.BIN

Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000DE0  05 00 00 00 14 00 8E 67 B4 CC 00 00 00 00 00 00
                      ^^

Firmware Desbloqueada Através do Software SeDiv\HDDFIX_NVRAM_2000_2FFF.BIN

Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000DE0  05 00 00 00 00 00 8E 67 B4 CC 00 00 00 00 00 00
                      ^^
Post a reply