无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站广告联系 微信:wuyouceo QQ:184822951
查看: 3222|回复: 2

[求助] grub4dos的菜单如何运用到grub2的菜单中来???

[复制链接]
发表于 2016-3-29 14:41:59 | 显示全部楼层 |阅读模式
grub4dos菜单如:
title 【01】 Win2003PE迷你维护系统
echo $[1106] 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)文件要先加载,该如何写菜单??
发表于 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
}


回复

使用道具 举报

发表于 2016-3-31 15:44:56 | 显示全部楼层
参考下,希望有帮助
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|捐助支持|无忧启动 ( 闽ICP备05002490号-1 )

闽公网安备 35020302032614号

GMT+8, 2024-4-18 13:34

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表