
set cd=$root
set timeout=-1

if loadfont /boot/grub/font.pf2 ; then
	set gfxmode=640x480
	insmod vbe
	insmod gfxterm
	terminal_output gfxterm
fi

insmod png
if background_image /boot/grub/splash.png ; then
	set color_normal=white/black
	set color_highlight=black/white
else
	set menu_color_normal=cyan/blue
	set menu_color_highlight=white/blue
fi

menuentry "Default install" {
	echo "Loading ..."
	set root=$cd
	multiboot /boot/kernel/gnumach.gz root=gunzip:device:rd0
	module --nounzip /boot/initrd.gz initrd '$(ramdisk-create)'
	module /boot/kernel/ext2fs.static ext2fs \
			--multiboot-command-line='${kernel-command-line}' \
			--host-priv-port='${host-port}' \
			--device-master-port='${device-port}' \
			--exec-server-task='${exec-task}' -T typed '${root}' \
			'$(task-create)' '$(task-resume)'
	module /boot/kernel/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'
}

menuentry "Automated install" {
	echo "Loading ..."
	set root=$cd
	multiboot /boot/kernel/gnumach.gz root=gunzip:device:rd0 auto=true priority=critical
	module --nounzip /boot/initrd.gz initrd '$(ramdisk-create)'
	module /boot/kernel/ext2fs.static ext2fs \
			--multiboot-command-line='${kernel-command-line}' \
			--host-priv-port='${host-port}' \
			--device-master-port='${device-port}' \
			--exec-server-task='${exec-task}' -T typed '${root}' \
			'$(task-create)' '$(task-resume)'
	module /boot/kernel/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'
}

menuentry "Expert install" {
	echo "Loading ..."
	set root=$cd
	multiboot /boot/kernel/gnumach.gz root=gunzip:device:rd0 priority=low
	module --nounzip /boot/initrd.gz initrd '$(ramdisk-create)'
	module /boot/kernel/ext2fs.static ext2fs \
			--multiboot-command-line='${kernel-command-line}' \
			--host-priv-port='${host-port}' \
			--device-master-port='${device-port}' \
			--exec-server-task='${exec-task}' -T typed '${root}' \
			'$(task-create)' '$(task-resume)'
	module /boot/kernel/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'
}

menuentry "" {
	true
}

menuentry "Boot from first hard disk" {
	set root=hd0
	chainloader +1
}
