X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/9ecbff9ce6736a73cb020fe4860bd2d47f3ec968..48a1b80be0258bedbb558bd009f4f143d87af47d:/INSTALL/tool/ventoy_lib.sh diff --git a/INSTALL/tool/ventoy_lib.sh b/INSTALL/tool/ventoy_lib.sh index 9e4d45d..78d93e9 100644 --- a/INSTALL/tool/ventoy_lib.sh +++ b/INSTALL/tool/ventoy_lib.sh @@ -129,13 +129,13 @@ is_disk_contains_ventoy() { PART1_TYPE=$(dd if=$DISK bs=1 count=1 skip=450 status=none | ./tool/hexdump -n1 -e '1/1 "%02X"') PART2_TYPE=$(dd if=$DISK bs=1 count=1 skip=466 status=none | ./tool/hexdump -n1 -e '1/1 "%02X"') - if [ "$PART1_TYPE" != "EE" ]; then - if [ "$PART2_TYPE" != "EF" ]; then - vtdebug "part2 type is $PART2_TYPE not EF" - ventoy_false - return - fi - fi + # if [ "$PART1_TYPE" != "EE" ]; then + # if [ "$PART2_TYPE" != "EF" ]; then + # vtdebug "part2 type is $PART2_TYPE not EF" + # ventoy_false + # return + # fi + # fi # PART1_TYPE=$(dd if=$DISK bs=1 count=1 skip=450 status=none | ./tool/hexdump -n1 -e '1/1 "%02X"') # if [ "$PART1_TYPE" != "07" ]; then @@ -345,11 +345,19 @@ format_ventoy_disk_gpt() { unit s \ mkpart Ventoy ntfs $part1_start_sector $part1_end_sector \ mkpart VTOYEFI fat16 $part2_start_sector $part2_end_sector \ - set 2 boot on \ - set 2 esp on \ + set 2 msftdata on \ set 2 hidden on \ quit + + sync + + if ventoy_is_linux64; then + vtoygpt=./tool/vtoygpt_64 + else + vtoygpt=./tool/vtoygpt_32 + fi + $vtoygpt -f $DISK sync udevadm trigger >/dev/null 2>&1