110654 发表于 2016-3-29 14:41:59

grub4dos的菜单如何运用到grub2的菜单中来???

grub4dos菜单如:
title 【01】 Win2003PE迷你维护系统
echo $ Loading TYPE, Please Wait ...
()/boot/grub/F6IMG || find --set-root /boot/grub/F6IMG && /boot/grub/F6IMG
map --e820cycles=3
map --rehook
chainloader ()/boot/SETUPLDR.BIN
find --set-root /boot/SETUPLDR.BIN
chainloader /boot/SETUPLDR.BIN



grub2该如何写???


目前只知道可以用

ntldr /boot/SETUPLDR.BIN
去加载这个
但他这个菜单中还有个字体还是什么文件(f6img)文件要先加载,该如何写菜单??

2013qiuwei0209 发表于 2016-3-31 15:43:55


set timeout="5"
set default="0"

insmod all_video
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
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=1366x768
terminal_output gfxterm

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

menuentry "【1】Windows PE" --class windows {
        insmod fat
        insmod ntfs
        insmod search_fs_file
        insmod ntldr
        search --file --no-floppy --set /boot/grub/grub-bios.cfg
        if [ -e /WinPE.iso ]; then
                linux16 /boot/memdisk iso raw
                initrd16 /WinPE.iso
        elif [ -e /BOOTMGR ]; then
                ntldr /BOOTMGR
        else
                echo '没有找到Windows PE'
                sleep --verbose 5
    fi
}
menuentry "【2】重启计算机" --class reboot {
        reboot
}
menuentry "【3】关闭计算机" --class shutdown {
        halt
}


2013qiuwei0209 发表于 2016-3-31 15:44:56

参考下,希望有帮助
页: [1]
查看完整版本: grub4dos的菜单如何运用到grub2的菜单中来???