diff --git a/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh b/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh index d1cbdac1..7b43a79f 100644 --- a/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh +++ b/IMG/cpio/ventoy/hook/rhel7/ventoy-hook.sh @@ -159,7 +159,7 @@ if $GREP -q SCRE /proc/cmdline; then fi if $GREP -qw 'SA[.]1' /proc/cmdline; then -if $GREP -qw 'SA[.]2' /proc/cmdline; then +if $GREP -qw 'writable.fsimg' /proc/cmdline; then if $GREP -qw 'rw' /proc/cmdline; then echo 1 > $VTOY_PATH/distmagic/DELL_PER fi diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index fe130668..c198879d 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -860,6 +860,9 @@ function uefi_linux_menu_func { if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg set vtback_cfg_find=1 + elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then + syslinux_configfile (loop)/boot/syslinux/porteus.cfg + set vtback_cfg_find=1 fi fi @@ -1311,6 +1314,9 @@ function legacy_linux_menu_func { if [ -f (loop)/boot/isolinux/syslnx64.cfg ]; then syslinux_configfile (loop)/boot/isolinux/syslnx64.cfg set vtback_cfg_find=1 + elif [ -f (loop)/boot/syslinux/porteus.cfg ]; then + syslinux_configfile (loop)/boot/syslinux/porteus.cfg + set vtback_cfg_find=1 fi fi @@ -1486,6 +1492,8 @@ function iso_common_menuentry { get_os_type (loop) + ventoy_debug_pause + if vt_need_secondary_menu "$vt_chosen_name"; then vt_show_secondary_menu "$vt_chosen_path" "$vtoy_os" $vt_chosen_size if [ "$VTOY_SECOND_EXIT" = "1" ]; then diff --git a/INSTALL/ventoy/vtoyjump32.exe b/INSTALL/ventoy/vtoyjump32.exe index 15f3fc17..ae791443 100644 Binary files a/INSTALL/ventoy/vtoyjump32.exe and b/INSTALL/ventoy/vtoyjump32.exe differ diff --git a/INSTALL/ventoy/vtoyjump64.exe b/INSTALL/ventoy/vtoyjump64.exe index d1e63c6f..af643e43 100644 Binary files a/INSTALL/ventoy/vtoyjump64.exe and b/INSTALL/ventoy/vtoyjump64.exe differ diff --git a/vtoyjump/vtoyjump/vtoyjump.c b/vtoyjump/vtoyjump/vtoyjump.c index 178e4354..2d9a8a6a 100644 --- a/vtoyjump/vtoyjump/vtoyjump.c +++ b/vtoyjump/vtoyjump/vtoyjump.c @@ -916,7 +916,7 @@ static BOOL Is2K10PE(void) return bRet; } -static CHAR GetIMDiskMountLogicalDrive(void) +static CHAR GetIMDiskMountLogicalDrive(const char *suffix) { CHAR Letter = 'Y'; DWORD Drives; @@ -929,6 +929,12 @@ static CHAR GetIMDiskMountLogicalDrive(void) return 'M'; } + //fixed use Z as mountpoint for Lenovo Product Recovery + if (strcmp(suffix, "VTLRI") == 0) + { + return 'Z'; + } + Drives = GetLogicalDrives(); Log("Drives=0x%x", Drives); @@ -1073,26 +1079,18 @@ End: return rc; } -static int VentoyRunImdisk(const char *IsoPath, const char *imdiskexe, const char *opt) +static int VentoyRunImdisk(const char *suffix, const char *IsoPath, const char *imdiskexe, const char *opt) { CHAR Letter; CHAR Cmdline[512]; WCHAR CmdlineW[512]; PROCESS_INFORMATION Pi; - Log("VentoyRunImdisk <%s> <%s> <%s>", IsoPath, imdiskexe, opt); + Log("VentoyRunImdisk <%s> <%s> <%s> <%s>", suffix, IsoPath, imdiskexe, opt); - Letter = GetIMDiskMountLogicalDrive(); + Letter = GetIMDiskMountLogicalDrive(suffix); - if (opt) - { - sprintf_s(Cmdline, sizeof(Cmdline), "%s -a -o %s -f \"%s\" -m %C:", imdiskexe, opt, IsoPath, Letter); - } - else - { - sprintf_s(Cmdline, sizeof(Cmdline), "%s -a -f \"%s\" -m %C:", imdiskexe, IsoPath, Letter); - } - + sprintf_s(Cmdline, sizeof(Cmdline), "%s -a -o %s -f \"%s\" -m %C:", imdiskexe, opt, IsoPath, Letter); Log("mount iso to %C: use imdisk cmd <%s>", Letter, Cmdline); if (IsUTF8Encode(IsoPath)) @@ -1135,7 +1133,7 @@ int VentoyMountISOByImdisk(const char *IsoPath, DWORD PhyDrive) if (0 == VentoyCopyImdisk(PhyDrive, ImPath)) { - VentoyRunImdisk(IsoPath, ImPath, "ro"); + VentoyRunImdisk("iso", IsoPath, ImPath, "ro"); rc = 0; } @@ -2370,7 +2368,7 @@ static int MountVTLRI(CHAR *ImgPath, DWORD PhyDrive) VentoyCopyImdisk(PhyDrive, ImDiskPath); - VentoyRunImdisk(ImgPath, ImDiskPath, "rem"); + VentoyRunImdisk("VTLRI", ImgPath, ImDiskPath, "ro,rem"); return 0; }