diff --git a/INSTALL/tool/aarch64/V2DServer b/INSTALL/tool/aarch64/V2DServer index f4e48733..03ce6438 100644 Binary files a/INSTALL/tool/aarch64/V2DServer and b/INSTALL/tool/aarch64/V2DServer differ diff --git a/INSTALL/tool/aarch64/Ventoy2Disk.gtk3 b/INSTALL/tool/aarch64/Ventoy2Disk.gtk3 index db03db5e..e42d6241 100644 Binary files a/INSTALL/tool/aarch64/Ventoy2Disk.gtk3 and b/INSTALL/tool/aarch64/Ventoy2Disk.gtk3 differ diff --git a/INSTALL/tool/aarch64/Ventoy2Disk.qt5 b/INSTALL/tool/aarch64/Ventoy2Disk.qt5 index 4b849396..009a1877 100644 Binary files a/INSTALL/tool/aarch64/Ventoy2Disk.qt5 and b/INSTALL/tool/aarch64/Ventoy2Disk.qt5 differ diff --git a/INSTALL/tool/i386/V2DServer b/INSTALL/tool/i386/V2DServer index fe154acd..deb10337 100644 Binary files a/INSTALL/tool/i386/V2DServer and b/INSTALL/tool/i386/V2DServer differ diff --git a/INSTALL/tool/i386/Ventoy2Disk.gtk2 b/INSTALL/tool/i386/Ventoy2Disk.gtk2 index f7317c59..774f5d32 100644 Binary files a/INSTALL/tool/i386/Ventoy2Disk.gtk2 and b/INSTALL/tool/i386/Ventoy2Disk.gtk2 differ diff --git a/INSTALL/tool/i386/Ventoy2Disk.gtk3 b/INSTALL/tool/i386/Ventoy2Disk.gtk3 index 938d6808..61167987 100644 Binary files a/INSTALL/tool/i386/Ventoy2Disk.gtk3 and b/INSTALL/tool/i386/Ventoy2Disk.gtk3 differ diff --git a/INSTALL/tool/i386/Ventoy2Disk.qt5 b/INSTALL/tool/i386/Ventoy2Disk.qt5 index e46494e6..b1c226d9 100644 Binary files a/INSTALL/tool/i386/Ventoy2Disk.qt5 and b/INSTALL/tool/i386/Ventoy2Disk.qt5 differ diff --git a/INSTALL/tool/mips64el/V2DServer b/INSTALL/tool/mips64el/V2DServer index 14be9acf..38eca27c 100644 Binary files a/INSTALL/tool/mips64el/V2DServer and b/INSTALL/tool/mips64el/V2DServer differ diff --git a/INSTALL/tool/mips64el/Ventoy2Disk.gtk3 b/INSTALL/tool/mips64el/Ventoy2Disk.gtk3 index 540a93ba..83ced170 100644 Binary files a/INSTALL/tool/mips64el/Ventoy2Disk.gtk3 and b/INSTALL/tool/mips64el/Ventoy2Disk.gtk3 differ diff --git a/INSTALL/tool/mips64el/Ventoy2Disk.qt5 b/INSTALL/tool/mips64el/Ventoy2Disk.qt5 index 03cc6bfb..d3c827ea 100644 Binary files a/INSTALL/tool/mips64el/Ventoy2Disk.qt5 and b/INSTALL/tool/mips64el/Ventoy2Disk.qt5 differ diff --git a/INSTALL/tool/x86_64/V2DServer b/INSTALL/tool/x86_64/V2DServer index 492a0e97..0bd0a4e0 100644 Binary files a/INSTALL/tool/x86_64/V2DServer and b/INSTALL/tool/x86_64/V2DServer differ diff --git a/INSTALL/tool/x86_64/Ventoy2Disk.gtk2 b/INSTALL/tool/x86_64/Ventoy2Disk.gtk2 index 7180adce..20ca6b3e 100644 Binary files a/INSTALL/tool/x86_64/Ventoy2Disk.gtk2 and b/INSTALL/tool/x86_64/Ventoy2Disk.gtk2 differ diff --git a/INSTALL/tool/x86_64/Ventoy2Disk.gtk3 b/INSTALL/tool/x86_64/Ventoy2Disk.gtk3 index 8e4b1144..4d41ef29 100644 Binary files a/INSTALL/tool/x86_64/Ventoy2Disk.gtk3 and b/INSTALL/tool/x86_64/Ventoy2Disk.gtk3 differ diff --git a/INSTALL/tool/x86_64/Ventoy2Disk.qt5 b/INSTALL/tool/x86_64/Ventoy2Disk.qt5 index 3bef337b..40becccf 100644 Binary files a/INSTALL/tool/x86_64/Ventoy2Disk.qt5 and b/INSTALL/tool/x86_64/Ventoy2Disk.qt5 differ diff --git a/LinuxGUI/Ventoy2Disk/Web/ventoy_http.c b/LinuxGUI/Ventoy2Disk/Web/ventoy_http.c index 31131578..8344b05d 100644 --- a/LinuxGUI/Ventoy2Disk/Web/ventoy_http.c +++ b/LinuxGUI/Ventoy2Disk/Web/ventoy_http.c @@ -685,6 +685,7 @@ static int ventoy_write_gpt_part_table(int fd, uint64_t disksize, VTOY_GPT_INFO static void * ventoy_update_thread(void *data) { int fd; + int updateMBR; ssize_t len; off_t offset; MBR_HEAD MBR; @@ -742,17 +743,32 @@ static void * ventoy_update_thread(void *data) len = write(fd, disk->vtoydata.rsvdata, sizeof(disk->vtoydata.rsvdata)); vlog("Writing reserve data offset:%llu len:%llu ...\n", (_ull)offset, (_ull)len); + updateMBR = 0; memcpy(&MBR, &(disk->vtoydata.gptinfo.MBR), 512); + if (disk->vtoydata.partition_style == 0 && MBR.PartTbl[0].Active == 0) { MBR.PartTbl[0].Active = 0x80; MBR.PartTbl[1].Active = 0; MBR.PartTbl[2].Active = 0; MBR.PartTbl[3].Active = 0; - + updateMBR = 1; + vlog("set MBR partition 1 active flag enabled\n"); + } + + if (MBR.BootCode[0x190] != 0x56 || MBR.BootCode[0x191] != 0x54) + { + vlog("set VT data %02x %02x\n", MBR.BootCode[0x190], MBR.BootCode[0x191]); + MBR.BootCode[0x190] = 0x56; + MBR.BootCode[0x191] = 0x54; + updateMBR = 1; + } + + if (updateMBR) + { offset = lseek(fd, 0, SEEK_SET); len = write(fd, &MBR, 512); - vlog("set MBR partition 1 active flag enabled offset:%llu len:%llu\n", (_ull)offset, (_ull)len); + vlog("update MBR offset:%llu len:%llu\n", (_ull)offset, (_ull)len); } g_current_progress = PT_SYNC_DATA1;