Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue of generating incorrect GPT backup #130

Merged
merged 3 commits into from
Sep 15, 2024

Conversation

cool073
Copy link
Contributor

@cool073 cool073 commented Sep 3, 2024

Hello dear author! I have noticed an issue with this tool, where when I use it to resize the USER partition, the GPT backup it generates is incorrect. The partition table entries are still the same, including the LBA_END parameter of the USER partition. The GPT header backup is also incorrect. MY_LBA and ALT_LBA need to be swapped, and PARTITION_ENTRIES_LBA should be set to MY_LBA-32. Additionally, the CRC32 hash of the GPT header backup needs to be recomputed.
The reason why I found this problem is because I encountered an error when opening the virtual disk file RAWNAND.bin using DiskGenius. Later, I opened RAWNAND.bin with WinHex and analyzed the GPT backup, finally identifying the cause of the problem.
Later, I found the source code of this project on GitHub and fixed the issue. This pull request is intended to fix this issue. Please review it.

@impeeza
Copy link

impeeza commented Sep 15, 2024

Hello there, I am trying to build using this PR, and found which some of your changes are:
image

But on my setup the folder ~/OpenSSL_mingw64 nor ~/OpenSSL_mingw32 do not exists, I haven't cloned such repositories, where I can found them to clone?

Trying to build on my setup I got this error:
image

the file libcrypto.a do exist on my setup on /mingw64/lib/libcrypto.a and /mingw32/lib/libcrypto.a

I think for that libraries a full path like /mingw64/lib/libcrypto.a should be used instead a relative one, because I can have a clone of the repo on a sub folder of my home directory.

regards.

Copy link
Owner

@eliboa eliboa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@eliboa eliboa merged commit 41ed8ac into eliboa:master Sep 15, 2024
1 check failed
@eliboa
Copy link
Owner

eliboa commented Sep 15, 2024

Hello there, I am trying to build using this PR, and found which some of your changes are: image

But on my setup the folder ~/OpenSSL_mingw64 nor ~/OpenSSL_mingw32 do not exists, I haven't cloned such repositories, where I can found them to clone?

Trying to build on my setup I got this error: image

the file libcrypto.a do exist on my setup on /mingw64/lib/libcrypto.a and /mingw32/lib/libcrypto.a

I think for that libraries a full path like /mingw64/lib/libcrypto.a should be used instead a relative one, because I can have a clone of the repo on a sub folder of my home directory.

regards.

Check this out : https://eliboa.com/NxNandManager_Set_up_and_build_project_with_Qt.pdf
Here are OpenSSL MinGW builds you can grab => https://eliboa.com/OpenSSL_mingw_build.rar

@impeeza
Copy link

impeeza commented Sep 15, 2024

Sadly still no be able to build from code, and also the Action fails with this PR merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants