X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/blobdiff_plain/3f65f0ef03e4aebcd14f233ca808a4f894657802..6034b25cbaa5b35679673c05142aa8e425ac7b95:/INSTALL/grub/grub.cfg diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 7ad05d0..5b1e300 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -33,6 +33,23 @@ function ventoy_debug_pause { fi } + +function ventoy_max_resolution { + #Skip this for VM + smbios -t 1 -s 0x05 --set=system_product; + for vtPdt in "VMware" "VirtualBox"; then + if vt_str_casebegin "$system_product" "$vtPdt"; then + return + fi + fi + + vt_enum_video_mode + vt_get_video_mode 0 vtCurMode + terminal_output console + set gfxmode=$vtCurMode + terminal_output gfxterm +} + function ventoy_cli_console { if [ -z "$vtoy_display_mode" ]; then terminal_output console @@ -403,10 +420,14 @@ function distro_specify_initrd_file_phase2 { vt_linux_specify_initrd_file /images/pxeboot/initrd.img elif [ -f (loop)/live/initrd ]; then vt_linux_specify_initrd_file /live/initrd - + elif [ -f (loop)/initramfs-linux.img ]; then + vt_linux_specify_initrd_file /initramfs-linux.img + elif [ -f (loop)/boot/isolinux/initrd.gz ]; then + vt_linux_specify_initrd_file /boot/isolinux/initrd.gz fi } + function ventoy_get_ghostbsd_ver { # fallback to parse version from elf /boot/kernel/kernel set vt_freebsd_ver=xx @@ -514,6 +535,13 @@ function ventoy_freebsd_proc { fi fi + if [ "$vt_freebsd_ver" = "14.x" ]; then + if [ -e (loop)/boot/lua/brand-pfSense.lua ]; then + set vtFreeBsdDistro=pfSense + fi + fi + + if [ -n "${vtdebug_flag}" ]; then echo "This is $vtFreeBsdDistro $vt_freebsd_ver ${vt_freebsd_bit}bit" fi @@ -620,7 +648,7 @@ function uefi_windows_menu_func { if [ -n "$vtoy_chain_mem_addr" ]; then ventoy_acpi_param ${vtoy_chain_mem_addr} 2048 - ventoy_cli_console + ventoy_max_resolution chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi env_param=${env_param} isoefi=${LoadIsoEfiDriver} iso_${ventoy_fs_probe} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size} boot else @@ -662,7 +690,7 @@ function uefi_linux_menu_func { if [ -d (loop)/pmagic ]; then vt_linux_specify_initrd_file /pmagic/initrd.img else - for file in "boot/grub/grub.cfg" "EFI/BOOT/grub.cfg" "EFI/boot/grub.cfg" "efi/boot/grub.cfg" "EFI/BOOT/BOOTX64.conf" "/grub/grub.cfg"; do + for file in "boot/grub/grub.cfg" "EFI/BOOT/grub.cfg" "EFI/boot/grub.cfg" "efi/boot/grub.cfg" "EFI/BOOT/BOOTX64.conf" "/grub/grub.cfg" "EFI/BOOT/grub/grub.cfg"; do if [ -e (loop)/$file ]; then vt_linux_parse_initrd_grub file (loop)/$file fi @@ -1411,6 +1439,8 @@ function ventoy_iso_busybox_ver { set ventoy_busybox_ver=64 elif vt_str_begin "$vt_volume_id" "LDiagBootable"; then set ventoy_busybox_ver=64 + elif vt_str_begin "$vt_volume_id" "KAOS_"; then + set ventoy_busybox_ver=64 fi fi @@ -2397,7 +2427,7 @@ function mimg_common_menuentry { ############################################################# ############################################################# -set VENTOY_VERSION="1.0.97" +set VENTOY_VERSION="1.1.05" #ACPI not compatible with Window7/8, so disable by default set VTOY_PARAM_NO_ACPI=1