VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2022-01-15 21:14:20 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2022-01-15 21:15:47 +0100
commit0daec6723195331472cf0a95d345f89c7a322a9b (patch)
tree41acd832b1e003cb8dfb93330e5dddc9857f0c4f
parent981f24bc41e4fd467667e63c38cefc06f43887b5 (diff)
downloadVeraCrypt-DCS-0daec6723195331472cf0a95d345f89c7a322a9b.tar.gz
VeraCrypt-DCS-0daec6723195331472cf0a95d345f89c7a322a9b.zip
Rescue Disk: enhance "Boot Original Windows Loader" by using embedded backup of original Windows loader if it is missing from disk
-rw-r--r--DcsRe/DcsRe.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/DcsRe/DcsRe.c b/DcsRe/DcsRe.c
index 84f1fee..aa6f2ed 100644
--- a/DcsRe/DcsRe.c
+++ b/DcsRe/DcsRe.c
@@ -154,6 +154,15 @@ ActionWindowsBoot(IN VOID* ctx) {
if (bFound)
return EfiExec(gFSHandles[EfiBootVolumeIndex], L"EFI\\Microsoft\\Boot\\bootmgfw.efi");
}
+
+ /* copy our backup copy and then boot from it*/
+ if (!EFI_ERROR(FileExist(NULL, L"\\EFI\\Boot\\original_boot" ARCHdot L"vc_backup")))
+ {
+ if (!EFI_ERROR(FileCopy(NULL, L"\\EFI\\Boot\\original_boot" ARCHdot L"vc_backup", EfiBootVolume, L"EFI\\Microsoft\\Boot\\bootmgfw_ms.vc", 1024 * 1024)))
+ {
+ return EfiExec(gFSHandles[EfiBootVolumeIndex], L"EFI\\Microsoft\\Boot\\bootmgfw_ms.vc");
+ }
+ }
ERR_PRINT(L"Could not find the original Windows loader\r\n");