set timeout="15"
set default="0"

insmod all_video
insmod video_bochs
insmod video_cirrus
insmod efi_gop
insmod efi_uga
insmod font
insmod gfxterm
insmod gfxmenu
insmod gettext
insmod jpeg
insmod png

#加载unicode字体显示中文
font=(memdisk)/boot/grub/fonts/unicode.pf2
if loadfont ${font}; then
 set gfxmode=1366x768
 set locale_dir=(memdisk)/boot/grub/locale
 set lang=zh_CN
fi

#设置分辨率
set gfxmode=auto
terminal_output gfxterm

#设置主题或背景图片
if search --no-floppy -f /boot/grub/themes/StylishDark/theme.txt; then
	set theme=/boot/grub/themes/StylishDark/theme.txt
else
	background_image /boot/grub/bg.bmp
	set color_normal=red/black
	set color_highlight=magenta/black
fi

menuentry "启动嵊州人民版Win10Pe(原生启动器版)" --class windows --class os {
	echo "正在启动 嵊州人民版pe..."
	insmod part_gpt
	insmod ntfs
	insmod fat
	insmod search_fs_file
	insmod chain
	search --no-floppy --set=root -f /EFI/bootmgfw.efi
	chainloader (${root})/EFI/bootmgfw.efi


}

menuentry "启动嵊州人民版Win10Pe(wimboot无dhcp秒启)" --class windows --class os {
	echo "正在启动 嵊州人民版pe..."
	insmod part_gpt
	insmod ntfs
	insmod fat
	insmod search_fs_file
	insmod chain
	search --no-floppy --set=root -f /EFI/nodhcp.efi
	chainloader (${root})/EFI/nodhcp.efi
}

menuentry "启动嵊州人民版Win10Pe(wimboot初始化dhcp版)" --class windows --class os {
	echo "正在启动 嵊州人民版pe..."
	insmod part_gpt
	insmod ntfs
	insmod fat
	insmod search_fs_file
	insmod chain
	search --no-floppy --set=root -f /EFI/cong.efi
	chainloader (${root})/EFI/cong.efi
}

menuentry "测试wimboot" --class windows --class os{
   	insmod part_gpt
	insmod ntfs
	insmod fat
	insmod search_fs_file
	insmod chain
	search --no-floppy --set=root -f 
	set iso_path="/pe.iso"
	loopback loop $iso_path
  
     linuxefi (${root})/EFI/wimboot
     initrdefi \
     newc:bcd:(loop)/Boot/BCD \
     newc:boot.sdi:(loop)/Boot/boot.sdi \
     newc:boot.wim:(loop)/sources/boot.wim
 
  }

menuentry "重启计算机" --class reboot {
	reboot
}
menuentry "关闭计算机" --class shutdown {
	halt
}
