From 361833f42a057dc2685482bebfb34e0891036ca4 Mon Sep 17 00:00:00 2001 From: TomAwezome Date: Tue, 11 Oct 2022 18:23:38 -0400 Subject: [PATCH] Make OSInstall.ZC skip MBR install if UEFI-booted. --- src/Misc/OSInstall.ZC | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/Misc/OSInstall.ZC b/src/Misc/OSInstall.ZC index 44148db5..b018cd03 100755 --- a/src/Misc/OSInstall.ZC +++ b/src/Misc/OSInstall.ZC @@ -152,11 +152,14 @@ U0 OSUpgrade() res_num = I64Get("Enter desired list num ($$PURPLE$$$$FG$$ for max res): ",, 1); XTalkWait(task, "%d\n\n\n", res_num); //skip through Disk Cache, Options - "$$RED$$Install Master Boot Loader?$$FG$$"; - if (YorN) + if (!sys_is_uefi_booted) { - '\n'; - BootMHDIns(drv_let); + "$$RED$$Install Master Boot Loader?$$FG$$"; + if (YorN) + { + '\n'; + BootMHDIns(drv_let); + } } WinVert(task->win_top, Fs->win_bottom); @@ -256,7 +259,10 @@ U0 VMInstallWiz() { VMInstallDrive(task, 'C', ata_port, atapi_port); VMInstallDrive(task, 'D', ata_port, atapi_port); - BootMHDIns('C'); + if (!sys_is_uefi_booted) + { + BootMHDIns('C'); + } } WinVert(task->win_top, Fs->win_bottom); @@ -339,13 +345,15 @@ U0 RegularInstallWiz() VideoRep; res_num = I64Get("Enter desired list num ($$PURPLE$$$$FG$$ for max res): ",, 1); XTalkWait(task, "%d\n\n\n", res_num); //skip through Disk Cache, Options - "$$RED$$Install Master Boot loader?$$FG$$"; - if (YorN) + if (!sys_is_uefi_booted) { - '\n'; - BootMHDIns(drv_let); + "$$RED$$Install Master Boot loader?$$FG$$"; + if (YorN) + { + '\n'; + BootMHDIns(drv_let); + } } - WinVert(task->win_top, Fs->win_bottom); Kill(task); }