### Start
### manjaro-kde-16.06.1-x86_64.iso
set iso_path=""

if loadfont ${prefix}/fonts/unicode.pf2; then
	set gfxmode=auto
	insmod efi_gop
	insmod efi_uga
	insmod gfxterm
	terminal_output gfxterm
fi

set menu_color_normal=white/black
set menu_color_highlight=black/light-gray

menuentry "[1] Start Manjaro Linux" --hotkey=1 {
	booting ${iso_path}
	loopback loop ${iso_path}
	probe -l (loop) --set=isolabel
	if [ -d (loop)/manjaro/boot/x86_64/ ]; then
		set mdir="x86_64"
	else
		set mdir="i686"
	fi
	if [ -f (loop)/manjaro/boot/${mdir}/vmlinuz ]; then
		linux	(loop)/manjaro/boot/${mdir}/vmlinuz img_dev=/dev/disk/by-uuid/${rootuuid} img_loop=${iso_path} misobasedir=manjaro misolabel=${isolabel} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo  showopts
		initrd	(loop)/manjaro/boot/intel_ucode.img (loop)/manjaro/boot/${mdir}/initramfs.img
	else
		linux	(loop)/manjaro/boot/${mdir}/manjaro img_dev=/dev/disk/by-uuid/${rootuuid} img_loop=${iso_path} misobasedir=manjaro misolabel=${isolabel} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo overlay=free quiet splash showopts
		initrd	(loop)/manjaro/boot/intel_ucode.img (loop)/manjaro/boot/${mdir}/manjaro.img
	fi
	loopback -d loop
}
menuentry "[2] Start Manjaro Linux (non-free drivers)" --hotkey=2 {
	booting ${iso_path}
	loopback loop ${iso_path}
	probe -l (loop) --set=isolabel
	if [ -d (loop)/manjaro/boot/x86_64/ ]; then
		set mdir="x86_64"
	else
		set mdir="i686"
	fi
	if [ -f (loop)/manjaro/boot/${mdir}/vmlinuz ]; then
		linux	(loop)/manjaro/boot/${mdir}/vmlinuz img_dev=/dev/disk/by-uuid/${rootuuid} img_loop=${iso_path} misobasedir=manjaro misolabel=${isolabel} nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 logo.nologo nonfree=yes  showopts
		initrd	(loop)/manjaro/boot/intel_ucode.img (loop)/manjaro/boot/${mdir}/initramfs.img
	else
		linux	(loop)/manjaro/boot/${mdir}/manjaro img_dev=/dev/disk/by-uuid/${rootuuid} img_loop=${iso_path} misobasedir=manjaro misolabel=${isolabel} nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 nonfree=yes logo.nologo overlay=nonfree quiet splash showopts
		initrd	(loop)/manjaro/boot/intel_ucode.img (loop)/manjaro/boot/${mdir}/manjaro.img
	fi
	loopback -d loop
}
### End