Ventoy 运行时参数格式
Ventoy 参数长度为 512 字节。具体结构如下: (结构1字节对齐,整数为小字节序)
| Offset | Len | Type | Name | Description |
|---|---|---|---|---|
| 0 | 16 | UUID | Signature UUID | Signature for this information, the hex value is 20207777772e76656e746f792e6e6574 |
| 16 | 1 | UINT8 | Check Sum | This value, when added to all other 511 bytes, results in the value 00h (using 8-bit addition calculations). |
| 17 | 16 | UUID | Disk GUID |
GUID to uniquely identify the disk. 注意:这个GUID不是GPT磁盘的GUID的概念,而是Ventoy在创建分区的时候自己写入的一个16字节的UUID。写入的位置在U盘第一个512扇区中的偏移 384 开始处。 MBR/GPT分区格式都会写入,位置相同,可以使用这个UUID代替Disk Signature来精确定位磁盘。 |
| 33 | 8 | UINT64 | Disk Size | The disk size in bytes. 注意:这个size是在grub阶段获取到的,特殊情况下可能和启动进入系统后获取到的不一致,因此不建议作为严格检查项目。 |
| 41 | 2 | UINT16 | Disk Partition ID | The partition ID (begin with 1) which hold the iso file |
| 43 | 2 | UINT16 | Partition Filesytem | The partition filesystem 0:exfat 1:ntfs 2:ext 3:xfs 4:udf 5:fat other:reserved |
| 45 | 384 | STRING | ISO File Path | The full iso file path under the partition, ( begin with '/' ) (UTF-8 encode) |
| 429 | 8 | UINT64 | ISO File Size | The iso file size in bytes |
| 437 | 8 | UINT64 | ISO location info address | The phy memory address which contains iso file location information |
| 445 | 4 | UINT32 | ISO location info length | The iso file location information length |
| 449 | 32 | BYTES | Ventoy Reserved | Reserved by Ventoy |
| 481 | 4 | BYTES | Disk Signature |
Disk signature to uniquely identify the disk. U盘第一个512扇区偏移 440 开始的4字节数据。 |
| 485 | 27 | BYTES | Reserved | Reserved for future |
具体可以参考 Ventoy 源码中 struct ventoy_os_param 的定义。(ventoy.h)