|
相关路径修改下
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
}
insmod part_msdos
insmod ntfs
set root=(hd0,msdos1)
if loadfont /boot/grub2/unicode.pf2 ; then
set gfxmode=800x600
load_video
insmod gfxterm
fi
terminal_output gfxterm
#insmod part_msdos
#insmod ntfs
#set root=(hd0,msdos1)
set theme=/boot/grub2/themes/grub2/theme.txt
insmod gfxmenu
insmod png
#insmod part_msdos
#insmod ntfs
#set root=(hd0,msdos1)
set locale_dir=($root)/boot/grub2/locale
set lang=zh
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
#insmod part_msdos
#insmod ntfs
#set root=(hd0,msdos1)
insmod tga
if background_image /usr/share/images/grub/Fly-Angel.tga ; then
set color_normal=black/black
set color_highlight=magenta/black
else
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
fi
# 以下是每个菜单的写法,可以自行参考资料增减或编辑******************************
menuentry "启动Ubuntu LiveCD模式" --class ubuntu {
insmod ntfs
search --no-floppy --fs-uuid --set=root 0858A5AC58A59948
loopback loop /system/linux/ubuntu-11.10-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/system/linux/ubuntu-11.10-desktop-i386.iso locale=zh_CN.UTF-8 splash
initrd (loop)/casper/initrd.lz
}
menuentry "进入grub4dos菜单(示例)" --class windows {
linux16 /Boot/grub/grub.exe --config-file=/menu.lst
}
# 菜单结尾 ********************************************************
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ### |
|