Official FAQ
Ventoy Version
1.0.96
What about latest release
No. I didn't try the latest release.
Try alternative boot mode
No. I didn't try these alternative boot modes.
BIOS Mode
Legacy BIOS Mode
Partition Style
MBR
Disk Capacity
(untested)
Disk Manufacturer
No response
Image file checksum (if applicable)
No response
Image file download link (if applicable)
No response
What happened?
Though it may not make venoty2disk fail, diskio.c defines disk_write function as callback to fatfs lib. it considers a corner condition to preserve mbr header:
DRESULT disk_write (
BYTE pdrv, /* Physical drive nmuber to identify the drive */
const BYTE *buff, /* Data to be written */
LBA_t sector, /* Start sector in LBA */
UINT count /* Number of sectors to write */
)
{
......
// skip MBR
if (sector == 0)
{
memcpy(g_MbrSector, buff, sizeof(g_MbrSector));
if (count == 1)
{
return RES_OK;
}
sector++;
count--;
......
when sector0 is included in a write, the buffer actually written shifts 512 bytes. The correction is simply buff+=512. The reason why this may not be triggering issues is possibly that fatfs always won't write mbr header in conjunction with other data. However I suppose this logical error should be mended.
Official FAQ
Ventoy Version
1.0.96
What about latest release
No. I didn't try the latest release.
Try alternative boot mode
No. I didn't try these alternative boot modes.
BIOS Mode
Legacy BIOS Mode
Partition Style
MBR
Disk Capacity
(untested)
Disk Manufacturer
No response
Image file checksum (if applicable)
No response
Image file download link (if applicable)
No response
What happened?
Though it may not make venoty2disk fail, diskio.c defines disk_write function as callback to fatfs lib. it considers a corner condition to preserve mbr header:
when sector0 is included in a write, the buffer actually written shifts 512 bytes. The correction is simply
buff+=512. The reason why this may not be triggering issues is possibly that fatfs always won't write mbr header in conjunction with other data. However I suppose this logical error should be mended.