set default="0"

function load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
  insmod all_video
}

load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2

set timeout=5

menuentry "install" {
    multiboot2 /boot/xen.gz dom0_max_vcpus=1-16 dom0_mem=max:8192M com1=115200,8n1 console=com1,vga
    module2 /boot/vmlinuz console=hvc0 console=tty0
    module2 /install.img
}

menuentry "no-serial" {
    multiboot2 /boot/xen.gz dom0_max_vcpus=1-16 dom0_mem=max:8192M console=vga
    module2 /boot/vmlinuz console=tty0
    module2 /install.img
}

menuentry "safe" {
    multiboot2 /boot/xen.gz dom0_max_vcpus=1-16 dom0_mem=max:8192M nosmp noreboot noirqbalance no-mce no-bootscrub no-numa no-hap no-mmcfg max_cstate=0 nmi=ignore allow_unsafe com1=115200,8n1 console=com1,vga vga=keep
    module2 /boot/vmlinuz console=hvc0 console=tty0
    module2 /install.img
}

menuentry "multipath" {
    multiboot2 /boot/xen.gz dom0_max_vcpus=1-16 dom0_mem=max:8192M com1=115200,8n1 console=com1,vga
    module2 /boot/vmlinuz console=hvc0 console=tty0 device_mapper_multipath=enabled
    module2 /install.img
}

menuentry "install with alternate/debug kernel (kernel-alt)" {
    multiboot2 /boot/xen.gz dom0_max_vcpus=1-16 dom0_mem=max:8192M com1=115200,8n1 console=com1,vga
    module2 /boot/alt/vmlinuz console=hvc0 console=tty0 kernel-alt
    module2 /install.img
}

menuentry "shell" {
    multiboot2 /boot/xen.gz dom0_max_vcpus=1-16 dom0_mem=max:8192M com1=115200,8n1 console=com1,vga
    module2 /boot/vmlinuz console=hvc0 console=tty0 bash-shell
    module2 /install.img
}

menuentry "memtest" {
    chainloader /boot/memtest.efi
}