Paragon GPT loader #3

By dose | September 28, 2019
Under: Uncategorized

Recently, I bought a 3rd harddisk which is over 2TB in space and added it to my Desktop machine. As mentioned previously,I had to fix the gpt_loader.sys driver in order to not crash.

My patch worked quite well for a few years, but after adding the new drive, it always crashed with 0xc000001d. So I first thought about another bug in the driver, but then I saw, that the ExceptionCode means c000001d Illegal instruction. Then checking with the debugger, I found out that it crashed at a location that I patched. As the instruction in the closeDriver call was bogus,I immediately thought about a reloaction table entry that must have been written ot the wrong location and indeed – when moving up the code by 2 bytes to get space for my patch, I overlooked a reloaction entry in place.

As long as the driver wasn’t moved in memory and got loaded at the preferred load address, the bug didn’t surface,but due to the new drive, it seems that the driver was reloacted and so the bug struck me. Of course, it was easy to patch, I just had to adjust the reloaction table entry by 2 bytes as well. I updated the patch so that it patched this too. If you need to install this fix on your machine, the patch created a gpt_loader.bak file in the %SystemRoot%\drivers directory. Just restore the gpt_loader.bak to gpt_loader.sys, then apply the updated patch from here and also don’t forget to apply the second patch.

If you have further questions, feel free to ask.

2 comments | Add One

Comments

  1. johnsm - 10/14/2019 at 10:04

    The new patch doesn’t work (it’s looking for C:\temp\gpt\test2\gpt_loader.sys):

    —————————
    Error
    —————————
    Cannot open file for writing: The system cannot find the path specified.
    —————————
    OK
    —————————

  2. dose - 10/14/2019 at 10:23

    Should be fixed now, sorry.

Trackbacks

Leave a Comment

Name:

E-Mail :

Subscribe :
Website :

Comments :