1.0.45 release

This commit is contained in:
longpanda
2021-05-29 19:42:16 +08:00
parent c42a8c6d93
commit ac3ab97686
13 changed files with 304 additions and 13 deletions

View File

@@ -0,0 +1,97 @@
#!/bin/sh
print_usage() {
echo 'Usage: ExtendPersistentImg.sh file size'
echo ' file persistent dat file'
echo ' size extend size in MB'
echo 'Example:'
echo ' sh ExtendPersistentImg.sh ubuntu.dat 2048'
echo ''
}
if [ -z "$1" -o "$1" = "-h" ]; then
print_usage
exit 1
fi
if [ -z "$2" ]; then
print_usage
exit 1
fi
file=$1
size=$2
if [ ! -f "$file" ]; then
echo "$file not exist."
exit 1
fi
if echo $size | grep -q "[^0-9]"; then
print_usage
exit 1
fi
fsize=$(stat -c '%s' $file)
fsmod=$(expr $fsize % 1024)
if [ $fsmod -ne 0 ]; then
echo "File size of $file is not aligned by 1MB, please check."
exit 1
fi
fsMB=$(expr $fsize / 1024 / 1024)
total=$(expr $fsMB + $size)
magic=$(hexdump -n3 -e '3/1 "%02X"' $file)
if [ "$magic" = "584653" ]; then
if which xfs_growfs >/dev/null 2>&1; then
cmd=xfs_growfs
else
echo 'xfs_growfs not found, please install xfsprogs first'
exit 1
fi
else
if which resize2fs >/dev/null 2>&1; then
cmd=resize2fs
else
echo 'resize2fs not found, please install e2fsprogs first'
exit 1
fi
fi
echo "Extend dat file... (current is ${fsMB}MB, append ${size}MB, total ${total}MB)"
dd if=/dev/zero bs=1M count=$size status=none >> "$file"
sync
freeloop=$(losetup -f)
losetup $freeloop "$file"
if [ "$cmd" = "resize2fs" ]; then
echo "Extend ext filesystem by resize2fs ..."
echo "resize2fs $freeloop ${total}M"
e2fsck -f $freeloop
resize2fs $freeloop ${total}M
ret=$?
else
echo "Extend xfs filesystem by xfs_growfs ..."
tmpdir=$(mktemp -d)
mount $freeloop $tmpdir
xfs_growfs $freeloop
ret=$?
umount $tmpdir && rm -rf $tmpdir
fi
losetup -d $freeloop
echo ""
if [ $ret -eq 0 ]; then
echo "======= SUCCESS ========="
else
echo "======= FAILED ========="
fi
echo ""

View File

@@ -38,5 +38,12 @@ Please refer https://www.ventoy.net/en/plugin_persistence.html for details.
========== ExtendPersistentImg.sh ===============
sudo sh ExtendPersistentImg.sh file size
For example:
sh ExtendPersistentImg.sh persistence.dat 2048 ----> Extend persistence.dat by 2048MB
That is to say, persistence.dat file will grow to 3GB size (assume that it is 1GB size before extend)
Please refer https://www.ventoy.net/en/plugin_persistence.html for details.

View File

@@ -68,7 +68,7 @@ gfxterm_background: video_colors bitmap_scale gfxterm extcmd video bitmap
search_fs_uuid:
gcry_dsa: pgp mpi
keystatus: extcmd
linux: verifiers boot fdt
linux: ventoy verifiers boot fdt
geli: cryptodisk crypto gcry_sha512 pbkdf2 gcry_sha256
cmdline_cat_test: font functional_test normal procfs video_fb
part_sun:
@@ -93,7 +93,7 @@ terminal:
div:
crypto:
part_bsd: part_msdos
ventoy: elf fshelp ext2 btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
ventoy: elf fshelp ext2 btrfs font crypto gcry_md5 exfat udf extcmd datetime div normal video gcry_sha1 iso9660
gcry_sha512: crypto
password: crypto normal
fshelp:

View File

@@ -1796,7 +1796,7 @@ function img_unsupport_menuentry {
#############################################################
#############################################################
set VENTOY_VERSION="1.0.44"
set VENTOY_VERSION="1.0.45"
#ACPI not compatible with Window7/8, so disable by default
set VTOY_PARAM_NO_ACPI=1
@@ -1932,7 +1932,7 @@ elif [ "$vtoy_display_mode" = "serial_console" ]; then
terminal_output serial console
else
if [ -n "$vtoy_theme" ]; then
set theme=$vtoy_theme
vt_set_theme
else
set theme=$prefix/themes/ventoy/theme.txt
fi

View File

@@ -82,7 +82,7 @@ gfxterm_background: video_colors bitmap_scale gfxterm extcmd video bitmap
search_fs_uuid:
gcry_dsa: pgp mpi
keystatus: extcmd
linux: verifiers video boot relocator mmap
linux: ventoy verifiers video boot relocator mmap
geli: cryptodisk crypto gcry_sha512 pbkdf2 gcry_sha256
cmdline_cat_test: font functional_test normal procfs video_fb
rdmsr: extcmd
@@ -120,7 +120,7 @@ ehci: cs5536 usb boot
crypto:
part_bsd: part_msdos
cs5536:
ventoy: elf fshelp ext2 btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
ventoy: elf fshelp ext2 btrfs font crypto gcry_md5 exfat udf extcmd datetime div normal video gcry_sha1 iso9660
gcry_sha512: crypto
password: crypto normal
fshelp:

View File

@@ -82,7 +82,7 @@ gfxterm_background: video_colors bitmap_scale gfxterm extcmd video bitmap
search_fs_uuid:
gcry_dsa: pgp mpi
keystatus: extcmd
linux: verifiers normal vbe video boot relocator mmap
linux: ventoy verifiers normal vbe video boot relocator mmap
geli: cryptodisk crypto gcry_sha512 pbkdf2 gcry_sha256
cmdline_cat_test: font functional_test normal procfs video_fb
rdmsr: extcmd
@@ -123,7 +123,7 @@ crypto:
part_bsd: part_msdos
cs5536: pci
biosdisk:
ventoy: elf fshelp ext2 btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 acpi
ventoy: elf fshelp ext2 btrfs font crypto gcry_md5 exfat udf datetime div extcmd normal video gcry_sha1 iso9660 acpi
lsapm:
gcry_sha512: crypto
password: crypto normal

Binary file not shown.

View File

@@ -81,7 +81,7 @@ gfxterm_background: video_colors bitmap_scale gfxterm extcmd video bitmap
search_fs_uuid:
gcry_dsa: pgp mpi
keystatus: extcmd
linux: verifiers video boot relocator mmap
linux: ventoy verifiers video boot relocator mmap
geli: cryptodisk crypto gcry_sha512 pbkdf2 gcry_sha256
cmdline_cat_test: font functional_test normal procfs video_fb
rdmsr: extcmd
@@ -120,7 +120,7 @@ ehci: cs5536 usb boot
crypto:
part_bsd: part_msdos
cs5536:
ventoy: elf fshelp ext2 btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
ventoy: elf fshelp ext2 btrfs font crypto gcry_md5 exfat udf extcmd datetime div normal video gcry_sha1 iso9660
gcry_sha512: crypto
password: crypto normal
fshelp:

View File

@@ -70,6 +70,22 @@ terminal-box: "terminal_box_*.png"
}
+ hbox{
left = 30%+200
top = 95%-50
width = 10%
height = 25
+ label {text = "@VTOY_GRUB2_MODE@" color = "red" align = "left"}
}
+ hbox{
left = 30%+200
top = 95%-25
width = 10%
height = 25
+ label {text = "@VTOY_WIMBOOT_MODE@" color = "red" align = "left"}
}
+ hbox{
left = 90%
top = 55

View File

@@ -106,11 +106,13 @@ cp $OPT VentoyWebDeepin.sh $tmpdir/
cp $OPT README $tmpdir/
cp $OPT plugin $tmpdir/
cp $OPT CreatePersistentImg.sh $tmpdir/
cp $OPT ExtendPersistentImg.sh $tmpdir/
dos2unix -q $tmpdir/Ventoy2Disk.sh
dos2unix -q $tmpdir/VentoyWeb.sh
dos2unix -q $tmpdir/VentoyWebDeepin.sh
#dos2unix -q $tmpdir/Ventoy.desktop
dos2unix -q $tmpdir/CreatePersistentImg.sh
dos2unix -q $tmpdir/ExtendPersistentImg.sh
cp $OPT ../LinuxGUI/WebUI $tmpdir/
sed 's/.*SCRIPT_DEL_THIS \(.*\)/\1/g' -i $tmpdir/WebUI/index.html