### Start
### MX-16-RC1_x64.iso
set extract_path=""
#------------------------------------------------------------------
# file: /boot/grub/grub.cfg for the Live version of MX
#
# This file can get updated automatically on a LiveUSB via the save
# feature in the text menus.  It is possible to break these updates
# by editing this file.
#------------------------------------------------------------------

loadfont ${extract_path}/boot/grub/fonts/font.pf2
loadfont ${extract_path}/boot/grub/fonts/7x13.pf2
loadfont ${extract_path}/boot/grub/fonts/dejavu-sans-14.pf2
loadfont ${extract_path}/boot/grub/fonts/dejavu-sans-16.pf2

set timeout=60
set gfxmode=1024x768

insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod gfxterm
insmod png
insmod jpeg

terminal_output gfxterm

set theme=${extract_path}/boot/grub/theme/theme.txt
export theme

set default=1

# search --no-floppy --set=root --fs-uuid %UUID%

menuentry "MX (24 November 2016)" {
	gfxpayload=1024x768
	linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet
	initrd ${extract_path}/antiX/initrd.gz
}

#--custom  menuentry "Custom " {
#--custom  gfxpayload=800x600
#--custom  linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet
#--custom  initrd ${extract_path}/antiX/initrd.gz
#--custom  }

menuentry "MX Customize Boot (text menus)" {
	gfxpayload=1024x768
	linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet menus
	initrd ${extract_path}/antiX/initrd.gz
}

submenu ">>> Advanced Options for MX <<<" {
set extract_path=""
menu_color_normal=white/black
menu_color_highlight=yellow/light-gray

menuentry "MX Failsafe" {
	gfxpayload=1024x768
	linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet nomodeset failsafe
	initrd ${extract_path}/antiX/initrd.gz
}

menuentry "MX (1920x1080)" {
	gfxpayload=1920x1080
	linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet
	initrd ${extract_path}/antiX/initrd.gz
}

menuentry "MX (1600x1200)" {
	gfxpayload=1600x1200
	linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet
	initrd ${extract_path}/antiX/initrd.gz
}

menuentry "MX (1600x900)" {
	gfxpayload=1600x900
	linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet
	initrd ${extract_path}/antiX/initrd.gz
}

menuentry "MX (1366x768)" {
	gfxpayload=1366x768
	linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet
	initrd ${extract_path}/antiX/initrd.gz
}

menuentry "MX (1280x1024)" {
	gfxpayload=1280x1024
	linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet
	initrd ${extract_path}/antiX/initrd.gz
}

menuentry "MX (800x600)" {
	gfxpayload=800x600
	linux ${extract_path}/antiX/vmlinuz bootdir=${extract_path}/antiX bootuuid=${rootuuid} quiet
	initrd ${extract_path}/antiX/initrd.gz
}

menuentry "Power Off" --hotkey=P {
	halt
}

menuentry "Reboot"  --hotkey=R {
	reboot
}

}

if [ -f (hd1,gpt1)/EFI/MICROSOFT/BOOT/bootmgfw.efi ]; then
menuentry "Boot Windows from Hard Drive (hd1,1)" {
	insmod ntfs
	set root=(hd1,gpt1)
	chainloader (${root})/EFI/MICROSOFT/BOOT/bootmgfw.efi
	boot
}
fi

if [ -f (hd1,gpt2)/EFI/MICROSOFT/BOOT/bootmgfw.efi ]; then
menuentry "Boot Windows from Hard Drive (hd1,2)" {
	insmod ntfs
	set root=(hd1,gpt2)
	chainloader (${root})/EFI/MICROSOFT/BOOT/bootmgfw.efi
	boot
}
fi

if [ -f (hd2,gpt1)/EFI/MICROSOFT/BOOT/bootmgfw.efi ]; then
menuentry "Boot Windows from Hard Drive (hd2,1)" {
	insmod ntfs
	set root=(hd2,gpt1)
	chainloader (${root})/EFI/MICROSOFT/BOOT/bootmgfw.efi
	boot
}
fi

if [ -f (hd2,gpt2)/EFI/MICROSOFT/BOOT/bootmgfw.efi ]; then
menuentry "Boot Windows from Hard Drive (hd2,2)" {
	insmod ntfs
	set root=(hd1,gpt2)
	chainloader (${root})/EFI/MICROSOFT/BOOT/bootmgfw.efi
	boot
}
fi

if [ -f (hd3,gpt1)/EFI/MICROSOFT/BOOT/bootmgfw.efi ]; then
menuentry "Boot Windows from Hard Drive (hd3,1)" {
	insmod ntfs
	set root=(hd3,gpt1)
	chainloader (${root})/EFI/MICROSOFT/BOOT/bootmgfw.efi
	boot
}
fi

if [ -f (hd3,gpt2)/EFI/MICROSOFT/BOOT/bootmgfw.efi ]; then
menuentry "Boot Windows from Hard Drive (hd3,2)" {
	insmod ntfs
	set root=(hd3,gpt2)
	chainloader (${root})/EFI/MICROSOFT/BOOT/bootmgfw.efi
	boot
}
fi

if [ -n "$efi" ]; then
if [ "${_SPEC_ARCH}" == "64" ]; then

menuentry "Memory Test (64-bit UEFI)" {
	#--esp set root=(hd0,2)
	chainloader /boot/uefi-mt/mtest-64.efi
}

else

menuentry "Memory Test (32-bit UEFI)" {
	#--esp set root=(hd0,2)
	chainloader /boot/uefi-mt/mtest-32.efi
}
fi
fi
### End