mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-09-16 09:01:15 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
004ad27e0d | ||
|
9a8dc42d93 |
@@ -2408,7 +2408,7 @@ function mimg_common_menuentry {
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.1.03"
|
||||
set VENTOY_VERSION="1.1.04"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
|
@@ -625,10 +625,14 @@ else
|
||||
check_umount_disk "$DISK"
|
||||
vtoycli partresize -s $DISK $part2_start
|
||||
fi
|
||||
|
||||
|
||||
vtinfo "update esp partition attribute"
|
||||
vtoycli gpt -f $DISK
|
||||
sync
|
||||
if [ "$PART1_TYPE" = "EE" ]; then
|
||||
vtinfo "update esp partition attribute"
|
||||
vtoycli gpt -f $DISK
|
||||
sync
|
||||
fi
|
||||
|
||||
|
||||
echo ""
|
||||
vtinfo "Update Ventoy on $DISK successfully finished."
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -807,6 +807,8 @@ static void * ventoy_update_thread(void *data)
|
||||
pstGPT->PartTbl[1].Attr, 0x8000000000000000ULL);
|
||||
|
||||
pstGPT->PartTbl[1].Attr = 0x8000000000000000ULL;
|
||||
|
||||
pstGPT->Head.PartTblCrc = ventoy_crc32(pstGPT->PartTbl, sizeof(pstGPT->PartTbl));
|
||||
pstGPT->Head.Crc = 0;
|
||||
pstGPT->Head.Crc = ventoy_crc32(&(pstGPT->Head), pstGPT->Head.Length);
|
||||
ventoy_write_gpt_part_table(fd, disk->size_in_byte, pstGPT);
|
||||
|
@@ -191,23 +191,26 @@ int vtoygpt_main(int argc, char **argv)
|
||||
Name = pMainGptInfo->PartTbl[1].Name;
|
||||
if (Name[0] == 'V' && Name[1] == 'T' && Name[2] == 'O' && Name[3] == 'Y')
|
||||
{
|
||||
pMainGptInfo->PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
|
||||
pMainGptInfo->Head.PartTblCrc = VtoyCrc32(pMainGptInfo->PartTbl, sizeof(pMainGptInfo->PartTbl));
|
||||
pMainGptInfo->Head.Crc = 0;
|
||||
pMainGptInfo->Head.Crc = VtoyCrc32(&pMainGptInfo->Head, pMainGptInfo->Head.Length);
|
||||
if (pMainGptInfo->PartTbl[1].Attr != VENTOY_EFI_PART_ATTR)
|
||||
{
|
||||
pMainGptInfo->PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
|
||||
pMainGptInfo->Head.PartTblCrc = VtoyCrc32(pMainGptInfo->PartTbl, sizeof(pMainGptInfo->PartTbl));
|
||||
pMainGptInfo->Head.Crc = 0;
|
||||
pMainGptInfo->Head.Crc = VtoyCrc32(&pMainGptInfo->Head, pMainGptInfo->Head.Length);
|
||||
|
||||
pBackGptInfo->PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
|
||||
pBackGptInfo->Head.PartTblCrc = VtoyCrc32(pBackGptInfo->PartTbl, sizeof(pBackGptInfo->PartTbl));
|
||||
pBackGptInfo->Head.Crc = 0;
|
||||
pBackGptInfo->Head.Crc = VtoyCrc32(&pBackGptInfo->Head, pBackGptInfo->Head.Length);
|
||||
pBackGptInfo->PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
|
||||
pBackGptInfo->Head.PartTblCrc = VtoyCrc32(pBackGptInfo->PartTbl, sizeof(pBackGptInfo->PartTbl));
|
||||
pBackGptInfo->Head.Crc = 0;
|
||||
pBackGptInfo->Head.Crc = VtoyCrc32(&pBackGptInfo->Head, pBackGptInfo->Head.Length);
|
||||
|
||||
lseek(fd, 512, SEEK_SET);
|
||||
write(fd, (UINT8 *)pMainGptInfo + 512, sizeof(VTOY_GPT_INFO) - 512);
|
||||
lseek(fd, 512, SEEK_SET);
|
||||
write(fd, (UINT8 *)pMainGptInfo + 512, sizeof(VTOY_GPT_INFO) - 512);
|
||||
|
||||
lseek(fd, DiskSize - 33 * 512, SEEK_SET);
|
||||
write(fd, pBackGptInfo, sizeof(VTOY_BK_GPT_INFO));
|
||||
lseek(fd, DiskSize - 33 * 512, SEEK_SET);
|
||||
write(fd, pBackGptInfo, sizeof(VTOY_BK_GPT_INFO));
|
||||
|
||||
fsync(fd);
|
||||
fsync(fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -291,23 +291,26 @@ int main(int argc, const char **argv)
|
||||
Name = pMainGptInfo->PartTbl[1].Name;
|
||||
if (Name[0] == 'V' && Name[1] == 'T' && Name[2] == 'O' && Name[3] == 'Y')
|
||||
{
|
||||
pMainGptInfo->PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
|
||||
pMainGptInfo->Head.PartTblCrc = VtoyCrc32(pMainGptInfo->PartTbl, sizeof(pMainGptInfo->PartTbl));
|
||||
pMainGptInfo->Head.Crc = 0;
|
||||
pMainGptInfo->Head.Crc = VtoyCrc32(&pMainGptInfo->Head, pMainGptInfo->Head.Length);
|
||||
if (pMainGptInfo->PartTbl[1].Attr != VENTOY_EFI_PART_ATTR)
|
||||
{
|
||||
pMainGptInfo->PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
|
||||
pMainGptInfo->Head.PartTblCrc = VtoyCrc32(pMainGptInfo->PartTbl, sizeof(pMainGptInfo->PartTbl));
|
||||
pMainGptInfo->Head.Crc = 0;
|
||||
pMainGptInfo->Head.Crc = VtoyCrc32(&pMainGptInfo->Head, pMainGptInfo->Head.Length);
|
||||
|
||||
pBackGptInfo->PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
|
||||
pBackGptInfo->Head.PartTblCrc = VtoyCrc32(pBackGptInfo->PartTbl, sizeof(pBackGptInfo->PartTbl));
|
||||
pBackGptInfo->Head.Crc = 0;
|
||||
pBackGptInfo->Head.Crc = VtoyCrc32(&pBackGptInfo->Head, pBackGptInfo->Head.Length);
|
||||
pBackGptInfo->PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
|
||||
pBackGptInfo->Head.PartTblCrc = VtoyCrc32(pBackGptInfo->PartTbl, sizeof(pBackGptInfo->PartTbl));
|
||||
pBackGptInfo->Head.Crc = 0;
|
||||
pBackGptInfo->Head.Crc = VtoyCrc32(&pBackGptInfo->Head, pBackGptInfo->Head.Length);
|
||||
|
||||
lseek(fd, 512, SEEK_SET);
|
||||
write(fd, (UINT8 *)pMainGptInfo + 512, sizeof(VTOY_GPT_INFO) - 512);
|
||||
lseek(fd, 512, SEEK_SET);
|
||||
write(fd, (UINT8 *)pMainGptInfo + 512, sizeof(VTOY_GPT_INFO) - 512);
|
||||
|
||||
lseek(fd, DiskSize - 33 * 512, SEEK_SET);
|
||||
write(fd, pBackGptInfo, sizeof(VTOY_BK_GPT_INFO));
|
||||
lseek(fd, DiskSize - 33 * 512, SEEK_SET);
|
||||
write(fd, pBackGptInfo, sizeof(VTOY_BK_GPT_INFO));
|
||||
|
||||
fsync(fd);
|
||||
fsync(fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user