mirror of https://github.com/ventoy/Ventoy.git
1.0.51 release
This commit is contained in:
parent
c5af17e04e
commit
d71514f23e
|
@ -21,7 +21,7 @@ body:
|
|||
attributes:
|
||||
label: Ventoy Version
|
||||
description: What version of ventoy are you running?
|
||||
placeholder: 1.0.49
|
||||
placeholder: 1.0.51
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
|
|
@ -279,6 +279,13 @@ static int ventoy_boot_opt_filter(char *opt)
|
|||
opt[1] = 't';
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (grub_strncmp(opt, "dm=", 3) == 0)
|
||||
{
|
||||
opt[0] = 'D';
|
||||
opt[1] = 'M';
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ventoy_debug)
|
||||
{
|
||||
|
|
|
@ -506,6 +506,13 @@ static int ventoy_boot_opt_filter(char *opt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (grub_strncmp(opt, "dm=", 3) == 0)
|
||||
{
|
||||
opt[0] = 'D';
|
||||
opt[1] = 'M';
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ventoy_debug)
|
||||
{
|
||||
if (grub_strcmp(opt, "quiet") == 0)
|
||||
|
|
|
@ -228,6 +228,13 @@ static int ventoy_boot_opt_filter(char *opt)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (grub_strncmp(opt, "dm=", 3) == 0)
|
||||
{
|
||||
opt[0] = 'D';
|
||||
opt[1] = 'M';
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ventoy_debug)
|
||||
{
|
||||
if (grub_strcmp(opt, "quiet") == 0)
|
||||
|
|
|
@ -562,6 +562,31 @@ ventoy_create_dev_ventoy_part() {
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
ventoy_create_chromeos_ventoy_part() {
|
||||
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | $GREP ventoy | $SED 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||
$BUSYBOX_PATH/mknod -m 0666 /dev/ventoy b $blkdev_num
|
||||
|
||||
if [ -e /vtoy_dm_table ]; then
|
||||
vtPartid=1
|
||||
|
||||
$CAT /vtoy_dm_table | while read vtline; do
|
||||
echo $vtline > /ventoy/dm_table_part${vtPartid}
|
||||
|
||||
if [ $vtPartid -eq $1 ]; then
|
||||
$VTOY_PATH/tool/dmsetup create ventoy${vtPartid} /ventoy/dm_table_part${vtPartid} --readonly
|
||||
else
|
||||
$VTOY_PATH/tool/dmsetup create ventoy${vtPartid} /ventoy/dm_table_part${vtPartid}
|
||||
fi
|
||||
|
||||
blkdev_num=$($VTOY_PATH/tool/dmsetup ls | $GREP ventoy${vtPartid} | $SED 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
|
||||
$BUSYBOX_PATH/mknod -m 0666 /dev/ventoy${vtPartid} b $blkdev_num
|
||||
|
||||
vtPartid=$(expr $vtPartid + 1)
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
is_inotify_ventoy_part() {
|
||||
if echo $1 | $GREP -q "2$"; then
|
||||
if ! [ -e /sys/block/$1 ]; then
|
||||
|
|
|
@ -58,38 +58,70 @@ blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\
|
|||
vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||
echo -n $vtDM > /ventoy/vtDM
|
||||
|
||||
ventoy_create_dev_ventoy_part
|
||||
ventoy_create_chromeos_ventoy_part 3
|
||||
mdev -s
|
||||
|
||||
vtlog "copy out the e2fsck program ..."
|
||||
|
||||
copy_lib() {
|
||||
cp -a /ventoy_rdroot/usr/lib64/$1 /usr/lib64/
|
||||
cp -a /ventoy_rdroot/lib64/$1 /lib64/
|
||||
}
|
||||
|
||||
mkdir /ventoy_rdroot
|
||||
mkdir -p /lib /lib64 /usr/lib64 /sbin
|
||||
|
||||
mount -o ro /dev/ventoy3 /ventoy_rdroot >>$VTLOG 2>&1
|
||||
cp -a /ventoy_rdroot/sbin/e2fsck /sbin/
|
||||
cp -a /ventoy_rdroot/usr/lib64/libext2fs* /usr/lib64/
|
||||
cp -a /ventoy_rdroot/usr/lib64/libcom_err* /usr/lib64/
|
||||
cp -a /ventoy_rdroot/usr/lib64/libe2p* /usr/lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libblk* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libuuid* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libdl.* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libdl-* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libc.* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libc-* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libpthread* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/ld-* /lib64/
|
||||
cp -a /ventoy_rdroot/sbin/dmsetup /sbin/
|
||||
|
||||
copy_lib libext2fs*
|
||||
copy_lib libcom_err*
|
||||
copy_lib libe2p*
|
||||
copy_lib libblk*
|
||||
copy_lib libuuid*
|
||||
copy_lib libdl.*
|
||||
copy_lib libdl-*
|
||||
copy_lib libc.*
|
||||
copy_lib libc-*
|
||||
copy_lib libpthread*
|
||||
copy_lib ld-*
|
||||
copy_lib libdevmapper*
|
||||
copy_lib libudev*
|
||||
copy_lib libm.*
|
||||
copy_lib libm-*
|
||||
copy_lib librt*
|
||||
copy_lib libpopt*
|
||||
copy_lib libgpg-error*
|
||||
copy_lib libselinux*
|
||||
copy_lib libsepol*
|
||||
copy_lib libpcre*
|
||||
copy_lib libcap*
|
||||
copy_lib libdw*
|
||||
copy_lib libgcc_s*
|
||||
copy_lib libattr*
|
||||
copy_lib libelf*
|
||||
copy_lib libz.*
|
||||
copy_lib libbz2*
|
||||
copy_lib libgcrypt*
|
||||
copy_lib liblvm*
|
||||
|
||||
ln -s /lib64/libdevmapper.so.1.02 /lib64/libdevmapper.so.1.02.1
|
||||
|
||||
umount /ventoy_rdroot
|
||||
|
||||
vtlog "========================================="
|
||||
vtlog "===== e2fsck -y -v /dev/ventoy1 ====="
|
||||
e2fsck -y -v /dev/ventoy1 >>$VTLOG 2>&1
|
||||
vtlog "===== e2fsck -y -v /dev/ventoy3 ====="
|
||||
e2fsck -y -v /dev/ventoy3 >>$VTLOG 2>&1
|
||||
#vtlog "===== e2fsck -y -v /dev/ventoy3 ====="
|
||||
#e2fsck -y -v /dev/ventoy3 >>$VTLOG 2>&1
|
||||
vtlog "===== e2fsck -y -v /dev/ventoy8 ====="
|
||||
e2fsck -y -v /dev/ventoy8 >>$VTLOG 2>&1
|
||||
vtlog "========================================="
|
||||
|
||||
/sbin/dmsetup --version >>$VTLOG 2>&1
|
||||
veritysetup --version >>$VTLOG 2>&1
|
||||
|
||||
vtlog "proc devtmpfs ..."
|
||||
mkdir /newdev
|
||||
mount -t devtmpfs dev /newdev
|
||||
|
@ -125,10 +157,45 @@ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
|
|||
fi
|
||||
done
|
||||
|
||||
|
||||
# if grep -q 'DM=' /proc/cmdline; then
|
||||
# vtlog "Boot verified image ..."
|
||||
|
||||
# dmP1=$(sed "s/.*\(0 [0-9]* verity\).*/\1/" /proc/cmdline)
|
||||
# alg=$(sed "s/.*alg=\([^ ]*\).*/\1/" /proc/cmdline)
|
||||
# hexdigest=$(sed "s/.*root_hexdigest=\([0-9a-fA-F][0-9a-fA-F]*\).*/\1/" /proc/cmdline)
|
||||
# salt=$(sed "s/.*salt=\([0-9a-fA-F][0-9a-fA-F]*\).*/\1/" /proc/cmdline)
|
||||
# hashstart=$(sed "s/.*hashstart=\([0-9][0-9]*\).*/\1/" /proc/cmdline)
|
||||
|
||||
#512 to 4096
|
||||
# blocknum=$(expr $hashstart / 8)
|
||||
# hashoffset=$(expr $hashstart \* 512)
|
||||
|
||||
# vtlog "veritysetup create vroot $vt_root_dev $vt_root_dev $hexdigest --data-block-size=4096 --hash-block-size=4096 --data-blocks=$blocknum --hash-offset=$hashoffset --salt=$salt --hash=$alg --no-superblock --format=0"
|
||||
# veritysetup create vroot $vt_root_dev $vt_root_dev $hexdigest --data-block-size=4096 --hash-block-size=4096 --data-blocks=$blocknum --hash-offset=$hashoffset --salt=$salt --hash=$alg --no-superblock --format=0
|
||||
# sleep 1
|
||||
# mdev -s
|
||||
|
||||
# blkdev_num=$(dmsetup ls | grep vroot | sed 's/.*(\([0-9][0-9]*\),[^0-9]*\([0-9][0-9]*\).*/\1:\2/')
|
||||
# vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||
# vtlog "blkdev_num=$blkdev_num vtDM=$vtDM"
|
||||
|
||||
# if [ -b /dev/$vtDM ]; then
|
||||
# veritysetup status vroot >> $VTLOG 2>&1
|
||||
# mount -o ro /dev/$vtDM /ventoy_rdroot
|
||||
# else
|
||||
# mount -o ro $vt_root_dev /ventoy_rdroot
|
||||
# fi
|
||||
# else
|
||||
# vtlog "Boot normal image ..."
|
||||
# mount -o ro $vt_root_dev /ventoy_rdroot
|
||||
# fi
|
||||
|
||||
vtlog "Boot normal image ..."
|
||||
mount -o ro $vt_root_dev /ventoy_rdroot
|
||||
|
||||
cp -a $VTLOG /newdev/ventoy.log
|
||||
umount /newdev
|
||||
|
||||
mount -o ro $vt_root_dev /ventoy_rdroot
|
||||
mount -t devtmpfs dev /ventoy_rdroot/dev
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
|
|
@ -58,38 +58,70 @@ blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\
|
|||
vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||
echo -n $vtDM > /ventoy/vtDM
|
||||
|
||||
ventoy_create_dev_ventoy_part
|
||||
ventoy_create_chromeos_ventoy_part 3
|
||||
mdev -s
|
||||
|
||||
vtlog "copy out the e2fsck program ..."
|
||||
|
||||
copy_lib() {
|
||||
cp -a /ventoy_rdroot/usr/lib64/$1 /usr/lib64/
|
||||
cp -a /ventoy_rdroot/lib64/$1 /lib64/
|
||||
}
|
||||
|
||||
mkdir /ventoy_rdroot
|
||||
mkdir -p /lib /lib64 /usr/lib64 /sbin
|
||||
|
||||
mount -o ro /dev/ventoy3 /ventoy_rdroot >>$VTLOG 2>&1
|
||||
cp -a /ventoy_rdroot/sbin/e2fsck /sbin/
|
||||
cp -a /ventoy_rdroot/usr/lib64/libext2fs* /usr/lib64/
|
||||
cp -a /ventoy_rdroot/usr/lib64/libcom_err* /usr/lib64/
|
||||
cp -a /ventoy_rdroot/usr/lib64/libe2p* /usr/lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libblk* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libuuid* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libdl.* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libdl-* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libc.* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libc-* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/libpthread* /lib64/
|
||||
cp -a /ventoy_rdroot/lib64/ld-* /lib64/
|
||||
cp -a /ventoy_rdroot/sbin/dmsetup /sbin/
|
||||
|
||||
copy_lib libext2fs*
|
||||
copy_lib libcom_err*
|
||||
copy_lib libe2p*
|
||||
copy_lib libblk*
|
||||
copy_lib libuuid*
|
||||
copy_lib libdl.*
|
||||
copy_lib libdl-*
|
||||
copy_lib libc.*
|
||||
copy_lib libc-*
|
||||
copy_lib libpthread*
|
||||
copy_lib ld-*
|
||||
copy_lib libdevmapper*
|
||||
copy_lib libudev*
|
||||
copy_lib libm.*
|
||||
copy_lib libm-*
|
||||
copy_lib librt*
|
||||
copy_lib libpopt*
|
||||
copy_lib libgpg-error*
|
||||
copy_lib libselinux*
|
||||
copy_lib libsepol*
|
||||
copy_lib libpcre*
|
||||
copy_lib libcap*
|
||||
copy_lib libdw*
|
||||
copy_lib libgcc_s*
|
||||
copy_lib libattr*
|
||||
copy_lib libelf*
|
||||
copy_lib libz.*
|
||||
copy_lib libbz2*
|
||||
copy_lib libgcrypt*
|
||||
copy_lib liblvm*
|
||||
|
||||
ln -s /lib64/libdevmapper.so.1.02 /lib64/libdevmapper.so.1.02.1
|
||||
|
||||
umount /ventoy_rdroot
|
||||
|
||||
vtlog "========================================="
|
||||
vtlog "===== e2fsck -y -v /dev/ventoy1 ====="
|
||||
e2fsck -y -v /dev/ventoy1 >>$VTLOG 2>&1
|
||||
vtlog "===== e2fsck -y -v /dev/ventoy3 ====="
|
||||
e2fsck -y -v /dev/ventoy3 >>$VTLOG 2>&1
|
||||
#vtlog "===== e2fsck -y -v /dev/ventoy3 ====="
|
||||
#e2fsck -y -v /dev/ventoy3 >>$VTLOG 2>&1
|
||||
vtlog "===== e2fsck -y -v /dev/ventoy8 ====="
|
||||
e2fsck -y -v /dev/ventoy8 >>$VTLOG 2>&1
|
||||
vtlog "========================================="
|
||||
|
||||
/sbin/dmsetup --version >>$VTLOG 2>&1
|
||||
veritysetup --version >>$VTLOG 2>&1
|
||||
|
||||
vtlog "proc devtmpfs ..."
|
||||
mkdir /newdev
|
||||
mount -t devtmpfs dev /newdev
|
||||
|
@ -125,10 +157,45 @@ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
|
|||
fi
|
||||
done
|
||||
|
||||
|
||||
# if grep -q 'DM=' /proc/cmdline; then
|
||||
# vtlog "Boot verified image ..."
|
||||
|
||||
# dmP1=$(sed "s/.*\(0 [0-9]* verity\).*/\1/" /proc/cmdline)
|
||||
# alg=$(sed "s/.*alg=\([^ ]*\).*/\1/" /proc/cmdline)
|
||||
# hexdigest=$(sed "s/.*root_hexdigest=\([0-9a-fA-F][0-9a-fA-F]*\).*/\1/" /proc/cmdline)
|
||||
# salt=$(sed "s/.*salt=\([0-9a-fA-F][0-9a-fA-F]*\).*/\1/" /proc/cmdline)
|
||||
# hashstart=$(sed "s/.*hashstart=\([0-9][0-9]*\).*/\1/" /proc/cmdline)
|
||||
|
||||
#512 to 4096
|
||||
# blocknum=$(expr $hashstart / 8)
|
||||
# hashoffset=$(expr $hashstart \* 512)
|
||||
|
||||
# vtlog "veritysetup create vroot $vt_root_dev $vt_root_dev $hexdigest --data-block-size=4096 --hash-block-size=4096 --data-blocks=$blocknum --hash-offset=$hashoffset --salt=$salt --hash=$alg --no-superblock --format=0"
|
||||
# veritysetup create vroot $vt_root_dev $vt_root_dev $hexdigest --data-block-size=4096 --hash-block-size=4096 --data-blocks=$blocknum --hash-offset=$hashoffset --salt=$salt --hash=$alg --no-superblock --format=0
|
||||
# sleep 1
|
||||
# mdev -s
|
||||
|
||||
# blkdev_num=$(dmsetup ls | grep vroot | sed 's/.*(\([0-9][0-9]*\),[^0-9]*\([0-9][0-9]*\).*/\1:\2/')
|
||||
# vtDM=$(ventoy_find_dm_id ${blkdev_num})
|
||||
# vtlog "blkdev_num=$blkdev_num vtDM=$vtDM"
|
||||
|
||||
# if [ -b /dev/$vtDM ]; then
|
||||
# veritysetup status vroot >> $VTLOG 2>&1
|
||||
# mount -o ro /dev/$vtDM /ventoy_rdroot
|
||||
# else
|
||||
# mount -o ro $vt_root_dev /ventoy_rdroot
|
||||
# fi
|
||||
# else
|
||||
# vtlog "Boot normal image ..."
|
||||
# mount -o ro $vt_root_dev /ventoy_rdroot
|
||||
# fi
|
||||
|
||||
vtlog "Boot normal image ..."
|
||||
mount -o ro $vt_root_dev /ventoy_rdroot
|
||||
|
||||
cp -a $VTLOG /newdev/ventoy.log
|
||||
umount /newdev
|
||||
|
||||
mount -o ro $vt_root_dev /ventoy_rdroot
|
||||
mount -t devtmpfs dev /ventoy_rdroot/dev
|
||||
|
||||
PATH=$VTPATH_OLD
|
||||
|
|
|
@ -81,6 +81,13 @@ else
|
|||
echo "use unsquashfs_32" >>$VTLOG
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/unsquashfs_32 $VTOY_PATH/tool/vtoy_unsquashfs
|
||||
fi
|
||||
|
||||
|
||||
if $GREP -q 64 $VTOY_PATH/ventoy_arch; then
|
||||
echo "use veritysetup64" >>$VTLOG
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/veritysetup64 $VTOY_PATH/tool/veritysetup
|
||||
else
|
||||
echo "use veritysetup32" >>$VTLOG
|
||||
$BUSYBOX_PATH/cp -a $VTOY_PATH/tool/veritysetup32 $VTOY_PATH/tool/veritysetup
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -1501,8 +1501,7 @@ function vtoy_unsupport_menuentry {
|
|||
|
||||
function only_uefi_tip {
|
||||
echo -e "\n This IMG file is only supported in UEFI mode. \n"
|
||||
echo -e " 此 IMG 文件只支持在 UEFI 模式下启动。\n"
|
||||
echo -e "\npress ENTER to exit (请按 回车 键返回) ..."
|
||||
echo -e "\n press ENTER to exit ..."
|
||||
read vtInputKey
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ You can copy many image files at a time and ventoy will give you a boot menu to
|
|||
x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI, ARM64 UEFI and MIPS64EL UEFI are supported in the same way.<br/>
|
||||
Both MBR and GPT partition style are supported in the same way.<br/>
|
||||
Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...) <br/>
|
||||
720+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported. <br/>
|
||||
730+ ISO files are tested (<a href="https://www.ventoy.net/en/isolist.html">List</a>). 90%+ distros in <a href="https://distrowatch.com/">distrowatch.com</a> supported. <br/>
|
||||
<br/>Official Website: <a href=https://www.ventoy.net>https://www.ventoy.net</a>
|
||||
</h4>
|
||||
|
||||
|
@ -36,7 +36,7 @@ Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...) <br/>
|
|||
* FAT32/exFAT/NTFS/UDF/XFS/Ext2(3)(4) supported for main partition
|
||||
* ISO files larger than 4GB supported
|
||||
* Native boot menu style for Legacy & UEFI
|
||||
* Most type of OS supported, 720+ iso files tested
|
||||
* Most type of OS supported, 730+ iso files tested
|
||||
* Linux vDisk boot supported
|
||||
* Not only boot but also complete installation process
|
||||
* Menu dynamically switchable between List/TreeView mode
|
||||
|
|
Loading…
Reference in New Issue