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

--ignore_crc not working properly in partclone 3.12 #121

Open
junkhacker opened this issue Dec 21, 2018 · 6 comments
Open

--ignore_crc not working properly in partclone 3.12 #121

junkhacker opened this issue Dec 21, 2018 · 6 comments

Comments

@junkhacker
Copy link
Contributor

junkhacker commented Dec 21, 2018

restoring an image created with partclone 2.89 with partclone.restore 3.12 and --ignore_crc flag enabled results in a corrupt restore to device but does not report an error
restoring an image created with partclone 3.12 with partclone.restore 3.12 and --ignore_crc flag enabled results in a crc error while finishing the write to device (before it usually says SYNCING...OK)
an image created with partclone 3.12 using -aX0 flag restored with partclone.restore 3.12 and --ignore_crc flag enabled works fine

@porsager
Copy link

Wow so glad I found this issue. I'm experiencing the very same thing. Did you find a solution / workaround?

@porsager
Copy link

I assume my issue here could be related: #109

@junkhacker
Copy link
Contributor Author

this problem only occurs when you use the --ignore_crc command option when restoring an image. the new partclone format changed the checksum mechanism but i suspect that the functions for ignoring checksums were either forgot or were updated with errors. restoring an image without using the --ignore_crc command option works fine.

cdeleuze added a commit to cdeleuze/partclone that referenced this issue Mar 11, 2020
If opt.ignore_crc is set, must not check the (uncomputed) checksum of
the latest chunk
Thomas-Tsai added a commit that referenced this issue May 18, 2020
@Sebastian-Roth
Copy link
Contributor

@Thomas-Tsai Working together with @junkhacker on FOG project we make heavy use of partclone and I just stumbled upon this issue again. The fix proposed by @cdeleuze might be a first step but in my tests an image captured with partclone 0.2.89 is still being corrupted when deploying it with partclone 0.3.x (currently we use 0.3.13 + 72054f1) but without any error message whatsoever.

Looking through the code and comparing images written with and without the --ignore_crc option I think I might have found why it happens. I will send in a pull request in a minute to address what I think should fix this. Please take a close look at this as I am not sure if it would cause problems in other scenarios.

Sebastian-Roth added a commit to Sebastian-Roth/partclone that referenced this issue Sep 27, 2020
Reset variable blocks_in_cs to make sure we skip checksum bytes instead of writing those out to disk
@Sebastian-Roth
Copy link
Contributor

@Thomas-Tsai @partclone Would you please take a look at the proposal to fix the issue initially reported by @junkhacker? The FOGproject heavily depends on using partclone and we'd like to contribute as good as we can.

@Thomas-Tsai
Copy link
Owner

sorry for the reply late. I just manual update main.c and just accept the patch from proposal to fix the issue. I will give a test and release ASAP.

Sebastian-Roth added a commit to FOGProject/fos that referenced this issue Nov 8, 2020
… with image files created with partclone 0.2.89. For more information see Thomas-Tsai/partclone#121
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

No branches or pull requests

4 participants