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
search --file --set /install.img

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

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

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

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

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