Hi! I have installed, encrypted, decrypted and uninstalled a few times on Win 10 on my system partition. I have even tried some random older versions of VC, but when all is done, just before booting I get:
Write error:128 Drive:0 Sector:25029
Write error:128 Drive:0 Sector:25029
Write error:128 Drive:0 Sector:24984
I dont know if it is the same sectors every time, I only managed to take a photo one time.
Everything seems to work OK after boot, but it feels somewhat scary with errors at boot.
What do you think is wrong and what should I do?
Some info about my VC, I only have this one system partition encrypted:
Last edit: raffe 2019-11-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for reporting this error and for the details.
First of all, error code 128 in this case means that there was a timeout while trying to write data to the given sector (cf http://www.ctyme.com/intr/rb-0606.htm#Table234). This means that the disk controller in BIOS mode rejected these write operations.
I think your disk controller is behaving the same way as the perform on the other thread and so a similar solution should help. But in your case, it is more complex to implement since it must be implement for generic write operation which requires mode code and more memory and both are very limited since we are already using almost all cod and memory available.
I will give it a thought to see if it can be done efficiently. Meanwhile, Windows is indeed unable to write some data to disk during early boot process and it is difficult to say if it is harmless or not. For sure, Windows has some internal mechanism at this early boot stage to recover from such write failure failure so I think you should be OK. Nevertheless, it is better to fix these and I hope to come back with a solution soon.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@raffe12345 : I have done a modification that should fix the problem you have. Is it possible for you to do a test using the attached version? it is a preview of upcoming 1.24-Hotfix2 and apart from this bootloader modification, it has minimal changes with 1.24-Hotfix1.
Thank you.
@idrassi Yes, VeraCrypt_Setup_1.24-Hotfix2-Preview did it's magic. After upgrading to it, the write errors are gone. Thanks for a super fast solution mr Mounir! :-)
Last edit: raffe 2019-11-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@raffe12345 : Thank you for the test and the feedback. Is it possible to perform several reboots to check more? I think I have covered all cases but it is better to wait for more tests before declaring victory :-)
In case the problem happens agains, I will need a screenshot of the messages displayed like what you did before to investigate further.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@idrassi: My motto, it is better to be happy in advance than not to be happy at all ;-) I have done maybe 3-4 reboots so far, and still no errors. I will get back if the errors comes back again, but until it is disproved, I declare this as a Victory and that this was the last time we had a bug in Veracrypt :-D
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi! I have installed, encrypted, decrypted and uninstalled a few times on Win 10 on my system partition. I have even tried some random older versions of VC, but when all is done, just before booting I get:

Write error:128 Drive:0 Sector:25029
Write error:128 Drive:0 Sector:25029
Write error:128 Drive:0 Sector:24984
I dont know if it is the same sectors every time, I only managed to take a photo one time.
Everything seems to work OK after boot, but it feels somewhat scary with errors at boot.
What do you think is wrong and what should I do?
Some info about my VC, I only have this one system partition encrypted:








Last edit: raffe 2019-11-02
Thank you for reporting this error and for the details.
First of all, error code 128 in this case means that there was a timeout while trying to write data to the given sector (cf http://www.ctyme.com/intr/rb-0606.htm#Table234). This means that the disk controller in BIOS mode rejected these write operations.
Last year, there was a report for the same error code but in a different context (hidden OS creation) and it only affected sector 0: https://sourceforge.net/p/veracrypt/discussion/technical/thread/285b90ab3d
I have fixed that issue by performing a 4096 bytes write operation instead of the requested 512 bytes one: https://sourceforge.net/p/veracrypt/code/ci/f05fd2e3d54507a72ce2bd0c3e3e4fcf722c5db7/
I think your disk controller is behaving the same way as the perform on the other thread and so a similar solution should help. But in your case, it is more complex to implement since it must be implement for generic write operation which requires mode code and more memory and both are very limited since we are already using almost all cod and memory available.
I will give it a thought to see if it can be done efficiently. Meanwhile, Windows is indeed unable to write some data to disk during early boot process and it is difficult to say if it is harmless or not. For sure, Windows has some internal mechanism at this early boot stage to recover from such write failure failure so I think you should be OK. Nevertheless, it is better to fix these and I hope to come back with a solution soon.
@raffe12345 : I have done a modification that should fix the problem you have. Is it possible for you to do a test using the attached version? it is a preview of upcoming 1.24-Hotfix2 and apart from this bootloader modification, it has minimal changes with 1.24-Hotfix1.
Thank you.
Thanks! I just came to work, but will try it when I get home in 6-8 hours. "I'll be back"
@idrassi Yes, VeraCrypt_Setup_1.24-Hotfix2-Preview did it's magic. After upgrading to it, the write errors are gone. Thanks for a super fast solution mr Mounir! :-)
Last edit: raffe 2019-11-05
@raffe12345 : Thank you for the test and the feedback. Is it possible to perform several reboots to check more? I think I have covered all cases but it is better to wait for more tests before declaring victory :-)
In case the problem happens agains, I will need a screenshot of the messages displayed like what you did before to investigate further.
@idrassi: My motto, it is better to be happy in advance than not to be happy at all ;-) I have done maybe 3-4 reboots so far, and still no errors. I will get back if the errors comes back again, but until it is disproved, I declare this as a Victory and that this was the last time we had a bug in Veracrypt :-D