Compare commits

..

22 Commits

Author SHA1 Message Date
A1ive
0e9d34422a
Update xfs to latest (#3284)
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled
Thanks!
2025-07-07 09:21:53 +08:00
longpanda
c7c9c62ec7
Update BLOB_List.md
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled
2025-05-22 12:55:41 +08:00
longpanda
9e13955af1 Add BLOB list file and some missing build desc. 2025-05-14 14:35:44 +08:00
longpanda
2dafe75509 Fix the boot issue for TrueNAS Scale. (#3069)
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled
2025-03-03 14:42:44 +08:00
longpanda
6fbc08cfcb Only for VirtualBox.
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled
2025-02-28 14:58:36 +08:00
longpanda
6034b25cba Don't force to use max resolution for VMware/VirtualBox. (#3140) 2025-02-28 14:49:40 +08:00
longpanda
c5fd64d21c Support TrueNAS Scale (Linux) distro. (#3069 #3137)
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled
2025-02-26 23:25:27 +08:00
longpanda
32fac72b5b 1.1.05
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled
2025-02-24 19:29:46 +08:00
longpanda
022322c8fa Fix the resolution issue when boot Windows/WinPE in UEFI mode. 2025-02-24 19:17:19 +08:00
longpanda
96f11252d9 support devuan in Legacy BIOS mode. 2025-02-24 19:16:31 +08:00
longpanda
004ad27e0d 1.1.04 release
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled
2025-02-22 11:27:31 +08:00
longpanda
9a8dc42d93 Fix the issue introduced in LinuxGUI version. (#3128) 2025-02-22 11:27:18 +08:00
longpanda
6166a813ea 1.1.03
Some checks are pending
Ventoy CI / build (push) Waiting to run
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Waiting to run
2025-02-21 18:14:18 +08:00
longpanda
786a9ec678 Update Ventoy2Disk.exe
Some checks are pending
Ventoy CI / build (push) Waiting to run
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Waiting to run
2025-02-21 13:00:15 +08:00
longpanda
0600576c78 Update Linux GUI type condition 2025-02-21 13:00:01 +08:00
longpanda
72b722c86c Fix the boot issue for latest TinyCore Linux. 2025-02-21 12:59:33 +08:00
longpanda
bea5607ea5 Fix the boot issue for pfSense 2.7.x (#2775)
Some checks are pending
Ventoy CI / build (push) Waiting to run
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Waiting to run
2025-02-21 00:29:38 +08:00
longpanda
b3c2bcf58f Fix the issue that SLES/OpenSUSE can not boot after install. (#3125) 2025-02-20 22:07:28 +08:00
longpanda
4e8d8b2e19 Fix Windows 11 error 0x80070001. (#3010 #3029 #3105)
Some checks are pending
Ventoy CI / build (push) Waiting to run
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Waiting to run
2025-02-19 23:49:03 +08:00
longpanda
60d88cb7b1 1.1.02 release
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled
2025-02-12 23:01:35 +08:00
longpanda
f7e6bbc70c Fix the "Unsupported vtoy type unknown" error when boot a VDI file created by VirtualBox 7.x 2025-02-12 23:00:27 +08:00
longpanda
ee994a0569 github ai version update
Some checks failed
Ventoy CI / build (push) Has been cancelled
Mirror GitHub to Gitee / Sync-GitHub-to-Gitee (push) Has been cancelled
2025-02-10 21:46:39 +08:00
53 changed files with 842 additions and 105 deletions

View File

@ -15,23 +15,23 @@ jobs:
- uses: actions/checkout@v3
- name: Run docker compose up
run: docker compose up
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ventoy-windows
path: INSTALL/ventoy-*windows*
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ventoy-linux
path: INSTALL/ventoy-*linux*
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ventoy-livecd
path: INSTALL/ventoy-*livecd*
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: SHA256SUM
path: INSTALL/sha256.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: xxx-build-log
path: DOC/build.log

193
BLOB_List.md Normal file
View File

@ -0,0 +1,193 @@
<table>
<thead>
<tr>
<th>BLOB</th>
<th>File Source</th>
<th>Desc</th>
</tr>
</thead>
<tbody>
<tr> <td>./BUSYBOX/chmod/vtchmod32</td> <td rowspan=5>build</td> <td rowspan=5>Build Instructions:<br/> ./BUSYBOX/chmod/build.sh</td> </tr>
<tr> <td>./BUSYBOX/chmod/vtchmod64</td> </tr>
<tr> <td>./BUSYBOX/chmod/vtchmod64_musl</td> </tr>
<tr> <td>./BUSYBOX/chmod/vtchmodaa64</td> </tr>
<tr> <td>./BUSYBOX/chmod/vtchmodm64e</td> </tr>
<tr> <td>./cryptsetup/veritysetup32</td> <td rowspan=2>build</td> <td rowspan=2>Build Instructions:<br/> ./cryptsetup/cryptsetup-build.txt</td> </tr>
<tr> <td>./cryptsetup/veritysetup64</td> </tr>
<tr> <td>./DMSETUP/dmsetup32</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/> ./DMSETUP/build.txt</td> </tr>
<tr> <td>./DMSETUP/dmsetup64</td> </tr>
<tr> <td>./DMSETUP/dmsetupaa64</td> </tr>
<tr> <td>./DMSETUP/dmsetupm64e</td> </tr>
<tr> <td>./FUSEISO/vtoy_fuse_iso_32</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/> ./FUSEISO/build.sh<br/>./FUSEISO/build_aarch64.sh<br/>./FUSEISO/build_libfuse.sh<br/>./FUSEISO/build_libfuse_aarch64.sh </td> </tr>
<tr> <td>./FUSEISO/vtoy_fuse_iso_64</td> </tr>
<tr> <td>./FUSEISO/vtoy_fuse_iso_aa64</td> </tr>
<tr> <td>./IMG/cpio_arm64/ventoy/busybox/a64</td> <td>build</td> <td>Build Instructions:<br/>./BUSYBOX/build.txt ash</td> </tr>
<tr> <td>./IMG/cpio_arm64/ventoy/busybox/vtchmodaa64</td> <td>build</td> <td>Same with ./BUSYBOX/chmod/vtchmodaa64<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./IMG/cpio_arm64/ventoy/busybox/xzminidecaa64</td> <td>build</td> <td>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.17</td> </tr>
<tr> <td>./IMG/cpio_arm64/ventoy/tool/lz4cataa64</td> <td>build</td> <td>Same with ./LZIP/lz4cataa64<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./IMG/cpio_arm64/ventoy/tool/zstdcataa64</td> <td>build</td> <td>Same with ./ZSTD/zstdcataa64<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./IMG/cpio_mips64/ventoy/busybox/m64</td> <td>build</td> <td>Build Instructions:<br/>./BUSYBOX/build.txt ash</td> </tr>
<tr> <td>./IMG/cpio_mips64/ventoy/busybox/vtchmodm64e</td> <td>build</td> <td>Same with ./BUSYBOX/chmod/vtchmodm64e<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./IMG/cpio_mips64/ventoy/busybox/xzminidecm64e</td> <td>build</td> <td>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.18</td> </tr>
<tr> <td>./IMG/cpio_mips64/ventoy/tool/lz4catm64e</td> <td>build</td> <td>Same with ./LZIP/lz4catm64e<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/64h</td> <td>build</td> <td>Build Instructions:<br/>./BUSYBOX/build.txt ash</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/ash</td> <td>upstream</td> <td>Download from BusyBox website.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.4</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/vtchmod32</td> <td>build</td> <td>Same with ./BUSYBOX/chmod/vtchmod32<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/vtchmod64</td> <td>build</td> <td>Same with ./BUSYBOX/chmod/vtchmod64<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/vtchmod64_musl</td> <td>build</td> <td>Same with ./BUSYBOX/chmod/vtchmod64_musl<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzminidec32</td> <td>build</td> <td>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.15</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzminidec64</td> <td>build</td> <td>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.16</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzminidec64_musl</td> <td>build</td> <td>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.16</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/tool/ar</td> <td>upstream</td> <td>Download from BusyBox website.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.2</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/tool/inotifyd</td> <td>upstream</td> <td>Download from BusyBox website.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.3</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/tool/lz4cat</td> <td>upstream</td> <td>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.1</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/tool/lz4cat64</td> <td>build</td> <td>Build Instructions:<br/>./LZIP/buildlz4.txt</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/tool/zstdcat</td> <td>build</td> <td>Same with ./ZSTD/zstdcat<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/tool/zstdcat64</td> <td>build</td> <td>Same with ./ZSTD/zstdcat64<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./INSTALL/EFI/BOOT/BOOTAA64.EFI</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/> ./DOC/BuildVentoyFromSource.txt 4.1-Build grub2</td> </tr>
<tr> <td>./INSTALL/EFI/BOOT/BOOTMIPS.EFI</td>
<tr> <td>./INSTALL/EFI/BOOT/grubia32_real.efi</td>
<tr> <td>./INSTALL/EFI/BOOT/grubx64_real.efi</td>
<tr> <td>./INSTALL/EFI/BOOT/grub.efi</td> <td rowspan=6>upstream</td> <td rowspan=6>https://github.com/ValdikSS/Super-UEFIinSecureBoot-Disk </td> </tr>
<tr> <td>./INSTALL/EFI/BOOT/BOOTIA32.EFI</td>
<tr> <td>./INSTALL/EFI/BOOT/BOOTX64.EFI</td>
<tr> <td>./INSTALL/EFI/BOOT/grubia32.efi</td>
<tr> <td>./INSTALL/EFI/BOOT/mmia32.efi</td>
<tr> <td>./INSTALL/EFI/BOOT/MokManager.efi</td>
<tr> <td>./INSTALL/tool/aarch64/ash</td> <td rowspan=12>build</td> <td rowspan=12>Build Instructions:<br/>./DOC/BUSYBOX/build.txt</td> </tr>
<tr> <td>./INSTALL/tool/aarch64/hexdump</td>
<tr> <td>./INSTALL/tool/aarch64/xzcat</td>
<tr> <td>./INSTALL/tool/i386/ash</td>
<tr> <td>./INSTALL/tool/i386/hexdump</td>
<tr> <td>./INSTALL/tool/i386/xzcat</td>
<tr> <td>./INSTALL/tool/mips64el/ash</td>
<tr> <td>./INSTALL/tool/mips64el/hexdump</td>
<tr> <td>./INSTALL/tool/mips64el/xzcat</td>
<tr> <td>./INSTALL/tool/x86_64/ash</td>
<tr> <td>./INSTALL/tool/x86_64/hexdump</td>
<tr> <td>./INSTALL/tool/x86_64/xzcat</td>
<tr> <td>./INSTALL/tool/aarch64/Ventoy2Disk.gtk3</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./LinuxGUI/build_gtk.sh</td> </tr>
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.gtk3</td>
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.gtk2</td>
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.gtk3</td>
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.gtk3</td>
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.gtk2</td>
<tr> <td>./INSTALL/tool/aarch64/Ventoy2Disk.qt5</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./LinuxGUI/build_qt.sh</td> </tr>
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.qt5</td>
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.qt5</td>
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.qt5</td>
<tr> <td>./INSTALL/tool/aarch64/Plugson</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./Plugson/build.sh</td> </tr>
<tr> <td>./INSTALL/tool/i386/Plugson</td>
<tr> <td>./INSTALL/tool/mips64el/Plugson</td>
<tr> <td>./INSTALL/tool/x86_64/Plugson</td>
<tr> <td>./INSTALL/tool/aarch64/V2DServer</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./LinuxGUI/build.sh</td> </tr>
<tr> <td>./INSTALL/tool/i386/V2DServer</td>
<tr> <td>./INSTALL/tool/mips64el/V2DServer</td>
<tr> <td>./INSTALL/tool/x86_64/V2DServer</td>
<tr> <td>./INSTALL/tool/aarch64/mkexfatfs</td> <td rowspan=8>build</td> <td rowspan=8>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.9<br/>./ExFAT/buidexfat.sh<br/>./ExFAT/buidexfat_aarch64.sh<br/>./ExFAT/buidlibfuse.sh<br/>./ExFAT/buidlibfuse_aarch64.sh<br/></td> </tr>
<tr> <td>./INSTALL/tool/aarch64/mount.exfat-fuse</td>
<tr> <td>./INSTALL/tool/i386/mkexfatfs</td>
<tr> <td>./INSTALL/tool/i386/mount.exfat-fuse</td>
<tr> <td>./INSTALL/tool/mips64el/mkexfatfs</td>
<tr> <td>./INSTALL/tool/mips64el/mount.exfat-fuse</td>
<tr> <td>./INSTALL/tool/x86_64/mkexfatfs</td>
<tr> <td>./INSTALL/tool/x86_64/mount.exfat-fuse</td>
<tr> <td>./INSTALL/tool/aarch64/vlnk</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./Vlnk/build.sh</td> </tr>
<tr> <td>./INSTALL/tool/i386/vlnk</td>
<tr> <td>./INSTALL/tool/mips64el/vlnk</td>
<tr> <td>./INSTALL/tool/x86_64/vlnk</td>
<tr> <td>./INSTALL/tool/aarch64/vtoycli</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./vtoycli/build.sh</td> </tr>
<tr> <td>./INSTALL/tool/i386/vtoycli</td>
<tr> <td>./INSTALL/tool/mips64el/vtoycli</td>
<tr> <td>./INSTALL/tool/x86_64/vtoycli</td>
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.cpl</td> <td rowspan=6>upstream</td> <td rowspan=6>Download from imdisk project.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.8</td> </tr>
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.exe</td>
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.sys</td>
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.cpl</td>
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.exe</td>
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.sys</td>
<tr> <td>./INSTALL/ventoy/iso9660_aa64.efi</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.17</td> </tr>
<tr> <td>./INSTALL/ventoy/udf_aa64.efi</td>
<tr> <td>./INSTALL/ventoy/iso9660_ia32.efi</td>
<tr> <td>./INSTALL/ventoy/udf_ia32.efi</td>
<tr> <td>./INSTALL/ventoy/iso9660_x64.efi</td>
<tr> <td>./INSTALL/ventoy/udf_x64.efi</td>
<tr> <td>./INSTALL/VentoyGUI.aarch64</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./LinuxGUI/build_gtk.sh</td> </tr>
<tr> <td>./INSTALL/VentoyGUI.i386</td>
<tr> <td>./INSTALL/VentoyGUI.mips64el</td>
<tr> <td>./INSTALL/VentoyGUI.x86_64</td>
<tr> <td>./INSTALL/Ventoy2Disk.exe</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./Ventoy2Disk/Ventoy2Disk.sln</td> </tr>
<tr> <td>./INSTALL/Ventoy2Disk_ARM.exe</td>
<tr> <td>./INSTALL/Ventoy2Disk_ARM64.exe</td>
<tr> <td>./INSTALL/Ventoy2Disk_X64.exe</td>
<tr> <td>./INSTALL/ventoy/vtoyjump32.exe</td> <td rowspan=2>build</td> <td rowspan=2>Build Instructions:<br/>./vtoyjump/vtoyjump.sln</td> </tr>
<tr> <td>./INSTALL/ventoy/vtoyjump64.exe</td>
<tr> <td>./INSTALL/ventoy/ventoy_aa64.efi</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./EDK2/buildedk.sh</td> </tr>
<tr> <td>./INSTALL/ventoy/ventoy_ia32.efi</td>
<tr> <td>./INSTALL/ventoy/ventoy_x64.efi</td>
<tr> <td>./INSTALL/ventoy/vtoyutil_aa64.efi</td>
<tr> <td>./INSTALL/ventoy/vtoyutil_ia32.efi</td>
<tr> <td>./INSTALL/ventoy/vtoyutil_x64.efi</td>
<tr> <td>./INSTALL/ventoy/ipxe.krn</td> <td>build</td> <td>Build Instructions:<br/>./IPXE/buildipxe.sh</td> </tr>
<tr> <td>./INSTALL/ventoy/memdisk</td> <td>upstream</td> <td>Download from syslinux project.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.9</td> </tr>
<tr> <td>./LiveCD/ISO/EFI/boot/vmlinuz64</td> <td>upstream</td> <td>Download from TinyLinux website.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.14</td> </tr>
<tr> <td>./LiveCDGUI/EXT/busybox-x86_64</td> <td>build</td> <td>Same with ./IMG/cpio_x86/ventoy/busybox/busybox64<br/>Check the file hash to confirm</td> </tr>
<tr> <td>./LiveCDGUI/GRUB/bootx64.efi</td> <td rowspan=2>build</td> <td rowspan=2>./DOC/BuildVentoyFromSource.txt 4.1-Build grub2</td> </tr>
<tr> <td>./LiveCD/GRUB/bootx64.efi</td>
<tr> <td>./LZIP/lunzip32</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.19</td> </tr>
<tr> <td>./LZIP/lunzip64</td>
<tr> <td>./LZIP/lunzipaa64</td>
<tr> <td>./LZIP/lz4cat64</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./LZIP/buildlz4.txt</td> </tr>
<tr> <td>./LZIP/lz4cataa64</td>
<tr> <td>./LZIP/lz4catm64e</td>
<tr> <td>./Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe</td> <td rowspan=2>build</td> <td rowspan=2>Build Instructions:<br/>./Plugson/vs/VentoyPlugson/VentoyPlugson.sln</td> </tr>
<tr> <td>./Plugson/vs/VentoyPlugson/x64/Release/VentoyPlugson_X64.exe</td>
<tr> <td>./SQUASHFS/unsquashfs_32</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./SQUASHFS/build.sh</td> </tr>
<tr> <td>./SQUASHFS/unsquashfs_64</td>
<tr> <td>./SQUASHFS/unsquashfs_aa64</td>
<tr> <td>./Unix/ventoy_unix/DragonFly/sbin/dmsetup</td> <td>upstream</td> <td>Get from DragonFly ISO.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.13</td> </tr>
<tr> <td>./Unix/ventoy_unix/DragonFly/sbin/init</td> <td>build</td> <td>Build Instructions:<br/>./Unix/ventoy_unix_src/DragonFly/build.sh</td> </tr>
<tr> <td>./VBLADE/vblade-master/vblade_32</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./VBLADE/vblade-master/build.sh</td> </tr>
<tr> <td>./VBLADE/vblade-master/vblade_64</td>
<tr> <td>./VBLADE/vblade-master/vblade_aa64</td>
<tr> <td>./Vlnk/vs/VentoyVlnk/Release/VentoyVlnk.exe</td> <td>build</td> <td>Build Instructions:<br/>./Vlnk/vs/VentoyVlnk/VentoyVlnk.sln</td> </tr>
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_32</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./VtoyTool/build.sh</td> </tr>
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_64</td>
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_aa64</td>
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_m64e</td>
<tr> <td>./VtoyTool/vtoytool/01/vtoytool_64</td>
<tr> <td>./VtoyTool/vtoytool/02/vtoytool_64</td>
<tr> <td>./ZSTD/zstdcat</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./ZSTD/build.txt</td> </tr>
<tr> <td>./ZSTD/zstdcat64</td>
<tr> <td>./ZSTD/zstdcataa64</td>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/busybox32</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./BUSYBOX/build.txt full busybox</td> </tr>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/busybox64</td>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat32_musl</td>
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat64_musl</td>
<tr> <td>./IMG/cpio_arm64/ventoy/busybox/busyboxaa64</td>
<tr> <td>./IMG/cpio_mips64/ventoy/busybox/busyboxm64e</td>
<tr> <td>ISNTALL/ventoy/7z/64/7za.exe</td> <td rowspan=2>upstream</td> <td>Download from 7z project.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.12</td> </tr>
<tr> <td>ISNTALL/ventoy/7z/32/7za.exe</td>
<tr> <td>./INSTALL/ventoy/wimboot.i386.efi</td> <td rowspan=2>build</td> <td rowspan=2>Build Instructions:<br/>./wimboot/build.sh</td> </tr>
<tr> <td>./INSTALL/ventoy/wimboot.x86_64</td>
<tr> <td> ./Unix/ventoy_unix/ClonOS/geom_ventoy_ko/13.x/64/geom_ventoy.ko</td> <td rowspan=18>build</td> <td rowspan=18>Build Instructions:<br/>./Unix/BuildUnixKmod.txt</td> </tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/10.x/32/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/10.x/64/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/11.x/32/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/11.x/64/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/12.x/32/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/12.x/64/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/32/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/13.x/64/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/14.x/32/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/14.x/64/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/9.x/32/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/9.x/64/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/MidnightBSD/geom_ventoy_ko/11.x/32/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/MidnightBSD/geom_ventoy_ko/11.x/64/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/MidnightBSD/geom_ventoy_ko/2.x/32/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/MidnightBSD/geom_ventoy_ko/2.x/64/geom_ventoy.ko</td></tr>
<tr> <td> ./Unix/ventoy_unix/pfSense/geom_ventoy_ko/14.x/64/geom_ventoy.ko</td></tr>
</tbody>
</table>

View File

@ -159,12 +159,12 @@
make -f ventoy_makefile
strip --strip-all xzminidec
4.16 == Build xzminidec64 ==
4.16 == Build xzminidec64/xzminidec64_musl ==
cd /home/Ventoy-master/Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace
make -f ventoy_makefile64
make -f ventoy_makefile64 or make -f ventoy_makefile64_musl
strip --strip-all xzminidec
4.17 == Build iso9660_x64.efi ==
4.17 == Build iso9660_x64.efi/udf_x64.efi/iso9660_ia32.efi/udf_ia32.efi/iso9660_aa64.efi/udf_aa64.efi/ ==
This efi driver is from https://github.com/pbatard/efifs
Follow all the build instructions in this project. I modified 3 files (the original and modified source are at /home/Ventoy-master/EDK2/efiffs)
@ -185,6 +185,16 @@
make
aarch64-buildroot-linux-uclibc-strip --strip-all lunzip
4.17 == Build xzminidecaa64 ==
cd /home/Ventoy-master/Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace
make -f ventoy_makefileaa64
strip --strip-all xzminidec
4.18 == Build xzminidecm64e ==
cd /home/Ventoy-master/Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace
make -f ventoy_makefilem64e
strip --strip-all xzminidec
==========================================
@ -256,5 +266,11 @@
ISNTALL/ventoy/7z/64/7za.exe SHA-256: 8117e40ee7f824f63373a4f5625bb62749f69159d0c449b3ce2f35aad3b83549
ISNTALL/ventoy/7z/32/7za.exe SHA-256: ea308c76a2f927b160a143d94072b0dce232e04b751f0c6432a94e05164e716d
5.13 ./Ventoy/Unix/ventoy_unix/DragonFly/sbin/dmsetup
download from https://cdimage.debian.org/mirror/dragonflybsd.org/iso-images/dfly-x86_64-5.8.3_REL.iso.bz2
extract from the ISO file sbin/dmsetup
dmsetup SHA-256: bedcf26650e87edfe961e33bae20d832bce73efd4b6239f9a6a5785661e4e698
5.14 ./LiveCD/ISO/EFI/boot/vmlinuz64
download from http://www.tinycorelinux.net/11.x/x86_64/archive/11.0/distribution_files/vmlinuz64
vmlinuz64 SHA-256: 641077fc1f9914af244c248453005f56536ba9e7f54ba3e52402f26709ddb8a5

View File

@ -23,11 +23,25 @@
#include <grub/misc.h>
#include <grub/disk.h>
#include <grub/dl.h>
#include <grub/time.h>
#include <grub/types.h>
#include <grub/fshelp.h>
GRUB_MOD_LICENSE ("GPLv3+");
#define NSEC_PER_SEC ((grub_int64_t) 1000000000)
// GRUB 2.04 doesn't have safemath.h
// #include <grub/safemath.h>
// gcc < 5.1 doesn't support __builtin_add_overflow and __builtin_mul_overflow
// #define grub_add(a, b, res) __builtin_add_overflow(a, b, res)
// #define grub_mul(a, b, res) __builtin_mul_overflow(a, b, res)
// Warning: This is unsafe!
#define grub_add(a, b, res) ({ *(res) = (a) + (b); 0; })
#define grub_mul(a, b, res) ({ *(res) = (a) * (b); 0; })
#define XFS_INODE_EXTENTS 9
#define XFS_INODE_FORMAT_INO 1
@ -74,10 +88,22 @@ GRUB_MOD_LICENSE ("GPLv3+");
XFS_SB_VERSION2_PROJID32BIT | \
XFS_SB_VERSION2_FTYPE)
/* Inode flags2 flags */
#define XFS_DIFLAG2_BIGTIME_BIT 3
#define XFS_DIFLAG2_BIGTIME (1 << XFS_DIFLAG2_BIGTIME_BIT)
#define XFS_DIFLAG2_NREXT64_BIT 4
#define XFS_DIFLAG2_NREXT64 (1 << XFS_DIFLAG2_NREXT64_BIT)
/* incompat feature flags */
#define XFS_SB_FEAT_INCOMPAT_FTYPE (1 << 0) /* filetype in dirent */
#define XFS_SB_FEAT_INCOMPAT_SPINODES (1 << 1) /* sparse inode chunks */
#define XFS_SB_FEAT_INCOMPAT_META_UUID (1 << 2) /* metadata UUID */
#define XFS_SB_FEAT_INCOMPAT_BIGTIME (1 << 3) /* large timestamps */
#define XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR (1 << 4) /* needs xfs_repair */
#define XFS_SB_FEAT_INCOMPAT_NREXT64 (1 << 5) /* large extent counters */
#define XFS_SB_FEAT_INCOMPAT_EXCHRANGE (1 << 6) /* exchangerange supported */
#define XFS_SB_FEAT_INCOMPAT_PARENT (1 << 7) /* parent pointers */
#define XFS_SB_FEAT_INCOMPAT_METADIR (1 << 8) /* metadata dir tree */
/*
* Directory entries with ftype are explicitly handled by GRUB code.
@ -87,11 +113,26 @@ GRUB_MOD_LICENSE ("GPLv3+");
*
* We do not currently verify metadata UUID, so it is safe to read filesystems
* with the XFS_SB_FEAT_INCOMPAT_META_UUID feature.
*
* We do not currently replay the log, so it is safe to read filesystems
* with the XFS_SB_FEAT_INCOMPAT_EXCHRANGE feature.
*
* We do not currently read directory parent pointers, so it is safe to read
* filesystems with the XFS_SB_FEAT_INCOMPAT_PARENT feature.
*
* We do not currently look at realtime or quota metadata, so it is safe to
* read filesystems with the XFS_SB_FEAT_INCOMPAT_METADIR feature.
*/
#define XFS_SB_FEAT_INCOMPAT_SUPPORTED \
(XFS_SB_FEAT_INCOMPAT_FTYPE | \
XFS_SB_FEAT_INCOMPAT_SPINODES | \
XFS_SB_FEAT_INCOMPAT_META_UUID)
XFS_SB_FEAT_INCOMPAT_META_UUID | \
XFS_SB_FEAT_INCOMPAT_BIGTIME | \
XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR | \
XFS_SB_FEAT_INCOMPAT_NREXT64 | \
XFS_SB_FEAT_INCOMPAT_EXCHRANGE | \
XFS_SB_FEAT_INCOMPAT_PARENT | \
XFS_SB_FEAT_INCOMPAT_METADIR)
struct grub_xfs_sblock
{
@ -176,33 +217,49 @@ struct grub_xfs_btree_root
grub_uint64_t keys[1];
} GRUB_PACKED;
struct grub_xfs_time
struct grub_xfs_time_legacy
{
grub_uint32_t sec;
grub_uint32_t nanosec;
} GRUB_PACKED;
/*
* The struct grub_xfs_inode layout was taken from the
* struct xfs_dinode_core which is described here:
* https://mirrors.edge.kernel.org/pub/linux/utils/fs/xfs/docs/xfs_filesystem_structure.pdf
*/
struct grub_xfs_inode
{
grub_uint8_t magic[2];
grub_uint16_t mode;
grub_uint8_t version;
grub_uint8_t format;
grub_uint8_t unused2[26];
struct grub_xfs_time atime;
struct grub_xfs_time mtime;
struct grub_xfs_time ctime;
grub_uint8_t unused2[18];
grub_uint64_t nextents_big;
grub_uint64_t atime;
grub_uint64_t mtime;
grub_uint64_t ctime;
grub_uint64_t size;
grub_uint64_t nblocks;
grub_uint32_t extsize;
grub_uint32_t nextents;
grub_uint16_t unused3;
grub_uint8_t fork_offset;
grub_uint8_t unused4[17];
grub_uint8_t unused4[17]; /* Last member of inode v2. */
grub_uint8_t unused5[20]; /* First member of inode v3. */
grub_uint64_t flags2;
grub_uint8_t unused6[48]; /* Last member of inode v3. */
} GRUB_PACKED;
#define XFS_V2_INODE_SIZE sizeof(struct grub_xfs_inode)
#define XFS_V3_INODE_SIZE (XFS_V2_INODE_SIZE + 76)
#define XFS_V3_INODE_SIZE sizeof(struct grub_xfs_inode)
/* Size of struct grub_xfs_inode v2, up to unused4 member included. */
#define XFS_V2_INODE_SIZE (XFS_V3_INODE_SIZE - 76)
struct grub_xfs_dir_leaf_entry
{
grub_uint32_t hashval;
grub_uint32_t address;
} GRUB_PACKED;
struct grub_xfs_dirblock_tail
{
@ -220,6 +277,7 @@ struct grub_fshelp_node
struct grub_xfs_data
{
grub_size_t data_size;
struct grub_xfs_sblock sblock;
grub_disk_t disk;
int pos;
@ -232,8 +290,6 @@ struct grub_xfs_data
static grub_dl_t my_mod;
static int grub_xfs_sb_hascrc(struct grub_xfs_data *data)
{
return (data->sblock.version & grub_cpu_to_be16_compile_time(XFS_SB_VERSION_NUMBITS)) ==
@ -296,9 +352,21 @@ static int grub_xfs_sb_valid(struct grub_xfs_data *data)
}
return 1;
}
grub_error (GRUB_ERR_BAD_FS, "unsupported XFS filesystem version");
return 0;
}
static int
grub_xfs_sb_needs_repair (struct grub_xfs_data *data)
{
return ((data->sblock.version &
grub_cpu_to_be16_compile_time (XFS_SB_VERSION_NUMBITS)) ==
grub_cpu_to_be16_compile_time (XFS_SB_VERSION_5) &&
(data->sblock.sb_features_incompat &
grub_cpu_to_be32_compile_time (XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR)));
}
/* Filetype information as used in inodes. */
#define FILETYPE_INO_MASK 0170000
#define FILETYPE_INO_REG 0100000
@ -354,7 +422,6 @@ GRUB_XFS_EXTENT_SIZE (struct grub_xfs_extent *exts, int ex)
return (grub_be_to_cpu32 (exts[ex].raw[3]) & ((1 << 21) - 1));
}
static inline grub_uint64_t
grub_xfs_inode_block (struct grub_xfs_data *data,
grub_uint64_t ino)
@ -489,7 +556,7 @@ grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
grub_uint64_t block = grub_xfs_inode_block (data, ino);
int offset = grub_xfs_inode_offset (data, ino);
grub_dprintf("xfs", "Reading inode (%"PRIuGRUB_UINT64_T") - %"PRIuGRUB_UINT64_T", %d\n",
grub_dprintf("xfs", "Reading inode (%" PRIuGRUB_UINT64_T ") - %" PRIuGRUB_UINT64_T ", %d\n",
ino, block, offset);
/* Read the inode. */
if (grub_disk_read (data->disk, block, offset, grub_xfs_inode_size(data),
@ -509,11 +576,26 @@ get_fsb (const void *keys, int idx)
return grub_be_to_cpu64 (grub_get_unaligned64 (p));
}
static int
grub_xfs_inode_has_large_extent_counts (const struct grub_xfs_inode *inode)
{
return inode->version >= 3 &&
(inode->flags2 & grub_cpu_to_be64_compile_time (XFS_DIFLAG2_NREXT64));
}
static grub_uint64_t
grub_xfs_get_inode_nextents (struct grub_xfs_inode *inode)
{
return (grub_xfs_inode_has_large_extent_counts (inode)) ?
grub_be_to_cpu64 (inode->nextents_big) :
grub_be_to_cpu32 (inode->nextents);
}
static grub_disk_addr_t
grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
{
struct grub_xfs_btree_node *leaf = 0;
int ex, nrec;
grub_uint64_t ex, nrec;
struct grub_xfs_extent *exts;
grub_uint64_t ret = 0;
@ -538,7 +620,18 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
/ (2 * sizeof (grub_uint64_t));
do
{
int i;
grub_uint64_t i;
grub_addr_t keys_end, data_end;
if (grub_mul (sizeof (grub_uint64_t), nrec, &keys_end) ||
grub_add ((grub_addr_t) keys, keys_end, &keys_end) ||
grub_add ((grub_addr_t) node->data, node->data->data_size, &data_end) ||
keys_end > data_end)
{
grub_error (GRUB_ERR_BAD_FS, "invalid number of XFS root keys");
grub_free (leaf);
return 0;
}
for (i = 0; i < nrec; i++)
{
@ -556,7 +649,10 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
if (grub_disk_read (node->data->disk,
GRUB_XFS_FSB_TO_BLOCK (node->data, get_fsb (keys, i - 1 + recoffset)) << (node->data->sblock.log2_bsize - GRUB_DISK_SECTOR_BITS),
0, node->data->bsize, leaf))
return 0;
{
grub_free (leaf);
return 0;
}
if ((!node->data->hascrc &&
grub_strncmp ((char *) leaf->magic, "BMAP", 4)) ||
@ -579,8 +675,20 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
}
else if (node->inode.format == XFS_INODE_FORMAT_EXT)
{
nrec = grub_be_to_cpu32 (node->inode.nextents);
grub_addr_t exts_end = 0;
grub_addr_t data_end = 0;
nrec = grub_xfs_get_inode_nextents (&node->inode);
exts = (struct grub_xfs_extent *) grub_xfs_inode_data(&node->inode);
if (grub_mul (sizeof (struct grub_xfs_extent), nrec, &exts_end) ||
grub_add ((grub_addr_t) node->data, exts_end, &exts_end) ||
grub_add ((grub_addr_t) node->data, node->data->data_size, &data_end) ||
exts_end > data_end)
{
grub_error (GRUB_ERR_BAD_FS, "invalid number of XFS extents");
return 0;
}
}
else
{
@ -634,6 +742,7 @@ static char *
grub_xfs_read_symlink (grub_fshelp_node_t node)
{
grub_ssize_t size = grub_be_to_cpu64 (node->inode.size);
grub_size_t sz;
if (size < 0)
{
@ -655,7 +764,12 @@ grub_xfs_read_symlink (grub_fshelp_node_t node)
if (node->data->hascrc)
off = 56;
symlink = grub_malloc (size + 1);
if (grub_add (size, 1, &sz))
{
grub_error (GRUB_ERR_OUT_OF_RANGE, N_("symlink size overflow"));
return 0;
}
symlink = grub_malloc (sz);
if (!symlink)
return 0;
@ -705,8 +819,15 @@ static int iterate_dir_call_hook (grub_uint64_t ino, const char *filename,
{
struct grub_fshelp_node *fdiro;
grub_err_t err;
grub_size_t sz;
fdiro = grub_malloc (grub_xfs_fshelp_size(ctx->diro->data) + 1);
if (grub_add (grub_xfs_fshelp_size(ctx->diro->data), 1, &sz))
{
grub_error (GRUB_ERR_OUT_OF_RANGE, N_("directory data size overflow"));
grub_print_error ();
return 0;
}
fdiro = grub_malloc (sz);
if (!fdiro)
{
grub_print_error ();
@ -722,6 +843,7 @@ static int iterate_dir_call_hook (grub_uint64_t ino, const char *filename,
if (err)
{
grub_print_error ();
grub_free (fdiro);
return 0;
}
@ -764,12 +886,20 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
if (iterate_dir_call_hook (parent, "..", &ctx))
return 1;
for (i = 0; i < head->count; i++)
for (i = 0; i < head->count &&
(grub_uint8_t *) de < ((grub_uint8_t *) dir + grub_xfs_fshelp_size (dir->data)); i++)
{
grub_uint64_t ino;
grub_uint8_t *inopos = grub_xfs_inline_de_inopos(dir->data, de);
grub_uint8_t c;
if ((inopos + (smallino ? 4 : 8)) > (grub_uint8_t *) dir + grub_xfs_fshelp_size (dir->data))
{
grub_error (GRUB_ERR_BAD_FS, "invalid XFS inode");
return 0;
}
/* inopos might be unaligned. */
if (smallino)
ino = (((grub_uint32_t) inopos[0]) << 24)
@ -824,24 +954,49 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
{
struct grub_xfs_dir2_entry *direntry =
grub_xfs_first_de(dir->data, dirblock);
int entries;
struct grub_xfs_dirblock_tail *tail =
grub_xfs_dir_tail(dir->data, dirblock);
int entries = -1;
char *end = dirblock + dirblk_size;
grub_uint32_t magic;
numread = grub_xfs_read_file (dir, 0, 0,
blk << dirblk_log2,
dirblk_size, dirblock, 0);
if (numread != dirblk_size)
return 0;
{
grub_free (dirblock);
return 0;
}
entries = (grub_be_to_cpu32 (tail->leaf_count)
- grub_be_to_cpu32 (tail->leaf_stale));
if (!entries)
/*
* If this data block isn't actually part of the extent list then
* grub_xfs_read_file() returns a block of zeros. So, if the magic
* number field is all zeros then this block should be skipped.
*/
magic = *(grub_uint32_t *)(void *) dirblock;
if (!magic)
continue;
/*
* Leaf and tail information are only in the data block if the number
* of extents is 1.
*/
if (grub_xfs_get_inode_nextents (&dir->inode) == 1)
{
struct grub_xfs_dirblock_tail *tail = grub_xfs_dir_tail (dir->data, dirblock);
end = (char *) tail;
/* Subtract the space used by leaf nodes. */
end -= grub_be_to_cpu32 (tail->leaf_count) * sizeof (struct grub_xfs_dir_leaf_entry);
entries = grub_be_to_cpu32 (tail->leaf_count) - grub_be_to_cpu32 (tail->leaf_stale);
if (!entries)
continue;
}
/* Iterate over all entries within this block. */
while ((char *)direntry < (char *)tail)
while ((char *) direntry < (char *) end)
{
grub_uint8_t *freetag;
char *filename;
@ -861,22 +1016,34 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
}
filename = (char *)(direntry + 1);
if (filename + direntry->len + 1 > (char *) end)
{
grub_error (GRUB_ERR_BAD_FS, "invalid XFS directory entry");
return 0;
}
/* The byte after the filename is for the filetype, padding, or
tag, which is not used by GRUB. So it can be overwritten. */
filename[direntry->len] = '\0';
if (iterate_dir_call_hook (grub_be_to_cpu64(direntry->inode),
if (iterate_dir_call_hook (grub_be_to_cpu64(direntry->inode),
filename, &ctx))
{
grub_free (dirblock);
return 1;
}
/* Check if last direntry in this block is
reached. */
entries--;
if (!entries)
break;
/*
* The expected number of directory entries is only tracked for the
* single extent case.
*/
if (grub_xfs_get_inode_nextents (&dir->inode) == 1)
{
/* Check if last direntry in this block is reached. */
entries--;
if (!entries)
break;
}
/* Select the next directory entry. */
direntry = grub_xfs_next_de(dir->data, direntry);
@ -899,11 +1066,14 @@ static struct grub_xfs_data *
grub_xfs_mount (grub_disk_t disk)
{
struct grub_xfs_data *data = 0;
grub_size_t sz;
data = grub_zalloc (sizeof (struct grub_xfs_data));
if (!data)
return 0;
data->data_size = sizeof (struct grub_xfs_data);
grub_dprintf("xfs", "Reading sb\n");
/* Read the superblock. */
if (grub_disk_read (disk, 0, 0,
@ -913,14 +1083,19 @@ grub_xfs_mount (grub_disk_t disk)
if (!grub_xfs_sb_valid(data))
goto fail;
data = grub_realloc (data,
sizeof (struct grub_xfs_data)
- sizeof (struct grub_xfs_inode)
+ grub_xfs_inode_size(data) + 1);
if (grub_xfs_sb_needs_repair (data))
grub_dprintf ("xfs", "XFS filesystem needs repair, boot may fail\n");
if (grub_add (grub_xfs_inode_size (data),
sizeof (struct grub_xfs_data) - sizeof (struct grub_xfs_inode) + 1, &sz))
goto fail;
data = grub_realloc (data, sz);
if (! data)
goto fail;
data->data_size = sz;
data->diropen.data = data;
data->diropen.ino = grub_be_to_cpu64(data->sblock.rootino);
data->diropen.inode_read = 1;
@ -931,7 +1106,7 @@ grub_xfs_mount (grub_disk_t disk)
data->disk = disk;
data->pos = 0;
grub_dprintf("xfs", "Reading root ino %"PRIuGRUB_UINT64_T"\n",
grub_dprintf("xfs", "Reading root ino %" PRIuGRUB_UINT64_T "\n",
grub_cpu_to_be64(data->sblock.rootino));
grub_xfs_read_inode (data, data->diropen.ino, &data->diropen.inode);
@ -939,7 +1114,7 @@ grub_xfs_mount (grub_disk_t disk)
return data;
fail:
if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
if (grub_errno == GRUB_ERR_OUT_OF_RANGE || grub_errno == GRUB_ERR_NONE)
grub_error (GRUB_ERR_BAD_FS, "not an XFS filesystem");
grub_free (data);
@ -947,7 +1122,6 @@ grub_xfs_mount (grub_disk_t disk)
return 0;
}
/* Context for grub_xfs_dir. */
struct grub_xfs_dir_ctx
{
@ -955,6 +1129,27 @@ struct grub_xfs_dir_ctx
void *hook_data;
};
/* Bigtime inodes helpers. */
#define XFS_BIGTIME_EPOCH_OFFSET (-(grub_int64_t) GRUB_INT32_MIN)
static int grub_xfs_inode_has_bigtime (const struct grub_xfs_inode *inode)
{
return inode->version >= 3 &&
(inode->flags2 & grub_cpu_to_be64_compile_time (XFS_DIFLAG2_BIGTIME));
}
static grub_int64_t
grub_xfs_get_inode_time (struct grub_xfs_inode *inode)
{
struct grub_xfs_time_legacy *lts;
if (grub_xfs_inode_has_bigtime (inode))
return grub_divmod64 (grub_be_to_cpu64 (inode->mtime), NSEC_PER_SEC, NULL) - XFS_BIGTIME_EPOCH_OFFSET;
lts = (struct grub_xfs_time_legacy *) &inode->mtime;
return grub_be_to_cpu32 (lts->sec);
}
/* Helper for grub_xfs_dir. */
static int
grub_xfs_dir_iter (const char *filename, enum grub_fshelp_filetype filetype,
@ -967,7 +1162,7 @@ grub_xfs_dir_iter (const char *filename, enum grub_fshelp_filetype filetype,
if (node->inode_read)
{
info.mtimeset = 1;
info.mtime = grub_be_to_cpu32 (node->inode.mtime.sec);
info.mtime = grub_xfs_get_inode_time (&node->inode);
}
info.dir = ((filetype & GRUB_FSHELP_TYPE_MASK) == GRUB_FSHELP_DIR);
grub_free (node);
@ -1132,8 +1327,6 @@ grub_xfs_uuid (grub_device_t device, char **uuid)
return grub_errno;
}
static struct grub_fs grub_xfs_fs =
{
.name = "xfs",
@ -1152,6 +1345,7 @@ static struct grub_fs grub_xfs_fs =
GRUB_MOD_INIT(xfs)
{
//grub_xfs_fs.mod = mod;
grub_fs_register (&grub_xfs_fs);
my_mod = mod;
}

View File

@ -861,7 +861,8 @@ typedef struct vhd_footer_t
grub_uint8_t savedst; // Saved state
}vhd_footer_t;
#define VDI_IMAGE_FILE_INFO "<<< Oracle VM VirtualBox Disk Image >>>\n"
#define VDI_IMAGE_FILE_INFO "<<< Oracle VM VirtualBox Disk Image >>>\n"
#define VDI_IMAGE_FILE_INFO2 "<<< Oracle VirtualBox Disk Image >>>\n"
/** Image signature. */
#define VDI_IMAGE_SIGNATURE (0xbeda107f)

View File

@ -536,12 +536,25 @@ grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char *
{
grub_file_seek(file, 0);
grub_file_read(file, &vdihdr, sizeof(vdihdr));
if (vdihdr.u32Signature == VDI_IMAGE_SIGNATURE &&
grub_strncmp(vdihdr.szFileInfo, VDI_IMAGE_FILE_INFO, grub_strlen(VDI_IMAGE_FILE_INFO)) == 0)
if (vdihdr.u32Signature == VDI_IMAGE_SIGNATURE)
{
offset = 2 * 1048576;
g_img_trim_head_secnum = offset / 512;
grub_snprintf(type, sizeof(type), "vdi");
if (grub_strncmp(vdihdr.szFileInfo, VDI_IMAGE_FILE_INFO, grub_strlen(VDI_IMAGE_FILE_INFO)) == 0)
{
offset = 2 * 1048576;
g_img_trim_head_secnum = offset / 512;
debug("VDI V1\n");
}
else if (grub_strncmp(vdihdr.szFileInfo, VDI_IMAGE_FILE_INFO2, grub_strlen(VDI_IMAGE_FILE_INFO2)) == 0)
{
offset = 2 * 1048576;
g_img_trim_head_secnum = offset / 512;
debug("VDI V2\n");
}
else
{
debug("invalid file info <%s>\n", vdihdr.szFileInfo);
}
}
else
{
@ -568,7 +581,7 @@ grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char *
if (gpt->MBR.Byte55 != 0x55 || gpt->MBR.ByteAA != 0xAA)
{
grub_env_set(args[1], "unknown");
debug("invalid mbr signature: 0x%x 0x%x\n", gpt->MBR.Byte55, gpt->MBR.ByteAA);
debug("invalid mbr signature: 0x%x 0x%x offset=%d\n", gpt->MBR.Byte55, gpt->MBR.ByteAA, offset);
goto end;
}

View File

@ -0,0 +1,43 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
. /ventoy/hook/ventoy-hook-lib.sh
if is_ventoy_hook_finished; then
exit 0
fi
vtlog "####### $0 $* ########"
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
wait_for_usb_disk_ready
vtdiskname=$(get_ventoy_disk_name)
if [ "$vtdiskname" = "unknown" ]; then
vtlog "ventoy disk not found"
PATH=$VTPATH_OLD
exit 0
fi
ventoy_udev_disk_common_hook "${vtdiskname#/dev/}2"
PATH=$VTPATH_OLD
set_ventoy_hook_finish

View File

@ -0,0 +1,21 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
$SED "/Mount.*cdrom/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/devuan-disk.sh" -i /init

View File

@ -0,0 +1,25 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
. /ventoy/hook/ventoy-hook-lib.sh
vtlog "mount ventoy.iso"
mkdir -p /root/cdrom >>$VTLOG 2>&1
mount -t iso9660 $VTOY_PATH/mnt/fuse/ventoy.iso /root/cdrom >>$VTLOG 2>&1

View File

@ -0,0 +1,52 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
. /ventoy/hook/ventoy-hook-lib.sh
vtlog "####### $0 $* ########"
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
ventoy_run_fuse() {
vtlog "ventoy_run_fuse $*"
mkdir -p $VTOY_PATH/mnt/fuse $VTOY_PATH/mnt/iso
vtoydm -p -f $VTOY_PATH/ventoy_image_map -d $1 > $VTOY_PATH/ventoy_dm_table
vtoy_fuse_iso -f $VTOY_PATH/ventoy_dm_table -m $VTOY_PATH/mnt/fuse
mount -t iso9660 $VTOY_PATH/mnt/fuse/ventoy.iso $VTOY_PATH/mnt/iso
}
wait_for_usb_disk_ready
vtdiskname=$(get_ventoy_disk_name)
if [ "$vtdiskname" = "unknown" ]; then
vtlog "ventoy disk not found"
PATH=$VTPATH_OLD
exit 0
fi
ventoy_run_fuse $vtdiskname
if [ -f /ventoy/autoinstall ]; then
sh /ventoy/hook/default/auto_install_varexp.sh /ventoy/autoinstall
fi

View File

@ -0,0 +1,27 @@
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, longpanda <admin@ventoy.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
#************************************************************************************
if [ -e /init ] && $GREP -q '^mountroot$' /init; then
echo "Here before mountroot ..." >> $VTLOG
$SED "/^mountroot$/i\\$BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/truenas-disk.sh" -i /init
$SED "/^mountroot$/i\\export LIVEMEDIA=/dev/mapper/ventoy" -i /init
$SED "/^mountroot$/i\\export LIVE_MEDIA=/dev/mapper/ventoy" -i /init
$SED "/^mountroot$/i\\export FROMISO=$VTOY_PATH/mnt/fuse/ventoy.iso" -i /init
$SED "/exec *run-init/i\\$BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/truenas-bottom.sh" -i /init
fi

View File

@ -110,6 +110,14 @@ ventoy_get_debian_distro() {
echo 'pyabr'; return
fi
if [ -e /devuan-logo.txt ]; then
echo 'devuan'; return
fi
if $GREP -q 'truenas' /proc/version; then
echo 'truenas'; return
fi
echo 'default'
}

View File

@ -26,6 +26,12 @@ if [ -f $VTOY_PATH/autoinstall ]; then
fi
fi
if $GREP -q 'rdinit=/vtoy/vtoy' /proc/cmdline; then
echo "remove rdinit param" >> $VTLOG
echo "ptoptions=+rdinit" >> /linuxrc.config
fi
if $BUSYBOX_PATH/ls $VTOY_PATH | $GREP -q 'ventoy_dud[0-9]'; then
if [ -f /linuxrc.config ]; then
vtKerVer=$($BUSYBOX_PATH/uname -r)

View File

@ -45,8 +45,15 @@ fi
# TinyCore linux distro doesn't contain dmsetup, we use aoe here
sudo modprobe aoe aoe_iflist=lo
if [ -e /sys/module/aoe ]; then
VBLADE_BIN=$(ventoy_get_vblade_bin)
if ! [ -d /lib64 ]; then
vtlog "link lib64"
NEED_UNLIB64=1
ln -s /lib /lib64
fi
VBLADE_BIN=$(ventoy_get_vblade_bin)
sudo nohup $VBLADE_BIN -r -f $VTOY_PATH/ventoy_image_map 9 0 lo "$vtdiskname" > /dev/null &
sleep 2
@ -54,9 +61,14 @@ if [ -e /sys/module/aoe ]; then
vtlog 'Wait for /dev/etherd/e9.0 ....'
sleep 2
done
sudo cp -a /dev/etherd/e9.0 "$vPart"
if [ -n "$NEED_UNLIB64" ]; then
vtlog "unlink lib64"
unlink /lib64
fi
ventoy_find_bin_run rebuildfstab
else
vterr "aoe driver module load failed..."

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -33,6 +33,21 @@ function ventoy_debug_pause {
fi
}
function ventoy_max_resolution {
#Skip this for VirtualBox
smbios -t 1 -s 0x05 --set=system_product;
if vt_str_casebegin "$system_product" "VirtualBox"; then
return
fi
vt_enum_video_mode
vt_get_video_mode 0 vtCurMode
terminal_output console
set gfxmode=$vtCurMode
terminal_output gfxterm
}
function ventoy_cli_console {
if [ -z "$vtoy_display_mode" ]; then
terminal_output console
@ -405,6 +420,8 @@ function distro_specify_initrd_file_phase2 {
vt_linux_specify_initrd_file /live/initrd
elif [ -f (loop)/initramfs-linux.img ]; then
vt_linux_specify_initrd_file /initramfs-linux.img
elif [ -f (loop)/boot/isolinux/initrd.gz ]; then
vt_linux_specify_initrd_file /boot/isolinux/initrd.gz
fi
}
@ -516,6 +533,13 @@ function ventoy_freebsd_proc {
fi
fi
if [ "$vt_freebsd_ver" = "14.x" ]; then
if [ -e (loop)/boot/lua/brand-pfSense.lua ]; then
set vtFreeBsdDistro=pfSense
fi
fi
if [ -n "${vtdebug_flag}" ]; then
echo "This is $vtFreeBsdDistro $vt_freebsd_ver ${vt_freebsd_bit}bit"
fi
@ -622,7 +646,7 @@ function uefi_windows_menu_func {
if [ -n "$vtoy_chain_mem_addr" ]; then
ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
ventoy_cli_console
ventoy_max_resolution
chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi env_param=${env_param} isoefi=${LoadIsoEfiDriver} iso_${ventoy_fs_probe} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
boot
else
@ -664,7 +688,7 @@ function uefi_linux_menu_func {
if [ -d (loop)/pmagic ]; then
vt_linux_specify_initrd_file /pmagic/initrd.img
else
for file in "boot/grub/grub.cfg" "EFI/BOOT/grub.cfg" "EFI/boot/grub.cfg" "efi/boot/grub.cfg" "EFI/BOOT/BOOTX64.conf" "/grub/grub.cfg"; do
for file in "boot/grub/grub.cfg" "EFI/BOOT/grub.cfg" "EFI/boot/grub.cfg" "efi/boot/grub.cfg" "EFI/BOOT/BOOTX64.conf" "/grub/grub.cfg" "EFI/BOOT/grub/grub.cfg"; do
if [ -e (loop)/$file ]; then
vt_linux_parse_initrd_grub file (loop)/$file
fi
@ -2401,7 +2425,7 @@ function mimg_common_menuentry {
#############################################################
#############################################################
set VENTOY_VERSION="1.1.01"
set VENTOY_VERSION="1.1.05"
#ACPI not compatible with Window7/8, so disable by default
set VTOY_PARAM_NO_ACPI=1

View File

@ -626,6 +626,14 @@ else
vtoycli partresize -s $DISK $part2_start
fi
if [ "$PART1_TYPE" = "EE" ]; then
vtinfo "update esp partition attribute"
vtoycli gpt -f $DISK
sync
fi
echo ""
vtinfo "Update Ventoy on $DISK successfully finished."
echo ""

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -19,5 +19,34 @@
"condition": "equal",
"expression": "ukui",
"gui": "gtk3"
},
{
"type": "env",
"name": "DESKTOP_SESSION",
"condition": "equal",
"expression": "cinnamon",
"gui": "gtk3"
},
{
"type": "env",
"name": "DESKTOP_SESSION",
"condition": "equal",
"expression": "gnome",
"gui": "gtk3"
},
{
"type": "env",
"name": "DESKTOP_SESSION",
"condition": "equal",
"expression": "plasma",
"gui": "qt5"
},
{
"type": "env",
"name": "DESKTOP_SESSION",
"condition": "equal",
"expression": "xfce",
"gui": "gtk3"
}
]

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.

View File

@ -449,7 +449,6 @@ format_ventoy_disk_gpt() {
mkpart Ventoy ntfs $part1_start_sector $part1_end_sector \
mkpart VTOYEFI fat16 $part2_start_sector $part2_end_sector \
$vt_set_efi_type \
set 2 hidden on \
quit
sync

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

8
LZIP/buildlz4.txt Normal file
View File

@ -0,0 +1,8 @@
/opt/diet64/bin/diet -Os gcc -D_FILE_OFFSET_BITS=64 smallz4cat.c -o lz4cat64
aarch64-buildroot-linux-uclibc-gcc -Os -static -D_FILE_OFFSET_BITS=64 smallz4cat.c -o lz4cataa64
mips64el-linux-musl-gcc -mips64r2 -mabi=64 -static -Os -D_FILE_OFFSET_BITS=64 smallz4cat.c -o lz4catm64e

View File

@ -442,7 +442,7 @@ int ventoy_fill_gpt(uint64_t size, uint64_t reserve, int align4k, VTOY_GPT_INFO
ventoy_gen_preudo_uuid(&(Table[1].PartGuid));
Table[1].StartLBA = Table[0].LastLBA + 1;
Table[1].LastLBA = Table[1].StartLBA + VTOYEFI_PART_BYTES / 512 - 1;
Table[1].Attr = 0xC000000000000001ULL;
Table[1].Attr = 0x8000000000000000ULL;
ventoy_fill_gpt_partname(Table[1].Name, "VTOYEFI");
#if 0

View File

@ -727,6 +727,7 @@ static void * ventoy_update_thread(void *data)
MBR_HEAD MBR;
ventoy_disk *disk = NULL;
ventoy_thread_data *thread = (ventoy_thread_data *)data;
VTOY_GPT_INFO *pstGPT = NULL;
vdebug("ventoy_update_thread run ...\n");
@ -790,6 +791,36 @@ static void * ventoy_update_thread(void *data)
vlog("No need to update MBR\n");
}
if (disk->vtoydata.partition_style)
{
pstGPT = (VTOY_GPT_INFO *)malloc(sizeof(VTOY_GPT_INFO));
memset(pstGPT, 0, sizeof(VTOY_GPT_INFO));
offset = lseek(fd, 0, SEEK_SET);
len = read(fd, pstGPT, sizeof(VTOY_GPT_INFO));
vlog("Read GPT table offset:%llu len:%llu ...\n", (_ull)offset, (_ull)len);
if (pstGPT->PartTbl[1].Attr != 0x8000000000000000ULL)
{
vlog("Update EFI part attr from 0x%016llx to 0x%016llx\n",
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);
}
else
{
vlog("No need to update EFI part attr\n");
}
free(pstGPT);
}
g_current_progress = PT_SYNC_DATA1;
vlog("fsync data1...\n");

10
Unix/BuildUnixKmod.txt Normal file
View File

@ -0,0 +1,10 @@
ventoy_geom kernel mod is used to boot FreeBSD and other Unix distros.
This kernel mod need to build inside a FreeBSD system.
use VM to install a FreeBSD (e.g. 9.X/10.X/11.X/....), need to install source code.
copy these files for example: Unix/ventoy_unix_src/FreeBSD/geom_ventoy_src/10.x/sys to /sys directory.
cd /sys/modules/geom/geom_ventoy/
make
make install
Other distros are similar.

View File

@ -2520,7 +2520,7 @@ int PartitionResizeForVentoy(PHY_DRIVE_INFO *pPhyDrive)
pGPT->PartTbl[1].StartLBA = pGPT->PartTbl[0].LastLBA + 1;
pGPT->PartTbl[1].LastLBA = pGPT->PartTbl[1].StartLBA + VENTOY_EFI_PART_SIZE / 512 - 1;
pGPT->PartTbl[1].Attr = 0xC000000000000001ULL;
pGPT->PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
memcpy(pGPT->PartTbl[1].Name, L"VTOYEFI", 7 * 2);
//Update CRC
@ -2797,6 +2797,7 @@ int UpdateVentoy2PhyDrive(PHY_DRIVE_INFO *pPhyDrive, int TryId)
BOOL CleanDisk = FALSE;
BOOL DelEFI = FALSE;
BOOL bWriteBack = TRUE;
BOOL bUpdateEFIAttr = FALSE;
HANDLE hVolume;
HANDLE hDrive;
DWORD Status;
@ -2904,7 +2905,13 @@ int UpdateVentoy2PhyDrive(PHY_DRIVE_INFO *pPhyDrive, int TryId)
if (pPhyDrive->PartStyle == 1)
{
Log("TryId=%d EFI GPT partition type is 0x%llx", TryId, pPhyDrive->Part2GPTAttr);
PROGRESS_BAR_SET_POS(PT_DEL_ALL_PART);
PROGRESS_BAR_SET_POS(PT_DEL_ALL_PART);
if (pGptInfo->PartTbl[1].Attr != VENTOY_EFI_PART_ATTR)
{
bUpdateEFIAttr = TRUE;
}
if (TryId == 1)
{
@ -2917,8 +2924,8 @@ int UpdateVentoy2PhyDrive(PHY_DRIVE_INFO *pPhyDrive, int TryId)
}
else if (TryId == 2)
{
Log("Change GPT partition attribute");
if (DISK_ChangeVtoyEFIAttr(pPhyDrive->PhyDrive, StartSector * 512ULL, 0x8000000000000001))
Log("Try2 Change GPT partition attribute to 0x%016llx", VENTOY_EFI_PART_ATTR & 0xFFFFFFFFFFFFFFFEULL);
if (DISK_ChangeVtoyEFIAttr(pPhyDrive->PhyDrive, StartSector * 512ULL, VENTOY_EFI_PART_ATTR & 0xFFFFFFFFFFFFFFFEULL))
{
ChangeAttr = TRUE;
Sleep(2000);
@ -3253,15 +3260,16 @@ End:
DISK_ChangeVtoyEFI2Basic(pPhyDrive->PhyDrive, StartSector * 512);
}
if (pPhyDrive->PartStyle == 1)
{
if (ChangeAttr || ((pPhyDrive->Part2GPTAttr >> 56) != 0xC0))
if (ChangeAttr || bUpdateEFIAttr)
{
Log("Change EFI partition attr %u <0x%llx> to <0x%llx>", ChangeAttr, pPhyDrive->Part2GPTAttr, 0xC000000000000001ULL);
if (DISK_ChangeVtoyEFIAttr(pPhyDrive->PhyDrive, StartSector * 512ULL, 0xC000000000000001ULL))
Log("Change EFI partition attr %u <0x%llx> to <0x%llx>", ChangeAttr, pGptInfo->PartTbl[1].Attr, VENTOY_EFI_PART_ATTR);
if (DISK_ChangeVtoyEFIAttr(pPhyDrive->PhyDrive, StartSector * 512ULL, VENTOY_EFI_PART_ATTR))
{
Log("Change EFI partition attr success");
pPhyDrive->Part2GPTAttr = 0xC000000000000001ULL;
pPhyDrive->Part2GPTAttr = VENTOY_EFI_PART_ATTR;
}
else
{

View File

@ -982,7 +982,7 @@ int VentoyFillGpt(UINT64 DiskSizeBytes, VTOY_GPT_INFO *pInfo)
CoCreateGuid(&(Table[1].PartGuid));
Table[1].StartLBA = Table[0].LastLBA + 1;
Table[1].LastLBA = Table[1].StartLBA + VENTOY_EFI_PART_SIZE / 512 - 1;
Table[1].Attr = 0xC000000000000001ULL;
Table[1].Attr = VENTOY_EFI_PART_ATTR;
memcpy(Table[1].Name, L"VTOYEFI", 7 * 2);
#if 0

View File

@ -34,6 +34,9 @@ typedef enum VTOY_FS
#define FAT32_MAX_LIMIT (32 * 1073741824ULL)
#define VENTOY_EFI_PART_ATTR 0x8000000000000000ULL
#define SIZE_1KB (1024)
#define SIZE_1GB (1024 * 1024 * 1024)
#define SIZE_1TB (1024ULL * 1024ULL * 1024ULL * 1024ULL)

View File

@ -599,7 +599,7 @@ static int update_part_table(char *disk, UINT64 part2start)
PartTbl[1].StartLBA = PartTbl[0].LastLBA + 1;
PartTbl[1].LastLBA = PartTbl[1].StartLBA + VENTOY_EFI_PART_SIZE / 512 - 1;
PartTbl[1].Attr = 0xC000000000000001ULL;
PartTbl[1].Attr = VENTOY_EFI_PART_ATTR;
PartTbl[1].Name[0] = 'V';
PartTbl[1].Name[1] = 'T';
PartTbl[1].Name[2] = 'O';

View File

@ -21,7 +21,7 @@
#ifndef __VTOYCLI_H__
#define __VTOYCLI_H__
#define VENTOY_EFI_PART_ATTR 0xC000000000000001ULL
#define VENTOY_EFI_PART_ATTR 0x8000000000000000ULL
#define SIZE_1MB (1024 * 1024)
#define VENTOY_EFI_PART_SIZE (32 * SIZE_1MB)

View File

@ -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);
}
}
}

View File

@ -244,7 +244,7 @@ int DumpGptInfo(VTOY_GPT_INFO *pGptInfo)
return 0;
}
#define VENTOY_EFI_PART_ATTR 0xC000000000000001ULL
#define VENTOY_EFI_PART_ATTR 0x8000000000000000ULL
int main(int argc, const char **argv)
{
@ -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);
}
}
}