mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-05-31 23:28:32 -04:00
Fix the VHD(x) boot issue introduced in 1.0.87.
This commit is contained in:
parent
d9182dbfa4
commit
1300f7f4f1
1 changed files with 4 additions and 0 deletions
|
@ -262,6 +262,10 @@ static int ventoy_vhd_patch_disk(const char *vhdpath, ventoy_patch_vhd *patch1,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (offset == 0)
|
||||||
|
{
|
||||||
|
offset = gpt->MBR.PartTbl[partIndex].StartSectorId;
|
||||||
|
}
|
||||||
offset *= 512;
|
offset *= 512;
|
||||||
debug("MBR disk signature: %02x%02x%02x%02x Part(%d) offset:%llu\n",
|
debug("MBR disk signature: %02x%02x%02x%02x Part(%d) offset:%llu\n",
|
||||||
gpt->MBR.BootCode[0x1b8 + 0], gpt->MBR.BootCode[0x1b8 + 1],
|
gpt->MBR.BootCode[0x1b8 + 0], gpt->MBR.BootCode[0x1b8 + 1],
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue