Add build, deploy and test sources

This commit is contained in:
Paravis committed 2026-11-13 07:52:37 +03:00
1 parent b962581812
commit 3d1a08f230
259 files changed
+15273

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
build/
out/
dist/
*.log
*.tmp
keys/
*.key
*.crt
*.cer
*.pem
*.pfx
*.p12
*.signed
*.efi
*.iso
*.img
*.wim
*.esd
*.pf
*.vhd
*.vmdk
*.exe
*.dll
+46
View File
@@ -0,0 +1,46 @@
# Paravis Ventoy build scripts
Scripts used to build, patch, theme and deploy Ventoy/GRUB2 for the PARAVIS
flash. This tree is meant to be added to the `Ventoy` repository under
`build-scripts/`.
## Categories
```
build/ Ventoy/GRUB core and EFI build scripts
layout/ flash layout: partitions, deployment, relayout
theme-tools/ PSD/theme/font tooling (grub-mkfont, pf2 helpers)
integration/ third-party menus: Acronis, Super Grub2 Disk, KRD, XorBoot
config/ Ventoy F6 menu and VTOYEFI grub.cfg/grbp.cfg sources
experiments/ one-off debug/experiment scripts, kept for reference
```
`integration/signing/` contains signing **scripts** only. No keys or
certificates are included; supply your own in `keys/` if you need to sign
Secure Boot binaries.
## Paths
Absolute build paths were replaced with `/path/to/pf` (Linux) and `C:\PF`
(Windows). Adjust them to your checkout. Scripts that reference `keys/` expect
your own keys and are not runnable without them.
## Requirements
- Linux/WSL for the shell scripts (xorriso, mtools, grub tools, sbsign,
osslsigncode, Python 3, Pillow, fontTools);
- PowerShell 7+ for the layout scripts;
- Ventoy 1.1.18 source tree (`Ventoy-src/`).
## What is not included
- Secure Boot keys, certificates and signed EFI binaries;
- Microsoft font derivatives (`tahoma*.pf2`, `segoeui18.pf2`);
- bootable images (`*.iso`, `*.img`, `*.wim`, `*.esd`, `Data.pf`);
- third-party payloads (Acronis, KRD, Strelec, XorBoot, bootice).
## License
The Paravis scripts are MIT. Scripts that patch or build Ventoy/GRUB2 are
derived from GPLv3 projects; keep `Ventoy-src/COPYING` and the GPL terms when
redistributing them.
+96
View File
@@ -0,0 +1,96 @@
unset vtchkdef
vt_vtoychksum_exist "${VTOY_CHKSUM_FILE_PATH}"
if [ "$VT_EXIST_MD5" = "1" ]; then
if [ -z "$vtchkdef" ]; then
set default=0
set vtchkdef=1
fi
menuentry "$VTLANG_CHKSUM_MD5_CALC_CHK" --class=checksum_md5 {
md5sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
vt_cmp_checksum 0 "${VTOY_CHKSUM_FILE_PATH}"
echo -en "\n\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
else
menuentry "$VTLANG_CHKSUM_MD5_CALC" --class=checksum_md5 {
md5sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
echo -en "\n\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
fi
if [ "$VT_EXIST_SHA1" = "1" ]; then
if [ -z "$vtchkdef" ]; then
set default=1
set vtchkdef=1
fi
menuentry "$VTLANG_CHKSUM_SHA1_CALC_CHK" --class=checksum_sha1 {
sha1sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
vt_cmp_checksum 1 "${VTOY_CHKSUM_FILE_PATH}"
echo -en "\n\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
else
menuentry "$VTLANG_CHKSUM_SHA1_CALC" --class=checksum_sha1 {
sha1sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
echo -en "\n\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
fi
if [ "$VT_EXIST_SHA256" = "1" ]; then
if [ -z "$vtchkdef" ]; then
set default=2
set vtchkdef=1
fi
menuentry "$VTLANG_CHKSUM_SHA256_CALC_CHK" --class=checksum_sha256 {
sha256sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
vt_cmp_checksum 2 "${VTOY_CHKSUM_FILE_PATH}"
echo -en "\n\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
else
menuentry "$VTLANG_CHKSUM_SHA256_CALC" --class=checksum_sha256 {
sha256sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
echo -en "\n\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
fi
if [ "$VT_EXIST_SHA512" = "1" ]; then
if [ -z "$vtchkdef" ]; then
set default=3
set vtchkdef=1
fi
menuentry "$VTLANG_CHKSUM_SHA512_CALC_CHK" --class=checksum_sha512{
sha512sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
vt_cmp_checksum 3 "${VTOY_CHKSUM_FILE_PATH}"
echo -en "\n\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
else
menuentry "$VTLANG_CHKSUM_SHA512_CALC" --class=checksum_sha512{
sha512sum "${vtoy_iso_part}${VTOY_CHKSUM_FILE_PATH}"
echo -en "\n\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
fi
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo 'Return ...'
}
+294
View File
@@ -0,0 +1,294 @@
#
# VTLANG_CTRL_TEMP_SET must be the first
# And the inside item order can not be changed
#
submenu "$VTLANG_CTRL_TEMP_SET" --class=debug_temp_set --class=F5tool {
menuentry "[ $VTOY_WIN11_BYPASS_CHECK ] $VTLANG_WIN11_BYPASS_CHECK" --class=debug_temp_win11_bypass --class=debug_temp_set --class=F5tool \
VTOY_RUN_SET_0_0 {
if [ "$VTOY_WIN11_BYPASS_CHECK" = "0" ]; then
set VTOY_WIN11_BYPASS_CHECK=1
else
set VTOY_WIN11_BYPASS_CHECK=0
fi
}
menuentry "[ $VTOY_WIN11_BYPASS_NRO ] $VTLANG_WIN11_BYPASS_NRO" --class=debug_temp_win11_nro --class=debug_temp_set --class=F5tool \
VTOY_RUN_SET_1_0 {
if [ "$VTOY_WIN11_BYPASS_NRO" = "0" ]; then
set VTOY_WIN11_BYPASS_NRO=1
else
set VTOY_WIN11_BYPASS_NRO=0
fi
}
menuentry "[ $VTOY_SECONDARY_BOOT_MENU ] $VTLANG_SECONDARY_BOOT_MENU" --class=debug_temp_second_menu --class=debug_temp_set --class=F5tool \
VTOY_RUN_SET_2_0 {
if [ "$VTOY_SECONDARY_BOOT_MENU" = "0" ]; then
set VTOY_SECONDARY_BOOT_MENU=1
else
set VTOY_SECONDARY_BOOT_MENU=0
fi
}
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
}
if [ "$grub_platform" != "pc" ]; then
submenu "$VTLANG_WIN_UEFI_RES_LOCK" --class=debug_uefi_res_lock --class=F5tool {
set vtActive0="[ ]"
set vtActive1="[ ]"
set vtActive2="[ ]"
set vtActive3="[ ]"
if [ "$VTOY_WIN_UEFI_RES_LOCK" = "0" ]; then
set vtActive0="[*]"
elif [ "$VTOY_WIN_UEFI_RES_LOCK" = "1" ]; then
set vtActive1="[*]"
elif [ "$VTOY_WIN_UEFI_RES_LOCK" = "2" ]; then
set vtActive2="[*]"
elif [ "$VTOY_WIN_UEFI_RES_LOCK" = "3" ]; then
set vtActive3="[*]"
fi
menuentry "$vtActive0 $VTLANG_UEFI_RES_LOCK_NONE" --class=debug_uefi_res_lock0 --class=F5tool VTOY_RUN_SET_0_1 {
set VTOY_WIN_UEFI_RES_LOCK=0
}
menuentry "$vtActive1 $VTLANG_UEFI_RES_LOCK_MAX" --class=debug_uefi_res_lock1 --class=F5tool VTOY_RUN_SET_1_1 {
set VTOY_WIN_UEFI_RES_LOCK=1
}
menuentry "$vtActive2 $VTLANG_UEFI_RES_LOCK_1024_768" --class=debug_uefi_res_lock2 --class=F5tool VTOY_RUN_SET_2_1 {
set VTOY_WIN_UEFI_RES_LOCK=2
}
menuentry "$vtActive3 $VTLANG_UEFI_RES_LOCK_BE1024_768" --class=debug_uefi_res_lock3 --class=F5tool VTOY_RUN_SET_3_1 {
set VTOY_WIN_UEFI_RES_LOCK=3
}
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
}
fi
submenu "$VTLANG_MENU_LANG" --class=debug_menu_lang --class=F5tool {
source $prefix/menulang.cfg
}
source $prefix/power.cfg
source $prefix/hwinfo.cfg
source $prefix/keyboard.cfg
submenu "$VTLANG_RESOLUTION_CFG" --class=debug_resolution --class=F5tool {
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
vt_update_cur_video_mode VT_CUR_MODE
set vdid=0
while [ $vdid -lt $VTOY_VIDEO_MODE_NUM ]; do
vt_get_video_mode $vdid vtCurMode
unset vtActive
if [ "$vtCurMode" = "$VT_CUR_MODE" ]; then
set vtActive="[*]"
fi
menuentry "$vtCurMode $vtActive" --class=debug_videomode --class=debug_resolution --class=F5tool VTOY_RUN_RET {
terminal_output console
set gfxmode=$1
terminal_output gfxterm
if [ "$vtoy_res_fit" = "1" ]; then
vt_set_theme switch
fi
}
vt_incr vdid 1
done
}
submenu "$VTLANG_SCREEN_MODE" --class=debug_screen_mode --class=F5tool {
menuentry "$VTLANG_SCREEN_TEXT_MODE" --class=debug_text_mode --class=debug_screen_mode --class=F5tool {
vt_push_menu_lang en_US
terminal_output console
}
menuentry "$VTLANG_SCREEN_GUI_MODE" --class=debug_gui_mode --class=debug_screen_mode --class=F5tool {
terminal_output gfxterm
vt_pop_menu_lang
}
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
}
if [ -n "$VTOY_THEME_COUNT" -a $VTOY_THEME_COUNT -gt 1 ]; then
submenu "$VTLANG_THEME_SELECT" --class=debug_theme_select --class=F5tool {
vt_select_theme_cfg
}
fi
if [ "$grub_platform" != "pc" ]; then
submenu "$VTLANG_UEFI_UTIL" --class=debug_util --class=F5tool {
menuentry "$VTLANG_UTIL_SHOW_EFI_DRV" --class=debug_util_efidrv --class=debug_util --class=F5tool {
vt_push_pager
chainloader ${vtoy_path}/vtoyutil_${VTOY_EFI_ARCH}.efi env_param=${env_param} ${vtdebug_flag} feature=show_efi_drivers
boot
vt_pop_pager
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
menuentry "$VTLANG_UTIL_FIX_BLINIT_FAIL" --class=debug_util_blinit --class=debug_util --class=F5tool {
chainloader ${vtoy_path}/vtoyutil_${VTOY_EFI_ARCH}.efi env_param=${env_param} ${vtdebug_flag} feature=fix_windows_mmap
boot
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
}
fi
submenu "$VTLANG_JSON_CHK_JSON" --class=debug_json --class=F5tool {
menuentry "$VTLANG_JSON_CHK_CONTROL" --class=debug_control --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path control $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_THEME" --class=debug_theme --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path theme $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_AUTOINS" --class=debug_autoinstall --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path auto_install $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_PERSIST" --class=debug_persistence --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path persistence $vtoy_iso_part
echo -e "\n############### dump persistence ###############"
vt_dump_persistence
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_MENU_ALIAS" --class=debug_menualias --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path menu_alias $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_MENU_TIP" --class=debug_menutip --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path menu_tip $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_MENU_CLASS" --class=debug_menuclass --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path menu_class $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_INJECTION" --class=debug_injection --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path injection $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_AUTO_MEMDISK" --class=debug_automemdisk --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path auto_memdisk $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_IMG_LIST" --class=debug_imagelist --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path image_list $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_IMG_BLIST" --class=debug_imageblacklist --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path image_blacklist $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_CONF_REPLACE" --class=debug_bootconf_replace --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path conf_replace $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_DUD" --class=debug_dud --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path dud $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_JSON_CHK_PASSWORD" --class=debug_pwd --class=debug_json --class=F5tool {
set pager=1
vt_check_plugin_json $vt_plugin_path password $vtoy_iso_part
echo -en "\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
unset pager
}
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
}
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+64
View File
@@ -0,0 +1,64 @@
menuentry "$VTLANG_HWINFO" --class=debug_hwinfo --class=F5tool {
smbios -t 4 -s 0x10 --set=cpu_brand
set system_vendor="-";
smbios -t 1 -s 0x04 --set=system_vendor;
set system_product="-";
smbios -t 1 -s 0x05 --set=system_product;
set system_version="-";
smbios -t 1 -s 0x06 --set=system_version;
set board_vendor="-";
smbios -t 2 -s 0x04 --set=board_vendor;
set board_product="-";
smbios -t 2 -s 0x05 --set=board_product;
set board_version="-";
smbios -t 2 -s 0x06 --set=board_version;
set bios_vendor="-";
smbios -t 0 -s 0x04 --set=bios_vendor;
set bios_version="-";
smbios -t 0 -s 0x05 --set=bios_ver;
set bios_date="-";
smbios -t 0 -s 0x08 --set=bios_date;
set bios_size="-";
smbios -t 0 -b 0x09 --set=bios_size;
echo "Platform $grub_cpu-$grub_platform"
if [ "$grub_platform" != "pc" ]; then
echo "UEFI Version $grub_uefi_version"
echo "PI Version $grub_pi_version"
if vt_check_secureboot_var; then
echo "Secure Boot Enabled"
else
echo "Secure Boot Disabled"
fi
vt_sbinfo
fi
echo ""
echo "CPU Model $cpu_brand"
echo "Physical RAM $grub_total_ram MB"
echo ""
echo "Manufacturer $system_vendor"
echo "Product Name $system_product"
echo "Version $system_version"
echo ""
echo "Board Manufacturer $board_vendor"
echo "Board Name $board_product"
echo "Board Version $board_version"
echo ""
echo "BIOS Manufacturer $bios_vendor"
echo "BIOS Version $bios_ver"
echo "BIOS Date $bios_date"
echo "BIOS ROM Size $bios_size"
echo -en "\n\n\n$VTLANG_ENTER_EXIT ..."
read vtInputKey
}
+62
View File
@@ -0,0 +1,62 @@
submenu "$VTLANG_KEYBRD_LAYOUT" --class=debug_krdlayout --class=F5tool {
menuentry QWERTY_USA --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout QWERTY_USA
}
menuentry AZERTY --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout AZERTY
}
menuentry CZECH_QWERTY --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout CZECH_QWERTY
}
menuentry CZECH_QWERTZ --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout CZECH_QWERTZ
}
menuentry DANISH --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout DANISH
}
menuentry DVORAK_USA --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout DVORAK_USA
}
menuentry FRENCH --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout FRENCH
}
menuentry GERMAN --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout GERMAN
}
menuentry ITALIANO --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout ITALIANO
}
menuentry JAPAN_106 --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout JAPAN_106
}
menuentry LATIN_USA --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout LATIN_USA
}
menuentry PORTU_BRAZIL --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout PORTU_BRAZIL
}
menuentry QWERTY_UK --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout QWERTY_UK
}
menuentry QWERTZ --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout QWERTZ
}
menuentry QWERTZ_HUN --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout QWERTZ_HUN
}
menuentry QWERTZ_SLOV_CROAT --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout QWERTZ_SLOV_CROAT
}
menuentry SPANISH --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout SPANISH
}
menuentry SWEDISH --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout SWEDISH
}
menuentry TURKISH_Q --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout TURKISH_Q
}
menuentry VIETNAMESE --class=debug_kbd --class=debug_krdlayout --class=F5tool {
set_keyboard_layout VIETNAMESE
}
}
+222
View File
@@ -0,0 +1,222 @@
if [ "$grub_platform" = "pc" ]; then
menuentry "$VTLANG_LB_SBOOT_WINDOWS" --class=boot_windows --class=F4boot {
set partid=3
while [ $partid -le 128 ]; do
if vt_check_part_exist $partid; then
for bt in bootmgr BOOTMGR Bootmgr BootMGR; do
if [ -f ($vtoydev,$partid)/$bt ]; then
set root=($vtoydev,$partid)
ntldr /$bt
boot
fi
done
else
break
fi
vt_incr partid 1
done
if search -n -s -f /Boot/BCD; then
for bt in bootmgr BOOTMGR Bootmgr BootMGR; do
if [ -f /$bt ]; then
if regexp '^hd0' $root; then
ntldr /$bt
else
drivemap -s hd0 $root
ntldr /$bt
fi
break
fi
done
elif search -n -s -f /NTDETECT.COM; then
drivemap -s hd0 $root
ntldr /ntldr
else
echo "Windows NOT found ..."
fi
}
menuentry "$VTLANG_LB_SBOOT_G4D" --class=boot_g4d --class=F4boot {
if search -n -s -f /grldr; then
ntldr /grldr
else
echo "Grub4dos NOT found ..."
fi
}
menuentry "$VTLANG_LB_SBOOT_HDD1" --class=boot_disk --class=F4boot {
set root=(hd0,1)
chainloader +1
boot
}
menuentry "$VTLANG_LB_SBOOT_HDD2" --class=boot_disk --class=F4boot {
set root=(hd1,1)
chainloader +1
boot
}
menuentry "$VTLANG_LB_SBOOT_HDD3" --class=boot_disk --class=F4boot {
set root=(hd2,1)
chainloader +1
boot
}
else
menuentry "$VTLANG_LB_SBOOT_WINDOWS" --class=boot_windows --class=F4boot {
set partid=3
while [ $partid -le 128 ]; do
if vt_check_part_exist $partid; then
if [ -f ($vtoydev,$partid)/EFI/Microsoft/Boot/bootmgfw.efi ]; then
set root=($vtoydev,$partid)
terminal_output console
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
elif [ -f ($vtoydev,$partid)/efi/Microsoft/Boot/bootmgfw.efi ]; then
set root=($vtoydev,$partid)
terminal_output console
chainloader /efi/Microsoft/Boot/bootmgfw.efi
boot
elif [ -f ($vtoydev,$partid)/VTEFI/Microsoft/Boot/bootmgfw.efi ]; then
set root=($vtoydev,$partid)
terminal_output console
chainloader /VTEFI/Microsoft/Boot/bootmgfw.efi
boot
fi
else
break
fi
vt_incr partid 1
done
if search -n -s -f /EFI/Microsoft/Boot/bootmgfw.efi; then
terminal_output console
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
boot
elif search -n -s -f /efi/Microsoft/Boot/bootmgfw.efi; then
terminal_output console
chainloader /efi/Microsoft/Boot/bootmgfw.efi
boot
else
echo "Windows NOT found ..."
fi
}
if [ "$grub_cpu" = "i386" ]; then
menuentry "$VTLANG_LB_SBOOT_IA32EFI" --class=boot_uefi --class=F4boot {
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/boot/bootia32.efi; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
chainloader /efi/boot/bootia32.efi
boot
elif search -n -s -f /vtefi/boot/bootia32.efi; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
chainloader /vtefi/boot/bootia32.efi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "BOOTIA32.EFI NOT found ..."
fi
}
menuentry "$VTLANG_LB_SBOOT_XORBOOT" --class=boot_xorboot --class=F4boot {
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/xorboot/xorboot32.xor; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
if [ -f /efi/xorboot/bootia32.efi ]; then
chainloader /efi/xorboot/bootia32.efi
elif [ -f /efi/xorboot/xorboot.efi ]; then
chainloader /efi/xorboot/xorboot.efi
fi
boot
elif search -n -s -f /vtefi/xorboot/xorboot32.xor; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
if [ -f /vtefi/xorboot/bootia32.efi ]; then
chainloader /vtefi/xorboot/bootia32.efi
elif [ -f /vtefi/xorboot/xorboot.efi ]; then
chainloader /vtefi/xorboot/xorboot.efi
fi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "xorboot NOT found ..."
fi
}
elif [ "$grub_cpu" = "arm64" ]; then
menuentry "$VTLANG_LB_SBOOT_AA64EFI" --class=boot_uefi --class=F4boot {
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/boot/bootaa64.efi; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
chainloader /efi/boot/bootaa64.efi
boot
elif search -n -s -f /vtefi/boot/bootaa64.efi; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
chainloader /vtefi/boot/bootaa64.efi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "BOOTAA64.EFI NOT found ..."
fi
}
else
menuentry "$VTLANG_LB_SBOOT_X64EFI" --class=boot_uefi --class=F4boot {
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/boot/bootx64.efi; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
chainloader /efi/boot/bootx64.efi
boot
elif search -n -s -f /vtefi/boot/bootx64.efi; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
chainloader /vtefi/boot/bootx64.efi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "BOOTX64.EFI NOT found ..."
fi
}
menuentry "$VTLANG_LB_SBOOT_XORBOOT" --class=boot_xorboot --class=F4boot {
set VTOY_SEARCH_NO_VTOYEFI=1
if search -n -s -f /efi/xorboot/xorboot.xor; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
if [ -f /efi/xorboot/bootx64.efi ]; then
chainloader /efi/xorboot/bootx64.efi
elif [ -f /efi/xorboot/xorboot.efi ]; then
chainloader /efi/xorboot/xorboot.efi
fi
boot
elif search -n -s -f /vtefi/xorboot/xorboot.xor; then
unset VTOY_SEARCH_NO_VTOYEFI
terminal_output console
if [ -f /vtefi/xorboot/bootx64.efi ]; then
chainloader /vtefi/xorboot/bootx64.efi
elif [ -f /vtefi/xorboot/xorboot.efi ]; then
chainloader /vtefi/xorboot/xorboot.efi
fi
boot
else
unset VTOY_SEARCH_NO_VTOYEFI
echo "xorboot NOT found ..."
fi
}
fi
fi
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
+94
View File
@@ -0,0 +1,94 @@
#ventoy_pack.sh will generate menuentry here
menuentry "zh_CN - Chinese Simplified (简体中文)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang zh_CN
}
menuentry "ar_AR - Arabic (العربية)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang ar_AR
}
menuentry "bn_BN - Bengali (বাংলা)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang bn_BN
}
menuentry "cs_CZ - Czech (Čeština)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang cs_CZ
}
menuentry "de_DE - German (Deutsch)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang de_DE
}
menuentry "el_GR - Greek (Ελληνικά)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang el_GR
}
menuentry "en_US - English (English)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang en_US
}
menuentry "es_ES - Spanish (Español)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang es_ES
}
menuentry "fa_IR - Persian (فارسی)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang fa_IR
}
menuentry "fr_FR - French (Français)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang fr_FR
}
menuentry "hi_HI - Hindi (हिन्दी)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang hi_HI
}
menuentry "hr_HR - Croatian (Hrvatski)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang hr_HR
}
menuentry "hu_HU - Magyar (Hungarian)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang hu_HU
}
menuentry "id_ID - Indonesian (Bahasa Indonesia)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang id_ID
}
menuentry "it_IT - Italiano (Italian)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang it_IT
}
menuentry "ja_JP - Japanese (日本語)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang ja_JP
}
menuentry "ka_GE - Georgian (ქართული)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang ka_GE
}
menuentry "ko_KR - Korean (한국어)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang ko_KR
}
menuentry "lg_UG - English (English)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang lg_UG
}
menuentry "pl_PL - Polish (Poland)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang pl_PL
}
menuentry "pt_BR - Brazilian Portuguese (Portugues Brasileiro)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang pt_BR
}
menuentry "pt_PT - Portuguese (Português de Portugal)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang pt_PT
}
menuentry "ru_RU - Russian (Русский)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang ru_RU
}
menuentry "sl_SI - Slovenija (Slovenski)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang sl_SI
}
menuentry "sr_RS - Serbian Latin (Srpski)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang sr_RS
}
menuentry "ta_IN - Tamil (தமிழ்)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang ta_IN
}
menuentry "tr_TR - Turkish (Türkçe)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang tr_TR
}
menuentry "uk_UA - Ukrainian (Українська)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang uk_UA
}
menuentry "vi_VN - Vietnamese (Tiếng Việt)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang vi_VN
}
menuentry "zh_TW - Chinese Traditional (正體中文)" --class=menu_lang_item --class=debug_menu_lang --class=F5tool {
vt_load_menu_lang zh_TW
}
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
+25
View File
@@ -0,0 +1,25 @@
submenu "$VTLANG_POWER" --class=debug_power --class=F5tool {
menuentry "$VTLANG_POWER_REBOOT" --class=debug_reboot --class=debug_power --class=F5tool {
echo -e '\n\nSystem is rebooting ... \n'
sleep 1
reboot
}
menuentry "$VTLANG_POWER_HALT" --class=debug_halt --class=debug_power --class=F5tool {
echo -e '\n\nSystem is halting ... \n'
sleep 1
halt
}
if [ "$grub_platform" != "pc" ]; then
menuentry "$VTLANG_POWER_BOOT_EFIFW" --class=debug_efisetup --class=debug_power --class=F5tool {
echo -e '\n\nRebooting to enter UEFI firmware setup ... \n'
sleep 1
fwsetup
}
fi
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
}
}
+17
View File
@@ -0,0 +1,17 @@
menuentry "Возврат в главное меню сборки [F7]" --hotkey=f7 --class=vtoyret {
if [ "$grub_platform" = "efi" ]; then
search --no-floppy --file --set=root /efi/Paravis/Boot/grub2/grub.cfg
if [ "$grub_cpu" = "x86_64" ]; then
chainloader /efi/Paravis/Boot/grub2/grubx64.efi
else
chainloader /EFI/Boot/bootia32.efi
fi
else
chainloader (${vtoydev})+1
fi
boot
}
menuentry "← Назад в меню Ventoy [Esc]" --class=vtoyret VTOY_RET {
echo "Return ..."
}
+3
View File
@@ -0,0 +1,3 @@
menuentry "← Назад в меню Ventoy [Esc]" --class=vtoyret VTOY_RET {
echo "Return ..."
}
@@ -0,0 +1,50 @@
#!/bin/bash
set -e
echo "=== install cross compiler"
apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu >/tmp/apt_aarch64.log 2>&1
which aarch64-linux-gnu-gcc
ROOT=/root/vtbuild-arm64
SRC=$ROOT/GRUB2/SRC/grub-2.04
rm -rf $ROOT
mkdir -p $ROOT/GRUB2/SRC
cp -a /root/vtbuild-efi/GRUB2/SRC/grub-2.04 $SRC
cd $SRC
make distclean >/tmp/arm_distclean.log 2>&1 || true
echo "=== configure aarch64-efi"
./configure --prefix=$ROOT/GRUB2/INSTALL/ \
--target=aarch64 --with-platform=efi \
--host=x86_64-linux-gnu \
HOST_CC=x86_64-linux-gnu-gcc BUILD_CC=gcc \
TARGET_CC=aarch64-linux-gnu-gcc \
TARGET_OBJCOPY=aarch64-linux-gnu-objcopy \
TARGET_STRIP=aarch64-linux-gnu-strip \
TARGET_NM=aarch64-linux-gnu-nm \
TARGET_RANLIB=aarch64-linux-gnu-ranlib \
--disable-werror CFLAGS="-Os" >/tmp/arm_configure.log 2>&1
echo "=== make"
make -j16 >/tmp/arm_make.log 2>&1
echo "=== install"
make install >/tmp/arm_install.log 2>&1
LIB=$ROOT/GRUB2/INSTALL/lib/grub/arm64-efi
echo "=== lib: $(ls $LIB | wc -l) files"
echo "=== extract official aarch64 modules"
mkdir -p /tmp/efimods_arm
python3 /path/to/pf/Ventoy/extract-efi-mods.py /path/to/pf/Ventoy/tmp_arm/BOOTAA64.EFI /tmp/efimods_arm \
crypto gcry_crc gcry_sha1 gcry_sha256 gcry_md5 gcry_sha512 gzio 2>&1 | tail -10
for m in crypto gcry_crc gcry_sha1 gcry_md5 gcry_sha512 gzio; do
[ -f /tmp/efimods_arm/$m.mod ] && cp -f /tmp/efimods_arm/$m.mod "$LIB/$m.mod"
done
[ -f /tmp/efimods_arm/gcry_sha256.mod ] && cp -f /tmp/efimods_arm/gcry_sha256.mod "$LIB/gcry_sha256.mod"
echo "=== classes:"
for m in crypto gcry_crc gcry_sha1 gcry_sha256 gcry_md5 gcry_sha512 gzio ventoy; do
f="$LIB/$m.mod"
if [ -f "$f" ]; then printf " %-12s %s\n" "$m" "$(readelf -h "$f" | awk '/Class:/{print $2}')"; else echo " $m MISSING"; fi
done
@@ -0,0 +1,28 @@
#!/bin/bash
set -e
ROOT=/root/vtbuild-arm64
SRC=$ROOT/GRUB2/SRC/grub-2.04
LIB=$ROOT/GRUB2/INSTALL/lib/grub/arm64-efi
cd "$SRC"
rm -f "$LIB/gcry_sha256.mod"
net_modules_uefi="efinet net tftp http"
arm64_modules=$(sed -n 's/^all_modules_arm64_uefi="\(.*\)"$/\1/p' install.sh)
mods="crypto gcry_crc gcry_sha1 gcry_md5 gcry_sha512"
for m in $net_modules_uefi $arm64_modules; do
[ "$m" = "gcry_sha256" ] && continue
case " $mods " in *" $m "*) ;; *) mods="$mods $m" ;; esac
done
echo "modules: $(echo $mods | wc -w)"
echo "--- machines of crypto modules:"
for m in crypto gcry_crc gcry_sha1 gcry_md5 gcry_sha512 gzio ventoy; do
printf " %-12s %s\n" "$m" "$(readelf -h "$LIB/$m.mod" | awk -F: '/Machine:/{print $2}')"
done
./grub-mkimage -O arm64-efi -o /tmp/BOOTAA64_new.EFI -p '(,2)/grub' -d "$LIB" --compression auto $mods
echo "image: $(stat -c %s /tmp/BOOTAA64_new.EFI)"
file /tmp/BOOTAA64_new.EFI
for s in '(,2)/grub' 'VTOY_DATA_PART_IDX' 'ISO/Ventoy/ventoy.json'; do
echo " $s : $(grep -c -a -F "$s" /tmp/BOOTAA64_new.EFI)"
done
@@ -0,0 +1,73 @@
#!/bin/bash
# Super GRUB2: Russian + "Detect and show boot methods" as default (by menuentry id).
# Builds x64.efi / x86.efi (signed) and super.iso -> D:/PF2026/super
set -e
K=/path/to/pf/Ventoy/keys
OUT=/path/to/pf/super
W=/root/sg2dwork
rm -rf "$W"; mkdir -p "$W" "$OUT"
cp -a /root/sg2d/. "$W/sg2d/"
cd "$W/sg2d"
echo "=== patch menus"
python3 - <<'EOF'
import io
# 1) Russian language in the top-level config
p = 'menus/grub.cfg'
s = io.open(p, encoding='utf-8').read()
if 'set lang=ru' not in s:
s = s.replace('insmod datehook\n', 'insmod datehook\n\nset lang=ru\nexport lang\n', 1)
io.open(p, 'w', encoding='utf-8').write(s)
print(' grub.cfg: lang=ru')
# 2) default entry = "Detect and show boot methods" (id-based, immune to index shifts)
p = 'menus/sgd/main.cfg'
s = io.open(p, encoding='utf-8').read()
old_block = '''if [ "$sb_vendor" = "" ] ; then
set default=2
else
set default=3
fi'''
if old_block in s:
s = s.replace(old_block, 'set default=detect', 1)
print(' main.cfg: default=detect')
else:
print(' main.cfg: default block not found (already patched?)')
old_entry = 'menuentry $"Detect and show boot methods" {'
if old_entry in s:
s = s.replace(old_entry, 'menuentry $"Detect and show boot methods" --id=detect {', 1)
print(' main.cfg: --id=detect')
else:
print(' main.cfg: detect entry not found (already patched?)')
io.open(p, 'w', encoding='utf-8').write(s)
EOF
grep -n 'set default' menus/sgd/main.cfg | head -3
grep -n 'id=detect' menus/sgd/main.cfg | head -3
apt-get install -y grub-common grub-pc-bin grub-efi-amd64-bin grub-efi-ia32-bin mtools xorriso gettext unifont >/tmp/apt8.log 2>&1 || true
echo "=== build x86_64 EFI"
./supergrub-mkstandalone -O=x86_64-efi -o="$W/super-x64.efi" \
--grub-mkstandalone-binary=/usr/bin/grub-mkstandalone \
--grub-mkfont-binary=/usr/bin/grub-mkfont >/tmp/sg_x64.log 2>&1 || { tail -8 /tmp/sg_x64.log; exit 1; }
ls -l "$W/super-x64.efi"
echo "=== build i386 EFI"
./supergrub-mkstandalone -O=i386-efi -o="$W/super-x86.efi" \
--grub-mkstandalone-binary=/usr/bin/grub-mkstandalone \
--grub-mkfont-binary=/usr/bin/grub-mkfont >/tmp/sg_x86.log 2>&1 || { tail -8 /tmp/sg_x86.log; exit 1; }
ls -l "$W/super-x86.efi"
echo "=== sign"
sbsign --key "$K/ventoy.key" --cert "$K/ventoy.crt" --output "$OUT/x64.efi" "$W/super-x64.efi"
sbsign --key "$K/ventoy.key" --cert "$K/ventoy.crt" --output "$OUT/x86.efi" "$W/super-x86.efi"
sbverify --cert "$K/ventoy.crt" "$OUT/x64.efi"
sbverify --cert "$K/ventoy.crt" "$OUT/x86.efi"
echo "=== build ISO"
./supergrub-mkrescue -o="$W/super.iso" \
--grub-mkrescue-binary=/usr/bin/grub-mkrescue \
--grub-mkfont-binary=/usr/bin/grub-mkfont >/tmp/sg_iso.log 2>&1 || { tail -12 /tmp/sg_iso.log; exit 1; }
cp -f "$W/super.iso" "$OUT/super.iso"
ls -l "$OUT"
@@ -0,0 +1,35 @@
#!/bin/bash
set -e
echo "=== deps"
apt-get install -y grub-common grub-efi-amd64-bin gettext unifont >/tmp/apt_sg2d.log 2>&1 || true
which grub-mkstandalone grub-mkfont msgfmt
ls /usr/lib/grub/x86_64-efi/*.mod >/dev/null && echo " modules ok"
cd /tmp/sg2d
echo "=== patch default language -> ru"
python3 - <<'EOF'
import io
p='menus/grub.cfg'
s=io.open(p, encoding='utf-8').read()
if 'set lang=ru' not in s:
marker='insmod datehook\n'
s=s.replace(marker, marker+'\n# Paravis: default language\nset lang=ru\nexport lang\n',1)
io.open(p,'w',encoding='utf-8').write(s)
print(' patched menus/grub.cfg')
else:
print(' already patched')
EOF
grep -n -A3 'Paravis' menus/grub.cfg
echo "=== build standalone EFI"
rm -f /tmp/sg2d_ru.efi
./supergrub-mkstandalone -O=x86_64-efi -o=/tmp/sg2d_ru.efi \
--grub-mkstandalone-binary=/usr/bin/grub-mkstandalone \
--grub-mkfont-binary=/usr/bin/grub-mkfont 2>&1 | tail -15 || true
if [ -f /tmp/sg2d_ru.efi ]; then
ls -l /tmp/sg2d_ru.efi
file /tmp/sg2d_ru.efi
else
echo " !! build failed"
fi
@@ -0,0 +1,26 @@
#!/bin/bash
echo "=== how grubfm boots a generic ISO (UEFI):"
find /tmp/gfm/boot/grubfm/rules/iso -name '*.sh' -o -name '*.lua' 2>/dev/null | head
for f in /tmp/gfm/boot/grubfm/rules/iso/*.sh; do
echo "--- $f"; sed -n '1,40p' "$f"; echo
done 2>/dev/null | head -80
echo
echo "=== memtest binaries:"
python3 - <<'EOF'
import struct
for p in ('/mnt/f/EFI/Boot/memtest.efi','/mnt/f/EFI/Boot/mtest32.efi',
'/mnt/f/efi/Paravis/Boot/mem/memtest64.efi','/mnt/f/efi/Paravis/Boot/mem/memtest32.efi'):
try:
d=open(p,'rb').read()
except Exception as e:
print(p, 'ERR', e); continue
pe=struct.unpack_from('<I',d,0x3c)[0]
mach=struct.unpack_from('<H',d,pe+4)[0]
magic=struct.unpack_from('<H',d,pe+24)[0]
import re
name = b''
m = re.search(rb'MEMTEST[ -~]{0,40}', d[:2000000], re.I)
if m: name = m.group(0)[:40]
print(' %-46s mach=0x%04x magic=0x%03x size=%-8d %s' % (p.split('/')[-1], mach, magic, len(d), name.decode('latin1')))
EOF
@@ -0,0 +1,25 @@
#!/bin/bash
set -e
SRC=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
W=/tmp/kchk
rm -rf $W; mkdir -p $W
7z e -y -o$W "$SRC" 'ACR/ATI2025/dat10.dat' 'ACR/ADDH12/dat14.dat' >/dev/null
python3 - <<'EOF'
import struct, glob
for p in sorted(glob.glob('/tmp/kchk/*.dat')):
d = open(p, 'rb').read()
if d[0x1FE:0x1FF] == b'\x00':
pass
setup_sects = d[0x1FE]
xload = struct.unpack_from('<H', d, 0x236)[0]
kern_ver = d[0x206:0x206+4]
flags = []
if xload & (1 << 0): flags.append('XLF_KERNEL_64 (64-битное ядро)')
if xload & (1 << 1): flags.append('XLF_CAN_BE_LOADED_ABOVE_4G')
if xload & (1 << 2): flags.append('XLF_EFI_HANDOVER_32 (может грузиться на 32-битной UEFI)')
if xload & (1 << 3): flags.append('XLF_EFI_HANDOVER_64')
if xload & (1 << 5): flags.append('XLF_EFI_KEXEC')
print('%-42s size=%-9d xloadflags=0x%04x kernel=%d.%d' %
(p.split('/')[-1], len(d), xload, kern_ver[0], kern_ver[1]))
for f in flags: print(' -', f)
EOF
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env python3
"""Check how the padded labels measure up (and why the tag column drifts)."""
import re
from PIL import ImageFont
CFG = '/path/to/pf/ParavisGrub/grub.cfg'
font = ImageFont.truetype('/tmp/Paravis.ttf', 18)
for line in open(CFG, encoding='utf-8'):
m = re.match(r'\s*menuentry "(.+?)" --hotkey=(\S+)', line)
if not m:
continue
label, hk = m.group(1), m.group(2)
w_all = font.getlength(label)
stripped = label.rstrip()
w_txt = font.getlength(stripped)
tag = re.search(r'\((\w+)\)$', stripped)
body = stripped[:tag.start()] if tag else stripped
w_body = font.getlength(body)
print('hk=%-2s total=%6.1f body=%6.1f tagstarts=%6.1f spaces=%2d %r' % (
hk, w_all, w_body, w_body, len(label) - len(stripped), stripped[:40]))
@@ -0,0 +1,28 @@
#!/bin/bash
BK="/path/to/pf/Ventoy/backup/xorboot-uefi/sign"
C=/path/to/pf/Ventoy/keys/ventoy.crt
cd "$BK"
printf '%-56s %10s %10s %-6s %s\n' file orig now sig sbat
bad=0
for rel in $(find . -type f -name '*.efi' | sort); do
src="$BK/$rel"; dst="/mnt/f/$rel"
[ -f "$dst" ] || { printf '%-56s MISSING\n' "$rel"; bad=1; continue; }
sig=NO; sbverify --cert "$C" "$dst" >/dev/null 2>&1 && sig=OK
sbat=$(python3 - "$dst" <<'EOF'
import struct,sys
d=open(sys.argv[1],'rb').read()
try:
pe=struct.unpack_from('<I',d,0x3c)[0]
n=struct.unpack_from('<H',d,pe+6)[0]
o=struct.unpack_from('<H',d,pe+20)[0]
t=pe+24+o
names=[d[t+i*40:t+i*40+8].rstrip(b'\0') for i in range(n)]
print('yes' if b'.sbat' in names else 'no')
except Exception:
print('err')
EOF
)
printf '%-56s %10s %10s %-6s %s\n' "$rel" "$(stat -c %s "$src")" "$(stat -c %s "$dst")" "$sig" "$sbat"
[ "$sig" = "OK" ] || bad=1
done
echo "bad=$bad"
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
cd /tmp && rm -rf icmp && mkdir icmp && cd icmp
cp "/mnt/f/Change_bootLoader.exe" new.exe
cp "/path/to/pf/Change_bootloader/Change_bootLoader.old-3.0.1.exe" old.exe 2>/dev/null || true
for f in old.exe new.exe; do
echo "== $f"
icotool -l "$f" 2>/dev/null | sed 's/^/ /' | head -10
done
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
cd /tmp/icmp || exit 1
for f in old.exe new.exe; do
echo "== $f"
if [ -f "$f" ]; then
wrestool -l "$f" 2>/dev/null | grep -E 'type=14|type=3' | sed 's/^/ /' | head -12
printf ' icon images: '
wrestool -l "$f" 2>/dev/null | grep -c 'type=3'
else
echo " (missing)"
fi
done
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
W=/root/icmp
rm -rf "$W"; mkdir -p "$W"; cd "$W"
cp -f "/mnt/f/Change_bootLoader.exe" new.exe
cp -f "/path/to/pf/Change_bootloader/Change_bootLoader.old-3.0.1.exe" old.exe
for f in old.exe new.exe; do
echo "== $f"
if [ ! -f "$f" ]; then echo " missing"; continue; fi
printf ' icon groups (type=14): '
wrestool -l "$f" 2>/dev/null | grep -c 'type=14' || true
printf ' icon images (type=3): '
wrestool -l "$f" 2>/dev/null | grep -c 'type=3' || true
wrestool -l "$f" 2>/dev/null | grep 'type=3' | head -6 | sed 's/^/ /'
done
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
set -e
K=/path/to/pf/Ventoy/keys
D=/path/to/pf/ParavisGrub
G=/mnt/f/efi/Paravis/Boot/grub2
echo "=== 1. memtest86+ 9.10 (built from git) -> signed"
if [ -f /tmp/mt86p/build/x86_64/mt86plus ]; then
cp -f /tmp/mt86p/build/x86_64/mt86plus /tmp/mt86p/mt86plus.efi
sbsign --key "$K/ventoy.key" --cert "$K/ventoy.crt" --output "$G/apps/memtest86p.efi" /tmp/mt86p/mt86plus.efi >/dev/null
sbverify --cert "$K/ventoy.crt" "$G/apps/memtest86p.efi"
ls -l "$G/apps/memtest86p.efi"
else
echo " !! build missing"
fi
rm -f "$G/apps/memtest86.efi"
echo "=== 2. generate menu files"
python3 "$D/gen_menu.py" "$D"
cp -f "$D/grub.cfg" "$G/grub.cfg"
mkdir -p "$G/menu"
cp -f "$D"/menu/*.cfg "$G/menu/"
ls -l "$G" "$G/menu" "$G/apps"
@@ -0,0 +1,31 @@
#!/bin/bash
set -e
K=/path/to/pf/Ventoy/keys
G=/path/to/pf/ParavisGrub
D=/mnt/f/efi/Paravis/Boot/grub2
APPS="$D/apps"
mkdir -p "$APPS"
echo "=== grub core"
cp -f "$G/grubx64.efi" "$D/grubx64.efi"
echo "=== sign helper EFI apps for chainloading under Secure Boot"
sign_app() {
local src="$1" dst="$2"
rm -f /tmp/a.efi /tmp/a2.efi
python3 /path/to/pf/Ventoy/add-sbat.py "$src" /tmp/a.efi >/dev/null
if sbattach --detach /tmp/old.p7 /tmp/a.efi >/dev/null 2>&1; then sbattach --remove /tmp/a.efi; fi
sbsign --key "$K/ventoy.key" --cert "$K/ventoy.crt" --output /tmp/a2.efi /tmp/a.efi >/dev/null
sbverify --cert "$K/ventoy.crt" /tmp/a2.efi >/dev/null
cp -f /tmp/a2.efi "$dst"
printf " %-16s %s\n" "$(basename "$dst")" "$(stat -c %s "$dst")"
}
sign_app /mnt/f/efi/Paravis/Boot/super/x64.efi "$APPS/super.efi"
sign_app /mnt/f/efi/Paravis/Boot/gfm/x64.efi "$APPS/gfm.efi"
sign_app /mnt/f/EFI/Boot/memtest.efi "$APPS/memtest.efi"
echo "=== font (for later theme)"
cp -f /path/to/pf/Ventoy/vtoyefi/grub/fonts/unicode.pf2 "$D/unicode.pf2"
echo "=== done, tree:"
ls -l "$D" "$APPS"
@@ -0,0 +1,7 @@
#!/bin/bash
for f in ADD ABA; do
echo "== $f /boot/grub/grub.cfg"
7z e -y -o/tmp/cfgchk "/mnt/f/efi/Paravis/Utilities/$f" 'boot/grub/grub.cfg' >/dev/null 2>&1
sed 's/^/ /' /tmp/cfgchk/grub.cfg 2>/dev/null
rm -f /tmp/cfgchk/grub.cfg
done
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
set -e
OUT=/path/to/pf/Change_bootloader
rm -rf /tmp/cb /tmp/cb.tgz
mkdir -p /tmp/cb "$OUT"
curl -sSL --max-time 180 "https://git.paravis.ru/Paravis_Flash/Change_bootloader/archive/master.tar.gz" -o /tmp/cb.tgz
tar -xzf /tmp/cb.tgz -C /tmp/cb
echo "--- repo files:"
find /tmp/cb -type f -printf '%P %s\n' | sort
echo "--- copying to $OUT"
cp -r /tmp/cb/change_bootloader/. "$OUT"/
ls -la "$OUT"
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
echo "=== PSD 2023:"
find "/mnt/d/NEED/my_project/PSD 2023" -maxdepth 3 | head -40
echo
echo "=== кандидаты-шрифты в vcpkg:"
ls /mnt/d/GIT/aspia_no2fa-3.0/vcpkg4aspia/buildtrees/harfbuzz/src/*/test/subset/data/fonts/ 2>/dev/null | grep -iE 'roboto|notosans|sourcesans|ubuntu|opensans|inter' | head -20
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
set -e
K=/path/to/pf/Ventoy/keys
G=/mnt/f/efi/Paravis/Boot/grub2
echo "=== PassMark MemTest86 (memtest.org) -> signed copy, NO .sbat"
cp -f /mnt/f/EFI/Boot/memtest.efi /tmp/mt.efi
sbsign --key "$K/ventoy.key" --cert "$K/ventoy.crt" --output "$G/apps/memtest86.efi" /tmp/mt.efi >/dev/null
sbverify --cert "$K/ventoy.crt" "$G/apps/memtest86.efi"
ls -l "$G/apps/memtest86.efi"
rm -f "$G/apps/memtest86p.efi" "$G/apps/memtest.efi"
echo "=== regenerate menu"
sed -i 's|apps/memtest86p.efi|apps/memtest86.efi|' /path/to/pf/ParavisGrub/gen_menu.py
python3 /path/to/pf/ParavisGrub/gen_menu.py > /path/to/pf/ParavisGrub/grub.cfg
cp -f /path/to/pf/ParavisGrub/grub.cfg "$G/grub.cfg"
echo "--- key lines:"
grep -nE 'subdir=|live-media-path=|Возврат|memtest|map --type' /path/to/pf/ParavisGrub/grub.cfg
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
# persist the a1ive grub tree on D: and inspect wimboot/ntboot usage
set -e
SRC=/tmp/g2/grub
OUT=/path/to/pf/grub2-a1ive
if [ -d "$SRC" ]; then
echo "--- copying release tree to $OUT"
rm -rf "$OUT"; mkdir -p "$OUT"
cp -a "$SRC" "$OUT/grub"
fi
G="$OUT/grub"
ls "$G" | head
for m in wimboot ntboot chain linux; do
echo "=== $m.mod"
if [ -f "$G/x86_64-efi/$m.mod" ]; then
strings -a -n 4 "$G/x86_64-efi/$m.mod" | head -40
else
echo " (no such module)"
fi
done
@@ -0,0 +1,10 @@
#!/bin/bash
G=/path/to/pf/grub2-a1ive/grub
echo "=== wimboot.mod readable strings:"
strings -a -n 6 "$G/x86_64-efi/wimboot.mod" | grep -avE '^[A-Za-z0-9_]{0,5}$' | head -60
echo
echo "=== full moddep entries for wimboot/ntboot:"
grep -aE '^wimboot|^ntboot' "$G/x86_64-efi/moddep.lst" 2>/dev/null
echo
echo "=== command.lst:"
grep -aE 'wimboot|ntboot' "$G/x86_64-efi/command.lst" 2>/dev/null
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
import sys, re
def around(path, needle, before=300, after=700):
d = open(path, 'rb').read()
i = d.find(needle)
if i < 0:
print(' (not found)')
return
chunk = d[max(0, i-before): i+after]
txt = re.sub(rb'[^\x09\x0a\x0d\x20-\x7e]+', b'\n', chunk).decode('latin1')
for line in txt.splitlines():
line = line.strip()
if line:
print(' ', line)
for path, needle in (
('/mnt/f/efi/Paravis/Boot/g4d/antiv', b'/efi/Paravis/KRD'),
('/mnt/f/efi/Paravis/Boot/g4d/acroDD', b'/efi/Paravis/Utilities/ADD'),
('/mnt/f/efi/Paravis/Boot/g4d/acroBA', b'/efi/Paravis/Utilities/ABA'),
('/mnt/f/efi/Paravis/Boot/g4d/phdm', b'/efi/Paravis/Utilities/phdm.krn'),
('/mnt/f/efi/Paravis/Boot/g4d/mint64r', b'/efi/Paravis/Linux/x64/vmlinuz'),
):
print('=====================', path.split('/')[-1])
around(path, needle)
print()
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash
D=/mnt/f/efi/Paravis/Boot/g4d
for f in mint64r mint64i phdm acroDD acroBA antiv Ventoy super mt dart linux; do
p="$D/$f"
[ -f "$p" ] || continue
echo "===================== $f"
echo "--- ascii hits:"
strings -a -n 5 "$p" | grep -aiE 'vmlinuz|initrd|squash|casper|k-x86|\.srm|kaspersky|acronis|paragon|phdm|memtest|ventoy|\.wim|\.iso|/efi|efi/|chainloader|ntboot|wimboot|bootmgr' | head -20
echo "--- utf16 hits:"
strings -a -e l -n 5 "$p" | grep -aiE 'vmlinuz|initrd|squash|casper|k-x86|\.srm|kaspersky|acronis|paragon|phdm|memtest|ventoy|\.wim|\.iso|/efi|efi/|chainloader|ntboot|bootmgr' | head -20
done
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
D=/mnt/f/efi/Paravis/Boot/g4d
echo "=== antiv (KRD) full menu lines:"
strings -a -n 4 "$D/antiv" | grep -aiE 'krd|kernel|initrd|srm|ksl|base|root|lang|:' | grep -aivE 'initrd_start|Create INITRD|Linux kernel must|initrd \[@name|initrdfs' | head -25
echo
echo "=== acroDD map/menu lines:"
strings -a -n 4 "$D/acroDD" | grep -aiE 'map|iso=|chainloader|root|find' | grep -aivE 'table not recognized|map %s|initrd' | head -20
echo
echo "=== ISO magic check (offset 0x8001):"
for f in ADD ABA; do
printf " %-6s " "$f"
dd if="$D/../Utilities/$f" bs=1 skip=32769 count=5 2>/dev/null | od -c | head -1
done
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
D=/mnt/f/efi/Paravis/Boot/g4d
for f in acroDD acroBA antiv util str nix off gfm UBCD mt super Ventoy dart; do
p="$D/$f"; [ -f "$p" ] || continue
echo "===================== $f"
strings -a -n 4 "$p" | grep -aE '^(set |map |kernel |initrd |chainloader|find |root |checkrange|default |title |if |echo |ls |cat )' | head -30
done
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
import sys, re
def dump_menu(path, needle=b'set ', span=1200):
d = open(path, 'rb').read()
i = d.find(needle)
if i < 0:
print(' (no marker)')
return
chunk = d[max(0, i-200): i+span]
txt = re.sub(rb'[^\x09\x0a\x0d\x20-\x7e]+', b'\n', chunk).decode('latin1')
for line in txt.splitlines():
line = line.strip()
if line:
print(' ', line)
for path in sys.argv[1:]:
print('=====================', path.split('/')[-1])
dump_menu(path)
print()
print('=== ISO magic at 0x8001:')
for p in ('/mnt/f/efi/Paravis/Utilities/ADD', '/mnt/f/efi/Paravis/Utilities/ABA'):
with open(p, 'rb') as f:
f.seek(32769); b = f.read(8)
print(' %-4s %r' % (p.split('/')[-1], b))
@@ -0,0 +1,15 @@
#!/bin/bash
set -e
OUT=/path/to/pf/grub2-a1ive
rm -rf "$OUT" /tmp/g2; mkdir -p "$OUT" /tmp/g2
curl -sSL --max-time 600 "https://github.com/a1ive/grub/releases/download/latest/grub2-latest.tar.gz" -o /tmp/g2.tgz
echo "size: $(stat -c %s /tmp/g2.tgz)"
file /tmp/g2.tgz
tar -xzf /tmp/g2.tgz -C /tmp/g2
echo "=== top level:"
find /tmp/g2 -maxdepth 2 -type d | head -20
echo "=== efi builds:"
find /tmp/g2 -maxdepth 2 -iname '*x86_64*' -o -maxdepth 2 -iname '*efi*' | head -20
echo "=== grub-mkimage / .mod presence:"
find /tmp/g2 -name 'grub-mkimage*' | head -5
find /tmp/g2 -name 'wimboot.mod' -o -name 'ntboot.mod' | head -5
@@ -0,0 +1,13 @@
#!/bin/bash
set -e
cd /tmp
rm -rf ag ag.tgz
curl -sSL --max-time 600 "https://github.com/a1ive/grub/archive/refs/heads/master.tar.gz" -o ag.tgz
echo "size: $(stat -c %s ag.tgz)"
tar -xzf ag.tgz
D=$(find /tmp -maxdepth 1 -type d -name 'grub-*' | head -1)
echo "src dir: $D"
echo "=== wimboot command definition:"
grep -rn 'grub_register_extcmd.*wimboot\|"wimboot"' "$D/grub-core" | head -10
echo "=== files:"
find "$D/grub-core" -name '*wimboot*' -o -name '*wim*' | head -20
@@ -0,0 +1,8 @@
#!/bin/bash
cd /tmp
rm -f font.c
curl -sSL --max-time 120 "https://raw.githubusercontent.com/rhboot/grub2/master/grub-core/font/font.c" -o font.c || true
[ -s font.c ] || curl -sSL --max-time 120 "https://git.savannah.gnu.org/cgit/grub.git/plain/grub-core/font/font.c" -o font.c
echo "size: $(stat -c %s font.c)"
echo "=== CHIX / DATA parsing:"
grep -n -A25 'CHIX' font.c | head -60
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
set -e
cd /tmp
rm -rf gfm gfm.tgz
curl -sSL --max-time 300 "https://github.com/a1ive/grub2-filemanager/archive/refs/heads/master.tar.gz" -o gfm.tgz
mkdir -p gfm && tar -xzf gfm.tgz -C gfm --strip-components=1
echo "=== ntboot usages:"
grep -rn 'ntboot' gfm --include='*.cfg' --include='*.lua' --include='*.sh' | head -15
echo "=== wimboot usages:"
grep -rn 'wimboot' gfm --include='*.cfg' --include='*.lua' | head -15
echo "=== efi chain examples:"
grep -rn 'chainloader' gfm --include='*.cfg' --include='*.lua' | head -10
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
for repo in a1ive/grub2-filemanager a1ive/grub; do
echo "=== $repo"
curl -sL --max-time 60 "https://api.github.com/repos/$repo/releases/latest" \
| python3 -c "import sys,json;
d=json.load(sys.stdin)
print('tag:', d.get('tag_name'), '|', d.get('name'))
for a in d.get('assets',[]): print(' ', a['name'], a['size'], a['browser_download_url'])" 2>&1 | head -20
done
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
curl -sL --max-time 60 "https://api.github.com/repos/memtest86plus/memtest86plus/releases/latest" \
| python3 -c "
import sys,json
d=json.load(sys.stdin)
print('tag:', d.get('tag_name'))
for a in d.get('assets',[]):
print(' %-40s %10d %s' % (a['name'], a['size'], a['browser_download_url']))
"
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
echo "=== releases (with assets):"
curl -sL --max-time 60 "https://api.github.com/repos/memtest86plus/memtest86plus/releases?per_page=10" \
| python3 -c "
import sys,json
for r in json.load(sys.stdin):
print('tag:', r.get('tag_name'), '| assets:', len(r.get('assets',[])))
for a in r.get('assets',[]):
print(' %-44s %10d' % (a['name'], a['size']))
print()
"
echo "=== repo tree (top):"
curl -sL --max-time 60 "https://api.github.com/repos/memtest86plus/memtest86plus/contents/" \
| python3 -c "
import sys,json
for e in json.load(sys.stdin):
print(' %-30s %s' % (e['name'], e['type']))
"
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
echo "=== supergrub releases:"
curl -sL --max-time 60 "https://api.github.com/repos/supergrub/supergrub/releases?per_page=5" \
| python3 -c "
import sys,json
for r in json.load(sys.stdin):
print('tag:', r.get('tag_name'), '|', r.get('name'))
for a in r.get('assets',[]):
print(' %-52s %10d' % (a['name'], a['size']))
print()
"
echo "=== ventoy language handling in grub.cfg:"
grep -n 'lang' /path/to/pf/Ventoy/vtoyefi/grub/grub.cfg | head -25
@@ -0,0 +1,12 @@
#!/bin/bash
cd /tmp
for f in grub-core/gfxmenu/gui_progress_bar.c grub-core/gfxmenu/gui_label.c grub-core/gfxmenu/gui_circular_progress.c grub-core/gfxmenu/view.c grub-core/font/font.c; do
out=$(echo "$f" | tr '/' '_')
[ -s "$out" ] || curl -sSL --max-time 120 "https://raw.githubusercontent.com/rhboot/grub2/master/$f" -o "$out" || true
done
echo "=== __timeout__ usage:"
grep -n '__timeout__\|timeout' grub-core_gfxmenu_gui_progress_bar.c grub-core_gfxmenu_view.c 2>/dev/null | head -20
echo "=== label text handling:"
grep -n 'text\|@' grub-core_gfxmenu_gui_label.c | head -30
echo "=== antialias in font.c:"
grep -in 'antialias\|alpha\|8-bit' grub-core_font_font.c | head -10
@@ -0,0 +1,26 @@
#!/bin/bash
W=/tmp/insp
rm -rf "$W"; mkdir -p "$W"
echo "=== memtest.efi:"
python3 - <<'EOF'
import struct
d=open('/mnt/f/EFI/Boot/memtest.efi','rb').read()
pe=struct.unpack_from('<I',d,0x3c)[0]
mach=struct.unpack_from('<H',d,pe+4)[0]
magic=struct.unpack_from('<H',d,pe+24)[0]
print(' machine 0x%x magic 0x%x size %d' % (mach, magic, len(d)))
import re
s=re.findall(rb'[ -~]{6,}', d[:400000])
for t in s[:15]: print(' ', t.decode('latin1'))
EOF
echo
echo "=== KRD initrd:"
cd "$W"
xz -dc /mnt/f/efi/Paravis/KRD/initrd.xz > krd.cpio 2>/dev/null || cp /mnt/f/efi/Paravis/KRD/initrd.xz krd.cpio
file krd.cpio
mkdir -p krd && ( cd krd && cpio -idm --quiet < ../krd.cpio 2>/dev/null || true )
ls krd | head -20
echo "--- init (first 80 lines):"
sed -n '1,80p' krd/init 2>/dev/null
@@ -0,0 +1,23 @@
#!/bin/bash
set -e
echo "=== deps"
apt-get install -y python3-pip python3-venv >/tmp/apt_pip.log 2>&1 || true
python3 -m pip install --quiet --break-system-packages psd-tools 2>/dev/null || true
echo "=== PSD layers (UEFI x64 main)"
python3 - <<'EOF'
from psd_tools import PSDImage
p = PSDImage.open('/path/to/pf/PSD/UEFI/x64/main/main.psd')
print('canvas: %dx%d mode=%s' % (p.width, p.height, p.color_mode))
for i, l in enumerate(p):
print(' %2d %-28s type=%-10s vis=%-5s bbox=%-24s op=%s' % (
i, (l.name or '')[:28], l.kind, l.visible, str(l.bbox), l.opacity))
EOF
echo
echo "=== Acronis 2024 ISO"
ISO=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
ls -l "$ISO"
xorriso -indev "$ISO" -report_el_torito plain 2>&1 | grep -E 'El Torito|Boot record|Volume id' | head -12
echo "--- EFI boot files:"
7z l -ba "$ISO" 2>/dev/null | grep -iE 'efi/boot/|bootx64|bootia32|shim|grub' | head -20
@@ -0,0 +1,7 @@
#!/bin/bash
for iso in /mnt/f/efi/Paravis/Utilities/ADD /mnt/f/efi/Paravis/Utilities/ABA; do
echo "===================== $(basename "$iso")"
xorriso -indev "$iso" -report_el_torito as_mkisofs 2>&1 | sed -n '1,40p'
echo "--- boot images:"
xorriso -indev "$iso" -report_el_torito plain 2>&1 | grep -iE 'El Torito|Boot record|boot image|platform|efi' | head -20
done
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
# Identify kernels by decompressing the bzImage payload and grepping "Linux version"
python3 - <<'EOF'
import glob, gzip, io, lzma, os, re, struct, zlib
def payload(d):
ss = d[0x1FE] or 4
return d[(ss + 1) * 512:]
def try_decompress(b):
for name, fn in (('gzip', lambda x: gzip.decompress(x)),
('xz', lambda x: lzma.decompress(x)),
('zlib', lambda x: zlib.decompress(x))):
try:
return fn(b), name
except Exception:
pass
return None, None
paths = []
for pat in ('ATI2025/dat10.dat', 'ATI2025/dat2.dat', 'ADDH12/dat14.dat', 'ADDH12/dat10.dat'):
paths.append('/path/to/pf/acronis/acr/ACR/' + pat)
for p in paths:
if not os.path.exists(p):
print(p, 'missing'); continue
d = open(p, 'rb').read()
body = payload(d)
out, kind = try_decompress(body)
ver = '?'
if out:
m = re.search(rb'Linux version ([0-9][^ \x00]{0,40})', out[:6_000_000])
if m:
ver = m.group(1).decode('latin1')
print('%-42s %-6s %s' % (p.split('ACR/')[-1], kind or 'raw', ver))
EOF
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
ISO=/mnt/f/efi/Paravis/Utilities/ADD
echo "=== all entries:"
7z l -ba "$ISO" 2>/dev/null | awk '{print $NF}' | head -30
echo "=== xorriso listing:"
xorriso -indev "$ISO" -find / 2>/dev/null | head -30
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
src='/tmp/k18a.ppm'; dst='/path/to/pf/KRD/krd18-test.png'
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w=int(parts[1]); h=int(parts[2]); px=d[i:i+w*h*3]
raw=b''.join(b'\x00'+px[y*w*3:(y+1)*w*3] for y in range(h))
def ch(t,dd):
c=t+dd
return struct.pack('>I',len(dd))+c+struct.pack('>I',zlib.crc32(c)&0xffffffff)
png=b'\x89PNG\r\n\x1a\n'+ch(b'IHDR',struct.pack('>IIBBBBB',w,h,8,2,0,0,0))+ch(b'IDAT',zlib.compress(raw,9))+ch(b'IEND',b'')
open(dst,'wb').write(png); print(dst,w,h)
EOF
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
src='/tmp/k32.ppm'; dst='/path/to/pf/KRD/xor32-krd-direct.png'
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w=int(parts[1]); h=int(parts[2]); px=d[i:i+w*h*3]
raw=b''.join(b'\x00'+px[y*w*3:(y+1)*w*3] for y in range(h))
def ch(t,dd):
c=t+dd
return struct.pack('>I',len(dd))+c+struct.pack('>I',zlib.crc32(c)&0xffffffff)
png=b'\x89PNG\r\n\x1a\n'+ch(b'IHDR',struct.pack('>IIBBBBB',w,h,8,2,0,0,0))+ch(b'IDAT',zlib.compress(raw,9))+ch(b'IEND',b'')
open(dst,'wb').write(png); print(dst,w,h)
EOF
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
src='/tmp/k32b.ppm'; dst='/path/to/pf/KRD/xor32-krd-direct2.png'
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w=int(parts[1]); h=int(parts[2]); px=d[i:i+w*h*3]
raw=b''.join(b'\x00'+px[y*w*3:(y+1)*w*3] for y in range(h))
def ch(t,dd):
c=t+dd
return struct.pack('>I',len(dd))+c+struct.pack('>I',zlib.crc32(c)&0xffffffff)
png=b'\x89PNG\r\n\x1a\n'+ch(b'IHDR',struct.pack('>IIBBBBB',w,h,8,2,0,0,0))+ch(b'IDAT',zlib.compress(raw,9))+ch(b'IEND',b'')
open(dst,'wb').write(png); print(dst,w,h)
EOF
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
src='/tmp/k32b.ppm'; dst='/path/to/pf/KRD/xor32-krd-text.png'
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w=int(parts[1]); h=int(parts[2]); px=d[i:i+w*h*3]
raw=b''.join(b'\x00'+px[y*w*3:(y+1)*w*3] for y in range(h))
def ch(t,dd):
c=t+dd
return struct.pack('>I',len(dd))+c+struct.pack('>I',zlib.crc32(c)&0xffffffff)
png=b'\x89PNG\r\n\x1a\n'+ch(b'IHDR',struct.pack('>IIBBBBB',w,h,8,2,0,0,0))+ch(b'IDAT',zlib.compress(raw,9))+ch(b'IEND',b'')
open(dst,'wb').write(png); print(dst,w,h)
EOF
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
src='/tmp/k32b.ppm'; dst='/path/to/pf/KRD/xor32-krd-video.png'
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w=int(parts[1]); h=int(parts[2]); px=d[i:i+w*h*3]
raw=b''.join(b'\x00'+px[y*w*3:(y+1)*w*3] for y in range(h))
def ch(t,dd):
c=t+dd
return struct.pack('>I',len(dd))+c+struct.pack('>I',zlib.crc32(c)&0xffffffff)
png=b'\x89PNG\r\n\x1a\n'+ch(b'IHDR',struct.pack('>IIBBBBB',w,h,8,2,0,0,0))+ch(b'IDAT',zlib.compress(raw,9))+ch(b'IEND',b'')
open(dst,'wb').write(png); print(dst,w,h)
EOF
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
src='/tmp/k64a.ppm'; dst='/path/to/pf/KRD/krd64-test.png'
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w=int(parts[1]); h=int(parts[2]); px=d[i:i+w*h*3]
raw=b''.join(b'\x00'+px[y*w*3:(y+1)*w*3] for y in range(h))
def ch(t,dd):
c=t+dd
return struct.pack('>I',len(dd))+c+struct.pack('>I',zlib.crc32(c)&0xffffffff)
png=b'\x89PNG\r\n\x1a\n'+ch(b'IHDR',struct.pack('>IIBBBBB',w,h,8,2,0,0,0))+ch(b'IDAT',zlib.compress(raw,9))+ch(b'IEND',b'')
open(dst,'wb').write(png); print(dst,w,h)
EOF
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
def ppm2png(src, dst):
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w = int(parts[1]); h = int(parts[2]); px = d[i:i+w*h*3]
raw = b''.join(b'\x00' + px[y*w*3:(y+1)*w*3] for y in range(h))
def chunk(t, dd):
c = t + dd
return struct.pack('>I', len(dd)) + c + struct.pack('>I', zlib.crc32(c) & 0xffffffff)
png = b'\x89PNG\r\n\x1a\n' + chunk(b'IHDR', struct.pack('>IIBBBBB', w, h, 8, 2, 0, 0, 0)) + chunk(b'IDAT', zlib.compress(raw, 9)) + chunk(b'IEND', b'')
open(dst, 'wb').write(png)
print(dst, w, h)
ppm2png('/tmp/x32-krd.ppm', '/path/to/pf/KRD/xor32-krd.png')
EOF
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
src='/tmp/xnk.ppm'; dst='/path/to/pf/KRD/x86nokrd.png'
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w=int(parts[1]); h=int(parts[2]); px=d[i:i+w*h*3]
raw=b''.join(b'\x00'+px[y*w*3:(y+1)*w*3] for y in range(h))
def ch(t,dd):
c=t+dd
return struct.pack('>I',len(dd))+c+struct.pack('>I',zlib.crc32(c)&0xffffffff)
png=b'\x89PNG\r\n\x1a\n'+ch(b'IHDR',struct.pack('>IIBBBBB',w,h,8,2,0,0,0))+ch(b'IDAT',zlib.compress(raw,9))+ch(b'IEND',b'')
open(dst,'wb').write(png); print(dst,w,h)
EOF
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
src='/tmp/xnk2.ppm'; dst='/path/to/pf/KRD/x86nokrd-nav.png'
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w=int(parts[1]); h=int(parts[2]); px=d[i:i+w*h*3]
raw=b''.join(b'\x00'+px[y*w*3:(y+1)*w*3] for y in range(h))
def ch(t,dd):
c=t+dd
return struct.pack('>I',len(dd))+c+struct.pack('>I',zlib.crc32(c)&0xffffffff)
png=b'\x89PNG\r\n\x1a\n'+ch(b'IHDR',struct.pack('>IIBBBBB',w,h,8,2,0,0,0))+ch(b'IDAT',zlib.compress(raw,9))+ch(b'IEND',b'')
open(dst,'wb').write(png); print(dst,w,h)
EOF
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
def ppm2png(src, dst):
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w = int(parts[1]); h = int(parts[2]); px = d[i:i+w*h*3]
raw = b''.join(b'\x00' + px[y*w*3:(y+1)*w*3] for y in range(h))
def chunk(t, dd):
c = t + dd
return struct.pack('>I', len(dd)) + c + struct.pack('>I', zlib.crc32(c) & 0xffffffff)
png = b'\x89PNG\r\n\x1a\n' + chunk(b'IHDR', struct.pack('>IIBBBBB', w, h, 8, 2, 0, 0, 0)) + chunk(b'IDAT', zlib.compress(raw, 9)) + chunk(b'IEND', b'')
open(dst, 'wb').write(png)
print(dst, w, h)
ppm2png('/tmp/qx2.ppm', '/path/to/pf/KRD/xor-uefi-1.png')
EOF
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
python3 - <<'EOF'
import zlib, struct
def ppm2png(src, dst):
d = open(src, 'rb').read()
parts = []; i = 0
while len(parts) < 4:
while d[i:i+1].isspace(): i += 1
j = i
while not d[j:j+1].isspace(): j += 1
parts.append(d[i:j]); i = j
i += 1
w = int(parts[1]); h = int(parts[2]); px = d[i:i+w*h*3]
raw = b''.join(b'\x00' + px[y*w*3:(y+1)*w*3] for y in range(h))
def chunk(t, dd):
c = t + dd
return struct.pack('>I', len(dd)) + c + struct.pack('>I', zlib.crc32(c) & 0xffffffff)
png = b'\x89PNG\r\n\x1a\n' + chunk(b'IHDR', struct.pack('>IIBBBBB', w, h, 8, 2, 0, 0, 0)) + chunk(b'IDAT', zlib.compress(raw, 9)) + chunk(b'IEND', b'')
open(dst, 'wb').write(png)
print(dst, w, h)
ppm2png('/tmp/qx3.ppm', '/path/to/pf/KRD/xor-uefi-3.png')
EOF
+37
View File
@@ -0,0 +1,37 @@
#!/bin/bash
set -e
W=/tmp/armtest
rm -rf $W && mkdir -p $W && cd $W
dd if=/dev/zero of=p1.img bs=1M count=48 status=none
dd if=/dev/zero of=p2.img bs=1M count=128 status=none
mkfs.vfat -F 32 -n ESP p1.img >/dev/null
mkfs.vfat -F 32 -n GRUB p2.img >/dev/null
mkdir -p t1/EFI/BOOT
cp /path/to/pf/Ventoy/grubia32.efi.signed /dev/null 2>/dev/null || true
cp "$(ls -1 /path/to/pf/Ventoy/BOOTAA64* 2>/dev/null | head -1)" t1/EFI/BOOT/BOOTAA64.EFI 2>/dev/null || true
if [ ! -f t1/EFI/BOOT/BOOTAA64.EFI ]; then
echo "no BOOTAA64 source; abort"
exit 1
fi
mcopy -i p1.img -s t1/EFI ::/
mkdir -p t2
cp -a /path/to/pf/Ventoy/vtoyefi/grub t2/grub
printf 'echo HELLO-ARM64-OK\nsleep 5\n' > t2/grub/grub.cfg
mcopy -i p2.img -s t2/grub ::/
dd if=/dev/zero of=disk.img bs=1M count=192 status=none
parted -s disk.img mklabel msdos
parted -s disk.img mkpart primary fat32 1MiB 49MiB
parted -s disk.img mkpart primary fat32 49MiB 177MiB
parted -s disk.img set 1 boot on
dd if=p1.img of=disk.img bs=1M seek=1 conv=notrunc status=none
dd if=p2.img of=disk.img bs=1M seek=49 conv=notrunc status=none
echo "=== boot aarch64:"
timeout 60 qemu-system-aarch64 -M virt -cpu cortex-a57 -m 1024 -nographic -no-reboot \
-bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \
-drive file=disk.img,format=raw,if=none,id=hd0 \
-device virtio-blk-device,drive=hd0 2>&1 | tail -30
@@ -0,0 +1,13 @@
#!/bin/bash
C=/path/to/pf/Ventoy/keys/ventoy.crt
echo "=== deployed files on p1:"
for f in /mnt/f/EFI/Boot/fbx64.efi /mnt/f/EFI/Boot/bootx64.efi /mnt/f/efi/Paravis/Boot/xor/UEFI/bootx64.efi; do
printf '%-46s ' "${f#/mnt/f/}"
if sbverify --cert "$C" "$f" >/dev/null 2>&1; then echo "our signature OK"; else echo "FAIL"; fi
done
echo
echo "=== sha256 (deployed vs staging):"
sha256sum /mnt/f/EFI/Boot/fbx64.efi /path/to/pf/Ventoy/xorboot/fbx64-xor.efi
echo
echo "=== cert: subject / key usage / basic constraints / validity"
openssl x509 -in "$C" -noout -subject -dates -ext keyUsage,extendedKeyUsage,basicConstraints
@@ -0,0 +1,8 @@
#!/bin/bash
for f in ADD ABA; do
rm -f /tmp/e.img
xorriso -osirrox on -indev "/mnt/f/efi/Paravis/Utilities/$f" -extract /efi.img /tmp/e.img >/dev/null 2>&1
printf ' %-4s %-28s ' "$f" "$(file -b /tmp/e.img)"
mdir -i /tmp/e.img ::/EFI/BOOT 2>/dev/null | grep -oE 'BOOT(IA32|X64) +EFI' | tr '\n' ' '
echo
done
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
for f in ADD ABA; do
printf ' %-4s tree: ' "$f"
7z l -ba "/mnt/f/efi/Paravis/Utilities/$f" 2>/dev/null | grep -oE 'EFI/BOOT/BOOT(IA32|X64)\.EFI' | tr '\n' ' '
echo
done
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
C=/path/to/pf/Ventoy/keys/ventoy.crt
for f in /mnt/f/efi/Paravis/Boot/gfm/x86.efi /mnt/f/efi/Paravis/Boot/super/x86.efi /mnt/f/efi/Paravis/Boot/gfm/x64.efi /mnt/f/efi/Paravis/Boot/super/x64.efi; do
printf '%-46s ' "${f#/mnt/f/}"
if sbverify --cert "$C" "$f" >/dev/null 2>&1; then echo OK; else echo FAIL; fi
done
@@ -0,0 +1,7 @@
#!/bin/bash
SRC=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
W=/tmp/menulst
rm -rf $W; mkdir -p $W
7z e -y -o$W "$SRC" 'boot/grub/menu.lst' 'boot/grub/grub.cfg' >/dev/null 2>&1
echo "=== ATI2025 / ADDH12 / ACPH entries in menu.lst:"
grep -n -i -A6 -E 'ATI2025|ADDH12|ACPH|True Image 2025|Disk Director' $W/menu.lst | head -80
@@ -0,0 +1,22 @@
#!/bin/bash
ISO=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
W=/tmp/acr
rm -rf $W; mkdir -p $W
echo "=== top level:"
7z l -ba "$ISO" 2>/dev/null | awk '{print $NF}' | cut -d/ -f1 | sort -u | head -20
echo "=== ACR products:"
7z l -ba "$ISO" 2>/dev/null | awk '{print $NF}' | grep -i '^ACR/' | cut -d/ -f1-2 | sort -u | head -40
echo "=== boot/grub/grub.cfg:"
7z e -y -o$W "$ISO" 'boot/grub/grub.cfg' >/dev/null 2>&1
sed -n '1,120p' $W/grub.cfg 2>/dev/null
echo "=== efi loaders:"
7z e -y -o$W "$ISO" 'efi/boot/bootx64.efi' 'efi/boot/grubx64.efi' >/dev/null 2>&1
ls -l $W/*.efi 2>/dev/null
for f in $W/*.efi; do
printf ' %-14s ' "$(basename "$f")"
sbverify --list "$f" 2>/dev/null | tr '\n' ' ' | cut -c1-140; echo
done
@@ -0,0 +1,14 @@
#!/bin/bash
ISO=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
W=/tmp/acr
echo "=== rest of grub.cfg (120+):"
sed -n '120,260p' $W/grub.cfg
echo
echo "=== ATI2025 / DD dirs content:"
for d in ATI2025 ADDH12 ADD12; do
echo "--- ACR/$d"
7z l -ba "$ISO" 2>/dev/null | awk -v p="ACR/$d/" '$NF ~ "^"p {printf " %-40s %10d\n", $NF, $4}' | head -12
tot=$(7z l -ba "$ISO" 2>/dev/null | awk -v p="ACR/$d/" '$NF ~ "^"p {s+=$4} END{print s}')
echo " total: $((tot/1024/1024)) MB"
done
@@ -0,0 +1,11 @@
#!/bin/bash
set -e
W=/path/to/pf/acronis
for d in ADD ABA; do
iso="/mnt/f/efi/Paravis/Utilities/$d"
out="$W/$d.boot"
rm -rf "$out"; mkdir -p "$out"
echo "===================== $d"
xorriso -indev "$iso" -osirrox on -extract_boot_images "$out" 2>&1 | grep -viE 'update|note|warning|sorry|sorry' | head -10
ls -l "$out"
done
@@ -0,0 +1,20 @@
#!/bin/bash
set -e
W=/path/to/pf/acronis
O="$W/orig"
mkdir -p "$O"
for d in ADD ABA; do
dst="/mnt/f/efi/Paravis/Utilities/$d"
[ -f "$O/$d" ] || cp -f "$dst" "$O/$d"
cp -f "$W/$d.rebuilt.iso" "$dst"
printf "%-4s %s bytes\n" "$d" "$(stat -c %s "$dst")"
done
echo "--- signatures inside the new ISOs:"
for d in ADD ABA; do
rm -rf /tmp/chk; mkdir -p /tmp/chk
7z e -y -o/tmp/chk "/mnt/f/efi/Paravis/Utilities/$d" 'efi/boot/bootx64.efi' >/dev/null
printf " %-4s " "$d"
sbverify --cert /path/to/pf/Ventoy/keys/ventoy.crt /tmp/chk/bootx64.efi >/dev/null 2>&1 && echo "our signature OK" || echo "SIGNATURE PROBLEM"
done
@@ -0,0 +1,8 @@
#!/bin/bash
W=/path/to/pf/acronis
for d in ADD ABA; do
echo "===================== $d : efi files"
find "$W/$d" -iname '*.efi' -printf ' %-46P %10s\n' | sort
echo "--- cfg/xml next to loader:"
find "$W/$d" -maxdepth 2 -iname '*.xml' -o -maxdepth 2 -iname '*.cfg' | sed 's/^/ /'
done
@@ -0,0 +1,16 @@
#!/bin/bash
set -e
W=/path/to/pf/acronis
rm -rf "$W"; mkdir -p "$W/ADD" "$W/ABA"
echo "=== extracting"
7z x -y -o"$W/ADD" "/mnt/f/efi/Paravis/Utilities/ADD" >/dev/null
7z x -y -o"$W/ABA" "/mnt/f/efi/Paravis/Utilities/ABA" >/dev/null
for d in ADD ABA; do
echo "===================== $d"
echo "--- size of tree:"; du -sh "$W/$d" | cut -f1
echo "--- [BOOT] and efi:"; ls -l "$W/$d/[BOOT]" 2>/dev/null; ls -l "$W/$d/efi/boot" 2>/dev/null
echo "--- hashes:"
( cd "$W/$d" && sha256sum efi/boot/bootx64.efi 2>/dev/null; sha256sum "Recovery Manager/bootwiz64.efi" 2>/dev/null || true )
done
@@ -0,0 +1,37 @@
#!/bin/bash
set -e
W=/path/to/pf/acronis
K=/path/to/pf/Ventoy/keys
for d in ADD ABA; do
echo "===================== $d"
T="$W/$d"
# 1. BIOS el-torito image goes into the tree so xorriso can reference it
cp -f "$W/$d.boot/eltorito_img1_bios.img" "$T/[BOOT]/bios.img"
# 2. sign the UEFI loader(s) in place
sign() {
local f="$1"
rm -f /tmp/s.efi
sbsign --key "$K/ventoy.key" --cert "$K/ventoy.crt" --output /tmp/s.efi "$f" >/dev/null 2>&1 \
|| { echo " sign failed: $f"; return; }
sbverify --cert "$K/ventoy.crt" /tmp/s.efi >/dev/null 2>&1 \
|| { echo " verify failed: $f"; return; }
cp -f /tmp/s.efi "$f"
printf " signed %-40s %s\n" "${f#$T/}" "$(stat -c %s "$f")"
}
sign "$T/efi/boot/bootx64.efi"
[ -f "$T/Recovery Manager/bootwiz64.efi" ] && sign "$T/Recovery Manager/bootwiz64.efi"
sign "$T/efi/boot/bootia32.efi"
# 3. rebuild
out="$W/$d.rebuilt.iso"
rm -f "$out"
xorriso -as mkisofs -V ACRONIS_MEDIA -R -J -joliet-long \
-b '[BOOT]/bios.img' -no-emul-boot -boot-load-size 4 \
-eltorito-alt-boot -e 'efi/boot/bootx64.efi' -no-emul-boot \
-o "$out" "$T" 2>&1 | tail -5
echo " result: $(stat -c %s "$out") bytes"
xorriso -indev "$out" -report_el_torito plain 2>&1 | grep -E 'El Torito (boot img|img blks)' | sed 's/^/ /'
done
@@ -0,0 +1,76 @@
#!/bin/bash
# Hybrid Acronis images: x64 set (our GRUB2 menu) + x86 set (xorboot/ia32).
# EFI boot image carries an i386 GRUB that boots the 32-bit kernel, so
# 32-bit UEFI firmware works too. BIOS El Torito is kept for legacy.
set -e
SRC=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
OUT=/path/to/pf/acronis/hybrid
W=/root/hybrid
rm -rf "$W"; mkdir -p "$W" "$OUT"
apt-get install -y grub-pc-bin grub-efi-amd64-bin grub-efi-ia32-bin mtools xorriso >/tmp/apt4.log 2>&1 || true
build_one() {
local name="$1" dir="$2" k64="$3" i64="$4" k32="$5" i32="$6"
local tree="$W/$name"
mkdir -p "$tree/$dir" "$tree/efi/boot" "$tree/EFI/BOOT" "$tree/boot/grub"
echo "=== $name : $dir"
7z e -y -o"$tree/$dir" "$SRC" \
"ACR/$dir/$k64" $(for i in $i64; do echo "ACR/$dir/$i"; done) \
"ACR/$dir/$k32" $(for i in $i32; do echo "ACR/$dir/$i"; done) >/dev/null
du -sh "$tree/$dir"
# ---- configs
cat > "$W/$name.32.cfg" <<EOF
search --no-floppy --set=root --file /$dir/$k32
linux /$dir/$k32 vga=791 mbrcrcs=on force_modules=usbhid lang=ru quiet
initrd $(for i in $i32; do echo -n "/$dir/$i "; done)
boot
EOF
cat > "$W/$name.64.cfg" <<EOF
search --no-floppy --set=root --file /$dir/$k64
linux /$dir/$k64 vga=791 mbrcrcs=on force_modules=usbhid lang=ru quiet
initrd $(for i in $i64; do echo -n "/$dir/$i "; done)
boot
EOF
MODS="linux normal iso9660 search search_label search_fs_file part_msdos echo test"
grub-mkimage -O i386-efi -o "$W/BOOTIA32.EFI" -p /boot/grub -d /usr/lib/grub/i386-efi -c "$W/$name.32.cfg" $MODS
grub-mkimage -O x86_64-efi -o "$W/BOOTX64.EFI" -p /boot/grub -d /usr/lib/grub/x86_64-efi -c "$W/$name.64.cfg" $MODS
# lowercase copy for xorboot (old Acronis layout) and uppercase for firmware
cp -f "$W/BOOTIA32.EFI" "$tree/efi/boot/bootia32.efi"
cp -f "$W/BOOTX64.EFI" "$tree/efi/boot/bootx64.efi"
cp -f "$W/BOOTIA32.EFI" "$tree/EFI/BOOT/BOOTIA32.EFI"
cp -f "$W/BOOTX64.EFI" "$tree/EFI/BOOT/BOOTX64.EFI"
# ---- EFI boot image (FAT12, both loaders)
dd if=/dev/zero of="$tree/efi.img" bs=1k count=1440 status=none
mkfs.vfat -F 12 -n EFI "$tree/efi.img" >/dev/null
mmd -i "$tree/efi.img" ::/EFI ::/EFI/BOOT
mcopy -i "$tree/efi.img" "$W/BOOTIA32.EFI" ::/EFI/BOOT/BOOTIA32.EFI
mcopy -i "$tree/efi.img" "$W/BOOTIA32.EFI" ::/EFI/BOOT/BOOTX64.EFI # xorboot looks for this name
mcopy -i "$tree/efi.img" "$W/BOOTX64.EFI" ::/EFI/BOOT/BOOTX64X.EFI >/dev/null 2>&1 || true
# ---- base image (BIOS El Torito comes from grub-mkrescue)
grub-mkrescue -o "$W/$name.base.iso" "$tree" >/tmp/mk_$name.log 2>&1
xorriso -osirrox on -indev "$W/$name.base.iso" \
-extract /boot/grub/i386-pc/eltorito.img "$tree/boot/grub/i386-pc/eltorito.img" >/dev/null 2>&1
# ---- final ISO (Rock Ridge + Joliet so lowercase paths are visible)
xorriso -as mkisofs -R -J -joliet-long -V PARAVIS_ACRONIS -o "$OUT/$name.iso" \
-b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e efi.img -no-emul-boot \
"$tree" >/tmp/xor_$name.log 2>&1
printf " -> %s: %s bytes\n" "$name" "$(stat -c %s "$OUT/$name.iso")"
xorriso -indev "$OUT/$name.iso" -report_el_torito plain 2>&1 | grep -E 'El Torito boot img' | sed 's/^/ /'
printf " tree: "; 7z l -ba "$OUT/$name.iso" 2>/dev/null | grep -oE '(efi|EFI)/boot/[Bb][Oo][Oo][Tt](IA32|X64|ia32|x64)\.efi' | tr '\n' ' '; echo
}
# ADD = True Image 2025 : x64 dat10/11/12, x86 dat2/3/4
build_one ADD ATI2025 dat10.dat "dat11.dat dat12.dat" dat2.dat "dat3.dat dat4.dat"
# ABA = Disk Director 12.5 : x64 dat14/15/16, x86 dat10/11/12
build_one ABA ADDH12 dat14.dat "dat15.dat dat16.dat" dat10.dat "dat11.dat dat12.dat"
ls -l "$OUT"
@@ -0,0 +1,59 @@
#!/bin/bash
# Rebuild ADD/ABA images with a dual-arch EFI boot image (x64 + ia32).
set -e
W=/tmp/acrbuild2
OLD=/path/to/pf/acronis/prev # previous images (mkrescue, BIOS+boot x64)
rm -rf "$W"; mkdir -p "$W"
apt-get install -y grub-efi-ia32-bin grub-efi-amd64-bin grub-pc-bin mtools xorriso >/tmp/apt2.log 2>&1 || true
build_one() {
local name="$1" srcdir="$2" kernel="$3" initrds="$4"
local tree="$W/$name"
mkdir -p "$tree/boot/grub/i386-pc" "$tree/$srcdir"
echo "=== $name ($srcdir)"
# source files: take from the existing image to avoid re-extracting from the 4.4G ISO
xorriso -osirrox on -indev "/tmp/acrbuild/$name.iso" \
-extract "/$srcdir" "$tree/$srcdir" >/dev/null 2>&1
xorriso -osirrox on -indev "/tmp/acrbuild/$name.iso" \
-extract /boot/grub/i386-pc/eltorito.img "$tree/boot/grub/i386-pc/eltorito.img" >/dev/null 2>&1
cat > "$W/$name.cfg" <<EOF
search --no-floppy --set=root --file /$srcdir/$kernel
linux /$srcdir/$kernel force_modules=usbhid quiet lang=RU_ru
initrd $(for i in $initrds; do echo -n "/$srcdir/$i "; done)
boot
EOF
local mods64="linux normal iso9660 search search_label search_fs_file part_msdos echo test"
local mods32="$mods64"
grub-mkimage -O x86_64-efi -o "$W/BOOTX64.EFI" -p /boot/grub -d /usr/lib/grub/x86_64-efi -c "$W/$name.cfg" $mods64
grub-mkimage -O i386-efi -o "$W/BOOTIA32.EFI" -p /boot/grub -d /usr/lib/grub/i386-efi -c "$W/$name.cfg" $mods32
ls -l "$W/BOOTX64.EFI" "$W/BOOTIA32.EFI"
# FAT image with both loaders
rm -f "$W/efi.img"
dd if=/dev/zero of="$W/efi.img" bs=1M count=16 status=none
mkfs.vfat -n EFI "$W/efi.img" >/dev/null
mmd -i "$W/efi.img" ::/EFI ::/EFI/BOOT
mcopy -i "$W/efi.img" "$W/BOOTX64.EFI" ::/EFI/BOOT/BOOTX64.EFI
mcopy -i "$W/efi.img" "$W/BOOTIA32.EFI" ::/EFI/BOOT/BOOTIA32.EFI
mdir -i "$W/efi.img" ::/EFI/BOOT
cp -f "$W/efi.img" "$tree/efi.img"
xorriso -as mkisofs -o "$W/$name.iso" \
-b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e efi.img -no-emul-boot \
"$tree" >/tmp/xorriso_$name.log 2>&1 || { tail -10 /tmp/xorriso_$name.log; return 1; }
printf " -> %s.iso : %s bytes\n" "$name" "$(stat -c %s "$W/$name.iso")"
xorriso -indev "$W/$name.iso" -report_el_torito plain 2>&1 | grep -E 'El Torito boot img' | sed 's/^/ /'
echo -n " efi.img contents: "
xorriso -osirrox on -indev "$W/$name.iso" -extract /efi.img /tmp/chk_efi.img >/dev/null 2>&1
mdir -i /tmp/chk_efi.img ::/EFI/BOOT | tr '\n' ' '; echo
}
build_one ADD ATI2025 dat10.dat "dat11.dat dat12.dat"
build_one ABA ADDH12 dat14.dat "dat15.dat dat16.dat"
@@ -0,0 +1,37 @@
#!/bin/bash
# Build new single-file bootable images for Acronis TI 2025 (ADD) and
# Disk Director 12.5 (ABA), keeping the old file names/paths so that the
# legacy (grub4dos/xorboot) menu keeps working unchanged.
set -e
ISO=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
W=/tmp/acrbuild
rm -rf "$W"; mkdir -p "$W"
apt-get install -y grub-pc-bin grub-efi-amd64-bin mtools xorriso >/tmp/apt_grubiso.log 2>&1 || true
build_one() {
local name="$1" srcdir="$2" kernel="$3" initrds="$4"
local tree="$W/$name"
mkdir -p "$tree/boot/grub" "$tree/$srcdir"
echo "=== $name: extracting $srcdir"
7z e -y -o"$tree/$srcdir" "$ISO" "ACR/$srcdir/$kernel" $(for i in $initrds; do echo "ACR/$srcdir/$i"; done) >/dev/null
ls -l "$tree/$srcdir" | tail -3
cat > "$tree/boot/grub/grub.cfg" <<EOF
set timeout=0
set default=0
menuentry "Acronis" {
linux /$srcdir/$kernel force_modules=usbhid quiet lang=RU_ru
initrd $(for i in $initrds; do echo -n "/$srcdir/$i "; done)
}
EOF
grub-mkrescue -o "$W/$name.iso" "$tree" >/tmp/mkrescue_$name.log 2>&1 || { tail -5 /tmp/mkrescue_$name.log; return 1; }
printf " -> %s : %s bytes\n" "$name" "$(stat -c %s "$W/$name.iso")"
xorriso -indev "$W/$name.iso" -report_el_torito plain 2>&1 | grep -E 'El Torito boot img' | sed 's/^/ /'
}
build_one ADD ATI2025 dat10.dat "dat11.dat dat12.dat"
build_one ABA ADDH12 dat14.dat "dat15.dat dat16.dat"
ls -l "$W"/*.iso
@@ -0,0 +1,77 @@
#!/bin/bash
# Rebuild Acronis component images (self-contained: source ISO on D:).
# Result: D:/PF2026/acronis/new/{ADD,ABA}.iso with BIOS + dual-arch EFI.
set -e
SRC=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
OUT=/path/to/pf/acronis/new
W=/root/acrbuild
rm -rf "$W"; mkdir -p "$W" "$OUT"
apt-get install -y grub-pc-bin grub-efi-amd64-bin grub-efi-ia32-bin mtools xorriso >/tmp/apt3.log 2>&1 || true
build_one() {
local name="$1" srcdir="$2" kernel="$3" initrds="$4"
local tree="$W/$name"
mkdir -p "$tree/$srcdir"
echo "=== $name : ACR/$srcdir"
7z e -y -o"$tree/$srcdir" "$SRC" "ACR/$srcdir/$kernel" $(for i in $initrds; do echo "ACR/$srcdir/$i"; done) >/dev/null
ls -l "$tree/$srcdir" | tail -4
mkdir -p "$tree/boot/grub"
cat > "$tree/boot/grub/grub.cfg" <<EOF
set timeout=0
set default=0
menuentry "Acronis" {
linux /$srcdir/$kernel force_modules=usbhid quiet lang=RU_ru
initrd $(for i in $initrds; do echo -n "/$srcdir/$i "; done)
}
EOF
# 1. base image: BIOS boot (grub-pc) + x64 EFI, from grub-mkrescue
grub-mkrescue -o "$W/$name.base.iso" "$tree" >/tmp/mk_$name.log 2>&1
xorriso -osirrox on -indev "$W/$name.base.iso" \
-extract /boot/grub/i386-pc/eltorito.img "$tree/boot/grub/i386-pc/eltorito.img" >/dev/null 2>&1
# 2. our own EFI boot image with BOTH loaders
cat > "$W/$name.cfg" <<EOF
search --no-floppy --set=root --file /$srcdir/$kernel
linux /$srcdir/$kernel force_modules=usbhid quiet lang=RU_ru
initrd $(for i in $initrds; do echo -n "/$srcdir/$i "; done)
boot
EOF
grub-mkimage -O x86_64-efi -o "$W/BOOTX64.EFI" -p /boot/grub \
-d /usr/lib/grub/x86_64-efi -c "$W/$name.cfg" \
linux normal iso9660 search search_label search_fs_file part_msdos echo test
grub-mkimage -O i386-efi -o "$W/BOOTIA32.EFI" -p /boot/grub \
-d /usr/lib/grub/i386-efi -c "$W/$name.cfg" \
linux normal iso9660 search search_label search_fs_file part_msdos echo test
# xorboot may look for the loader in the ISO tree too
mkdir -p "$tree/EFI/BOOT"
# xorboot (ia32) looks for the hardcoded name "bootx64.efi" - give it the 32-bit loader
cp -f "$W/BOOTIA32.EFI" "$tree/EFI/BOOT/BOOTIA32.EFI"
cp -f "$W/BOOTIA32.EFI" "$tree/EFI/BOOT/BOOTX64.EFI"
dd if=/dev/zero of="$tree/efi.img" bs=1k count=1440 status=none
mkfs.vfat -F 12 -n EFI "$tree/efi.img" >/dev/null
mmd -i "$tree/efi.img" ::/EFI ::/EFI/BOOT
mcopy -i "$tree/efi.img" "$W/BOOTIA32.EFI" ::/EFI/BOOT/BOOTIA32.EFI
mcopy -i "$tree/efi.img" "$W/BOOTIA32.EFI" ::/EFI/BOOT/BOOTX64.EFI
# 3. final ISO: BIOS from grub-pc + our dual EFI image
xorriso -as mkisofs -o "$OUT/$name.iso" \
-b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e efi.img -no-emul-boot \
"$tree" >/tmp/xor_$name.log 2>&1
printf " -> %s.iso %s bytes\n" "$name" "$(stat -c %s "$OUT/$name.iso")"
xorriso -indev "$OUT/$name.iso" -report_el_torito plain 2>&1 | grep -E 'El Torito boot img' | sed 's/^/ /'
rm -f /tmp/e.img
xorriso -osirrox on -indev "$OUT/$name.iso" -extract /efi.img /tmp/e.img >/dev/null 2>&1
printf " efi.img: "; mdir -i /tmp/e.img ::/EFI/BOOT | grep -oE 'BOOT(IA32|X64) +EFI' | tr '\n' ' '; echo
}
build_one ADD ATI2025 dat10.dat "dat11.dat dat12.dat"
build_one ABA ADDH12 dat14.dat "dat15.dat dat16.dat"
ls -l "$OUT"
@@ -0,0 +1,66 @@
#!/bin/bash
# Merged Acronis images: one file per product.
# tree : old Acronis ISO content + new Acronis kernel sets
# BIOS : grub-pc image -> new Acronis (32-bit kernel, like their own menu)
# UEFI : ORIGINAL old Acronis EFI image -> ia32/xorboot boots old Acronis
set -e
SRC=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
OLD=/path/to/pf/acronis/orig
OUT=/path/to/pf/acronis/merged
W=/root/merged
rm -rf "$W"; mkdir -p "$W" "$OUT"
apt-get install -y grub-pc-bin grub-efi-amd64-bin grub-efi-ia32-bin mtools xorriso >/tmp/apt5.log 2>&1 || true
build_one() {
local name="$1" dir="$2" k32="$3" i32="$4" k64="$5" i64="$6"
local tree="$W/$name"
echo "=== $name"
mkdir -p "$tree" "$tree/$dir" "$W/$name.boot" "$tree/boot/grub/i386-pc"
# 1. old ISO content (this is what ia32 boots through its own loader)
xorriso -osirrox on -indev "$OLD/$name" -extract / "$tree" >/dev/null 2>&1
# 2. new kernel sets from the 2024 collection
7z e -y -o"$tree/$dir" "$SRC" \
"ACR/$dir/$k32" $(for i in $i32; do echo "ACR/$dir/$i"; done) \
"ACR/$dir/$k64" $(for i in $i64; do echo "ACR/$dir/$i"; done) >/dev/null
echo " old tree files: $(find "$tree" -type f | wc -l)"
# 3. BIOS menu -> new Acronis (same cmdline as their grub4dos menu)
cat > "$tree/boot/grub/grub.cfg" <<EOF
set timeout=0
set default=0
menuentry "Acronis" {
linux /$dir/$k32 vga=791 mbrcrcs=on force_modules=usbhid lang=ru quiet
initrd $(for i in $i32; do echo -n "/$dir/$i "; done)
}
EOF
# 4. BIOS El Torito image from grub-mkrescue
grub-mkrescue -o "$W/$name.base.iso" "$tree" >/tmp/mk_$name.log 2>&1
xorriso -osirrox on -indev "$W/$name.base.iso" \
-extract /boot/grub/i386-pc/eltorito.img "$tree/boot/grub/i386-pc/eltorito.img" >/dev/null 2>&1
# 5. ORIGINAL EFI image of the old ISO (acronis bootwiz) -> ia32 path stays intact
xorriso -osirrox on -indev "$OLD/$name" -extract_boot_images "$W/$name.boot" >/dev/null 2>&1
local efiimg
efiimg=$(ls "$W/$name.boot"/*uefi*.img 2>/dev/null | head -1)
cp -f "$efiimg" "$tree/efi_old.img"
# 6. final ISO
xorriso -as mkisofs -R -J -joliet-long -V PARAVIS_ACRONIS -o "$OUT/$name.iso" \
-b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e efi_old.img -no-emul-boot \
"$tree" >/tmp/xor_$name.log 2>&1 || { tail -8 /tmp/xor_$name.log; return 1; }
printf " -> %s: %s bytes (%s MB)\n" "$name" \
"$(stat -c %s "$OUT/$name.iso")" "$(( $(stat -c %s "$OUT/$name.iso") / 1048576 ))"
xorriso -indev "$OUT/$name.iso" -report_el_torito plain 2>&1 | grep -E 'El Torito boot img' | sed 's/^/ /'
echo -n " old loader present: "; 7z l -ba "$OUT/$name.iso" 2>/dev/null | grep -c -iE 'efi/boot/bootia32\.efi' || true
}
build_one ADD ATI2025 dat2.dat "dat3.dat dat4.dat" dat10.dat "dat11.dat dat12.dat"
build_one ABA ADDH12 dat10.dat "dat11.dat dat12.dat" dat14.dat "dat15.dat dat16.dat"
ls -l "$OUT"
@@ -0,0 +1,67 @@
#!/bin/bash
# Rebuild the new Acronis images so that the BIOS (grub-pc) boot works:
# the modules must be present on the ISO, otherwise GRUB drops to rescue.
set -e
SRC=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
OUT=/path/to/pf/acronis/new
W=/root/new2
rm -rf "$W"; mkdir -p "$W" "$OUT"
apt-get install -y grub-pc-bin grub-efi-amd64-bin grub-efi-ia32-bin mtools xorriso >/tmp/apt6.log 2>&1 || true
build_one() {
local name="$1" dir="$2" kernel="$3" initrds="$4"
local tree="$W/$name"
mkdir -p "$tree/$dir" "$tree/boot/grub/i386-pc"
echo "=== $name ($dir)"
7z e -y -o"$tree/$dir" "$SRC" "ACR/$dir/$kernel" $(for i in $initrds; do echo "ACR/$dir/$i"; done) >/dev/null
# BIOS menu
cat > "$tree/boot/grub/grub.cfg" <<EOF
set timeout=0
set default=0
menuentry "Acronis" {
linux /$dir/$kernel vga=791 mbrcrcs=on force_modules=usbhid lang=ru quiet
initrd $(for i in $initrds; do echo -n "/$dir/$i "; done)
}
EOF
# grub-pc modules must be on the media
cp -f /usr/lib/grub/i386-pc/*.mod /usr/lib/grub/i386-pc/*.lst "$tree/boot/grub/i386-pc/" 2>/dev/null || true
# BIOS El Torito image
grub-mkrescue -o "$W/$name.base.iso" "$tree" >/tmp/mk2_$name.log 2>&1
xorriso -osirrox on -indev "$W/$name.base.iso" \
-extract /boot/grub/i386-pc/eltorito.img "$tree/boot/grub/i386-pc/eltorito.img" >/dev/null 2>&1
# UEFI image: our x64 GRUB (standalone, embedded config) — only used if someone
# boots the ISO straight from firmware; our menu uses loopback instead.
cat > "$W/$name.efi.cfg" <<EOF
search --no-floppy --set=root --file /$dir/$kernel
linux /$dir/$kernel vga=791 mbrcrcs=on force_modules=usbhid lang=ru quiet
initrd $(for i in $initrds; do echo -n "/$dir/$i "; done)
boot
EOF
grub-mkimage -O x86_64-efi -o "$W/BOOTX64.EFI" -p /boot/grub -d /usr/lib/grub/x86_64-efi \
-c "$W/$name.efi.cfg" linux normal iso9660 search search_label search_fs_file part_msdos echo test
dd if=/dev/zero of="$tree/efi.img" bs=1k count=2048 status=none
mkfs.vfat -F 12 -n EFI "$tree/efi.img" >/dev/null
mmd -i "$tree/efi.img" ::/EFI ::/EFI/BOOT
mcopy -i "$tree/efi.img" "$W/BOOTX64.EFI" ::/EFI/BOOT/BOOTX64.EFI
mkdir -p "$tree/EFI/BOOT"
cp -f "$W/BOOTX64.EFI" "$tree/EFI/BOOT/BOOTX64.EFI"
xorriso -as mkisofs -R -J -joliet-long -V PARAVIS_ACRONIS -o "$OUT/$name.iso" \
-b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e efi.img -no-emul-boot \
"$tree" >/tmp/xor2_$name.log 2>&1
printf " -> %s: %s MB\n" "$name" "$(( $(stat -c %s "$OUT/$name.iso") / 1048576 ))"
printf " modules in ISO: "
7z l -ba "$OUT/$name.iso" 2>/dev/null | grep -c 'boot/grub/i386-pc/.*\.mod' || true
}
build_one ADD ATI2025 dat10.dat "dat11.dat dat12.dat"
build_one ABA ADDH12 dat14.dat "dat15.dat dat16.dat"
ls -l "$OUT"
@@ -0,0 +1,31 @@
#!/bin/bash
W=/tmp/cmp
rm -rf $W; mkdir -p $W
OLD=/path/to/pf/acronis/orig
NEW=/path/to/pf/acronis/new
for tag in old new; do
if [ $tag = old ]; then ISO="$OLD/ADD"; else ISO="$NEW/ADD.iso"; fi
echo "===================== $tag : $ISO"
echo "--- file:"
file -b "$ISO"
echo "--- el torito:"
xorriso -indev "$ISO" -report_el_torito plain 2>&1 | grep -E 'Boot record|El Torito|Volume id' | sed 's/^/ /'
echo "--- boot images extract:"
rm -rf $W/$tag; mkdir -p $W/$tag
xorriso -indev "$ISO" -osirrox on -extract_boot_images "$W/$tag" >/dev/null 2>&1
ls -l "$W/$tag" | sed 's/^/ /'
for img in "$W/$tag"/*uefi*.img; do
[ -f "$img" ] || continue
echo " uefi img: $(file -b "$img")"
echo " contents:"
mdir -i "$img" ::/ 2>/dev/null | head -8 | sed 's/^/ /'
mdir -i "$img" ::/EFI/BOOT 2>/dev/null | head -8 | sed 's/^/ /'
# boot sector details
echo " boot sector:"
dd if="$img" bs=1 count=64 status=none | od -An -tx1 | head -4 | sed 's/^/ /'
done
echo "--- catalog bytes:"
cat_img="$W/$tag"/eltorito_catalog.img
[ -f "$cat_img" ] && od -An -tx1 "$cat_img" | head -8 | sed 's/^/ /'
done
@@ -0,0 +1,18 @@
#!/bin/bash
set -e
U=/mnt/f/efi/Paravis/Utilities
B=/path/to/pf/acronis/prev
mkdir -p "$B"
for f in ADD ABA; do
[ -f "$B/$f.mkrescue" ] || cp -f "$U/$f" "$B/$f.mkrescue"
cp -f "/tmp/acrbuild2/$f.iso" "$U/$f"
printf " %-4s %s bytes\n" "$f" "$(stat -c %s "$U/$f")"
done
echo "--- EFI image inside each (what xorboot will load):"
for f in ADD ABA; do
rm -f /tmp/e.img
xorriso -osirrox on -indev "$U/$f" -extract /efi.img /tmp/e.img >/dev/null 2>&1
printf " %-4s " "$f"
mdir -i /tmp/e.img ::/EFI/BOOT | grep -oE 'BOOT(IA32|X64) +EFI +[0-9]+' | tr '\n' ' '
echo
done
@@ -0,0 +1,18 @@
#!/bin/bash
set -e
K=/path/to/pf/Ventoy/keys
U=/mnt/f/efi/Paravis/Utilities
B=/path/to/pf/acronis/prev
mkdir -p "$B"
for f in ADD ABA; do
[ -f "$B/$f" ] || cp -f "$U/$f" "$B/$f"
cp -f "/tmp/acrbuild/$f.iso" "$U/$f"
printf " %-4s %s bytes\n" "$f" "$(stat -c %s "$U/$f")"
done
echo "--- El Torito of deployed images:"
for f in ADD ABA; do
echo " $f:"
xorriso -indev "$U/$f" -report_el_torito plain 2>&1 | grep -E 'El Torito boot img' | sed 's/^/ /'
done
@@ -0,0 +1,14 @@
#!/bin/bash
set -e
ISO=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
U=/mnt/f/efi/Paravis/Utilities
mkdir -p "$U/ATI2025" "$U/ADDH12"
echo "=== Acronis True Image 2025 (ACR/ATI2025)"
7z e -y -o"$U/ATI2025" "$ISO" 'ACR/ATI2025/dat10.dat' 'ACR/ATI2025/dat11.dat' 'ACR/ATI2025/dat12.dat' >/dev/null
ls -l "$U/ATI2025"
echo "=== Acronis Disk Director 12.5 (ACR/ADDH12)"
7z e -y -o"$U/ADDH12" "$ISO" 'ACR/ADDH12/dat14.dat' 'ACR/ADDH12/dat15.dat' 'ACR/ADDH12/dat16.dat' >/dev/null
ls -l "$U/ADDH12"
@@ -0,0 +1,5 @@
#!/bin/bash
for f in ADD ABA; do
echo "===================== $f"
7z l -ba "/path/to/pf/acronis/orig/$f" 2>/dev/null | awk '{printf " %-56s %10d\n", $NF, $4}' | sort -k1 | head -40
done
@@ -0,0 +1,16 @@
#!/bin/bash
W=/tmp/oldcfg
rm -rf $W; mkdir -p $W
echo "=== ADD: bootwiz.cfg / bootmenu.xml"
7z e -y -o$W "/path/to/pf/acronis/orig/ADD" 'bootwiz.cfg' 'bootmenu.xml' >/dev/null 2>&1
echo "--- bootwiz.cfg:"; cat $W/bootwiz.cfg 2>/dev/null
echo "--- bootmenu.xml (head):"; head -40 $W/bootmenu.xml 2>/dev/null
rm -f $W/bootwiz.cfg $W/bootmenu.xml
echo
echo "=== ABA: bootwiz.cfg / bootmenu.xml / Manager/f11-grub.cfg / Manager/f11.cfg"
7z e -y -o$W "/path/to/pf/acronis/orig/ABA" 'bootwiz.cfg' 'bootmenu.xml' 'Manager/f11-grub.cfg' 'Manager/f11.cfg' >/dev/null 2>&1
echo "--- bootwiz.cfg:"; cat $W/bootwiz.cfg 2>/dev/null
echo "--- f11-grub.cfg:"; cat $W/f11-grub.cfg 2>/dev/null
echo "--- f11.cfg:"; cat $W/f11.cfg 2>/dev/null
echo "--- bootmenu.xml (head):"; head -30 $W/bootmenu.xml 2>/dev/null
@@ -0,0 +1,42 @@
#!/bin/bash
set -e
SRC=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
OUT=/path/to/pf/acronis/acr
if [ ! -d "$OUT" ]; then
echo "=== extracting ACR (once, ~4.4 GB)..."
mkdir -p "$OUT"
7z x -y -o"$OUT" "$SRC" 'ACR/*' >/dev/null
fi
echo "=== scanning kernels"
python3 - <<'EOF'
import glob, os, struct
rows = []
for p in sorted(glob.glob('/path/to/pf/acronis/acr/ACR/*/*')):
if not os.path.isfile(p) or os.path.getsize(p) < 1024 * 1024:
continue
try:
with open(p, 'rb') as f:
head = f.read(0x300)
except OSError:
continue
# bzImage: 'HdrS' at 0x202
if head[0x202:0x206] != b'HdrS':
continue
flags = struct.unpack_from('<H', head, 0x236)[0]
ver = head[0x206:0x208]
t64 = bool(flags & 1)
ho32 = bool(flags & 4)
ho64 = bool(flags & 8)
rows.append((os.path.basename(os.path.dirname(p)), os.path.basename(p),
os.path.getsize(p), ver[0], ver[1], t64, ho32, ho64))
print('%-12s %-22s %10s %6s %-6s %-8s %s' % ('product', 'file', 'size', 'kver', '64bit', 'handov32', 'handov64'))
for r in rows:
print('%-12s %-22s %10d %3d.%d %-6s %-8s %s' % (
r[0], r[1], r[2], r[3], r[4],
'yes' if r[5] else 'no', 'YES' if r[6] else '-', 'yes' if r[7] else '-'))
print()
print('candidates for 32-bit UEFI:', [r[0] for r in rows if r[6] or not r[5]] or 'none')
EOF
@@ -0,0 +1,29 @@
#!/bin/bash
# Local repro of the legacy (BIOS) boot of Acronis True Image 2025.
set -e
SRC=/path/to/pf/acronis/Acronis_Boot_Disk_2024.iso
W=/root/acrtest
rm -rf "$W"; mkdir -p "$W/tree/ATI2025" "$W/tree/boot/grub/i386-pc"
7z e -y -o"$W/tree/ATI2025" "$SRC" 'ACR/ATI2025/dat10.dat' 'ACR/ATI2025/dat11.dat' 'ACR/ATI2025/dat12.dat' >/dev/null
cp -f /usr/lib/grub/i386-pc/*.mod /usr/lib/grub/i386-pc/*.lst "$W/tree/boot/grub/i386-pc/" 2>/dev/null || true
cat > "$W/tree/boot/grub/grub.cfg" <<'EOF'
set timeout=0
set default=0
menuentry "Acronis" {
linux /ATI2025/dat10.dat vga=791 mbrcrcs=on force_modules=usbhid lang=ru quiet console=ttyS0,115200
initrd /ATI2025/dat11.dat /ATI2025/dat12.dat
}
EOF
grub-mkrescue -o "$W/test.iso" "$W/tree" >/tmp/mk_test.log 2>&1
xorriso -osirrox on -indev "$W/test.iso" -extract /boot/grub/i386-pc/eltorito.img "$W/tree/boot/grub/i386-pc/eltorito.img" >/dev/null 2>&1
xorriso -as mkisofs -o "$W/final.iso" \
-b boot/grub/i386-pc/eltorito.img -no-emul-boot -boot-load-size 4 -boot-info-table \
"$W/tree" >/tmp/xor_test.log 2>&1
ls -l "$W/final.iso"
echo "=== booting in QEMU (BIOS), 90s max"
timeout 90 qemu-system-x86_64 -m 4096 -cdrom "$W/final.iso" -boot d \
-display none -serial stdio -no-reboot 2>&1 | tail -60 || true
@@ -0,0 +1,13 @@
#!/bin/bash
for f in ADD ABA; do
rm -f /tmp/e.img
xorriso -osirrox on -indev "/mnt/f/efi/Paravis/Utilities/$f" -extract /efi.img /tmp/e.img >/dev/null 2>&1
printf ' %-4s ' "$f"
mdir -i /tmp/e.img ::/EFI/BOOT 2>/dev/null | grep -oE 'BOOT(IA32|X64) +EFI +[0-9]+' | tr '\n' ' '
echo
done
echo "--- el torito:"
for f in ADD ABA; do
echo " $f:"
xorriso -indev "/mnt/f/efi/Paravis/Utilities/$f" -report_el_torito plain 2>&1 | grep -E 'El Torito boot img' | sed 's/^/ /'
done
@@ -0,0 +1,11 @@
#!/bin/bash
for f in ADD ABA; do
iso="/mnt/f/efi/Paravis/Utilities/$f"
echo "== $f"
xorriso -indev "$iso" -report_el_torito plain 2>/dev/null | grep -E 'El Torito boot img' | sed 's/^/ /'
printf ' modules: '
7z l -ba "$iso" 2>/dev/null | grep -c 'boot/grub/i386-pc/.*\.mod'
printf ' kernel dirs: '
7z l -ba "$iso" 2>/dev/null | grep -oE '(ATI2025|ADDH12)/[a-z0-9]+\.dat' | tr '\n' ' '
echo
done
@@ -0,0 +1,10 @@
#!/bin/bash
cd /root/krd24/srm10/scripts || exit 1
echo "=== список скриптов:"
ls -1
echo
echo "=== всё про backstore:"
grep -rn 'KRD_BACKSTORE\|BACKSTORE\|\.bs' . 2>/dev/null | head -40
echo
echo "=== всё про KRD_DATA_DIRECTORY / product dir:"
grep -rn 'KRD_DATA_DIRECTORY\|product_dir\|KRD_MOUNTS_FILE' . 2>/dev/null | head -40
@@ -0,0 +1,10 @@
#!/bin/bash
cd /root/krd24 || exit 1
echo "=== backstore во всём squashfs:"
grep -rIl 'BACKSTORE\|backstore\|krd\.bs' sqroot 2>/dev/null | head -20
echo
echo "=== упоминания (с контекстом):"
grep -rn 'KRD_BACKSTORE_ACTIVE\|krd\.bs\|backstore' sqroot/usr/sbin sqroot/usr/lib sqroot/etc 2>/dev/null | head -30
echo
echo "=== find_product_dir.sh 100-215:"
sed -n '100,215p' srm10/scripts/find_product_dir.sh
@@ -0,0 +1,7 @@
#!/bin/bash
cd /root/krd24 || exit 1
echo "=== live_env.sh, динамическая часть (95-200):"
sed -n '95,200p' sqroot/etc/KRD/live_env.sh
echo
echo "=== поиск KRD_LAYERS_BOOT_DIRECTORY / RW_DIRECTORY / BACKSTORE_ACTIVE во всём дереве:"
grep -rn 'KRD_LAYERS_BOOT_DIRECTORY\|KRD_LAYERS_RW_DIRECTORY\|KRD_BACKSTORE_ACTIVE_FILEPATH' sqroot srm10 2>/dev/null | head -20
@@ -0,0 +1,47 @@
#!/bin/bash
# Проверка: базы из KRD2024_Data/Bases подхватываются при загрузке.
set -e
STAGE=/path/to/pf/KRD/files
IMG=/root/krd24/bases-fat32.img
rm -f "$IMG"; truncate -s 6G "$IMG"
mkfs.vfat -F 32 -n PARAVIS "$IMG" >/dev/null 2>&1
mkdir -p /mnt/krdtest; mount -o loop "$IMG" /mnt/krdtest
mkdir -p /mnt/krdtest/efi/Paravis/KRD
cp -r "$STAGE/." /mnt/krdtest/efi/Paravis/KRD/
# имитация "обновлённых баз", как их кладёт updater.sh
P=/mnt/krdtest/efi/Paravis/KRD/KRD2024_Data
mkdir -p "$P/Bases" "$P/Traces"
cp "$STAGE/live/KRD/30-bases.srm" "$P/Bases/42-freshbases.srm"
echo "1" > "$P/Bases/bases_are_correct.flag"
sync
echo "=== до загрузки:"
ls -A "$P" "$P/Bases"
umount /mnt/krdtest
rm -f /tmp/qmon7.sock
qemu-system-x86_64 -m 3072 -smp 4 -machine q35 \
-kernel "$STAGE/live/vmlinuz" -initrd "$STAGE/live/initrd.img" \
-append "boot=live components live-media-path=/efi/Paravis/KRD/live locales=ru_RU.UTF-8 trace" \
-drive file="$IMG",format=raw,if=ide -net none -display none -vga std \
-monitor unix:/tmp/qmon7.sock,server,nowait -daemonize
sleep 95
python3 - <<'EOF'
import socket, time
s = socket.socket(socket.AF_UNIX); s.connect('/tmp/qmon7.sock'); time.sleep(0.3)
s.recv(65536); s.sendall(b'quit\n')
EOF
sleep 3
pkill -f 'qemu-system-x86_64.*bases-fat32.img' 2>/dev/null || true
sleep 2
echo "=== логи KRT после загрузки:"
mount -o loop "$IMG" /mnt/krdtest
find /mnt/krdtest/efi/Paravis/KRD/KRD2024_Data/Traces -type f | head -10
echo "--- про базы:"
grep -rhiE 'Fresh bases|fresh bases|Used default|bases srm' /mnt/krdtest/efi/Paravis/KRD/KRD2024_Data/Traces 2>/dev/null | head -15
echo "--- продуктовая папка:"
find /mnt/krdtest/efi/Paravis/KRD/KRD2024_Data -maxdepth 1 | sed 's|/mnt/krdtest||'
umount /mnt/krdtest
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
set -e
W=/root/krd24
cd "$W"
rm -rf srm10dbg; cp -a srm10p srm10dbg
python3 - <<'PYEOF'
import io
p='/root/krd24/srm10dbg/scripts/find_product_dir.sh'
s=io.open(p,encoding='utf-8').read()
anchor='''if [[ ! -f "${KRD_MOUNTS_FILE_PATH}" ]]
then
trace_message "${TRACE_LVL_ERROR}" "Volumes aren't mounted!"
trace_and_exit 1
fi
'''
dbg='''
{
echo "=== PARAVIS DEBUG ==="
echo "-- mounts file <${KRD_MOUNTS_FILE_PATH}>:"
cat "${KRD_MOUNTS_FILE_PATH}" 2>&1
echo "-- volumes dir <${KRD_VOLUMES_DIRECTORY}>:"
ls -la "${KRD_VOLUMES_DIRECTORY}" 2>&1
echo "-- /proc/mounts (medium/live/volumes):"
grep -E 'medium|KRD' /proc/mounts 2>&1
echo "=== END DEBUG ==="
} > /dev/ttyS0 2>&1
'''
assert anchor in s
s=s.replace(anchor, anchor+dbg, 1)
io.open(p,'w',encoding='utf-8').write(s)
print('debug patch ok')
PYEOF
rm -f 10-krd-dbg.srm
mksquashfs srm10dbg 10-krd-dbg.srm -comp xz -b 262144 -Xbcj x86 -noappend >/dev/null 2>&1
cp -f 10-krd-dbg.srm /path/to/pf/KRD/files/live/KRD/10-krd.srm
ls -l /path/to/pf/KRD/files/live/KRD/10-krd.srm
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
# Отладочный прогон: KRD печатает состояние томов в COM-порт.
set -e
STAGE=/path/to/pf/KRD/files
IMG=/root/krd24/dbg-fat32.img
rm -f "$IMG"; truncate -s 6G "$IMG" # 6G, чтобы пройти проверку размера тома 4G
mkfs.vfat -F 32 -n PARAVIS "$IMG" >/dev/null 2>&1
mkdir -p /mnt/krdtest; mount -o loop "$IMG" /mnt/krdtest
mkdir -p /mnt/krdtest/efi/Paravis/KRD
cp -r "$STAGE/." /mnt/krdtest/efi/Paravis/KRD/
sync
echo "=== до загрузки:"; ls -A /mnt/krdtest/efi/Paravis/KRD
umount /mnt/krdtest
rm -f /tmp/qmon5.sock /tmp/krd.serial
qemu-system-x86_64 -m 3072 -smp 4 -machine q35 \
-kernel "$STAGE/live/vmlinuz" -initrd "$STAGE/live/initrd.img" \
-append "boot=live components live-media-path=/efi/Paravis/KRD/live locales=ru_RU.UTF-8 console=ttyS0,115200" \
-drive file="$IMG",format=raw,if=ide -net none -display none -vga std \
-serial file:/tmp/krd.serial \
-monitor unix:/tmp/qmon5.sock,server,nowait -daemonize
sleep 100
python3 - <<'EOF'
import socket, time
s = socket.socket(socket.AF_UNIX); s.connect('/tmp/qmon5.sock'); time.sleep(0.3)
s.recv(65536); s.sendall(b'quit\n')
EOF
sleep 3
pkill -f 'qemu-system-x86_64.*dbg-fat32.img' 2>/dev/null || true
sleep 2
echo "=== COM-порт, фрагмент PARAVIS DEBUG:"
sed -n '/=== PARAVIS DEBUG ===/,/=== END DEBUG ===/p' /tmp/krd.serial | head -60
echo
echo "=== после загрузки:"
mount -o loop "$IMG" /mnt/krdtest
ls -A /mnt/krdtest; echo "--- KRD:"; ls -A /mnt/krdtest/efi/Paravis/KRD
umount /mnt/krdtest
@@ -0,0 +1,17 @@
#!/bin/bash
img=/root/krd24/dbl.img
rm -f $img; truncate -s 300M $img
mkfs.vfat -F 32 $img >/dev/null 2>&1
mkdir -p /mnt/t_ro /mnt/t_rw
echo "=== mount ro:"
mount -o loop,ro $img /mnt/t_ro && echo " ok ro"
echo "=== второй mount того же образа rw (аналог устройства):"
# loop-устройство
LOOP=$(losetup -j $img | cut -d: -f1)
echo " loop=$LOOP"
mount -t vfat -o rw,utf8,uid=1000,gid=1000 "$LOOP" /mnt/t_rw 2>&1 && echo " ok rw" || echo " FAILED rw"
echo "=== запись через rw-монтирование:"
mkdir -p /mnt/t_rw/efi/Paravis/KRD/KRD2024_Data && echo " mkdir ok" || echo " mkdir failed"
ls -A /mnt/t_rw
umount /mnt/t_rw 2>/dev/null; umount /mnt/t_ro 2>/dev/null
losetup -d "$LOOP" 2>/dev/null
@@ -0,0 +1,18 @@
#!/bin/bash
set -e
W=/root/krd24
F=/mnt/f/efi/Paravis/KRD
S=/path/to/pf/KRD/files
echo "=== в стенд (D:\\PF2026\\KRD\\files) кладу оба варианта"
cp -f "$W/10-krd-emptybases.srm" "$S/live/KRD/10-krd-emptybases.srm"
cp -f "$W/15-bases-empty.srm" "$S/live/KRD/15-bases-empty.srm"
cp -f "$W/10-krd-final.srm" "$S/live/KRD/10-krd.srm" # основной (с полными базами)
ls -l "$S/live/KRD"
echo
echo "=== на флешку: вариант без баз"
cp -f "$W/15-bases-empty.srm" "$F/live/KRD/15-bases-empty.srm"
cp -f "$W/10-krd-emptybases.srm" "$F/live/KRD/10-krd.srm"
rm -f "$F/live/KRD/30-bases.srm"
ls -l "$F/live/KRD"
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
set -e
cd /root/krd24
rm -rf eb; mkdir -p eb/Bin/Bases
rm -f 15-bases-empty.srm
mksquashfs eb 15-bases-empty.srm -comp xz -b 262144 -Xbcj x86 -noappend >/dev/null 2>&1
unsquashfs -l 15-bases-empty.srm
cp -f 15-bases-empty.srm /root/krd24/nb3/live/KRD/ 2>/dev/null || true
Loaded 100 of 259 files, more files were not shown because too many files have changed in this diff. Show more