无忧启动论坛

标题: GRUB 中的一个新BUG [打印本页]

作者: szl1990    时间: 2009-2-2 22:22
标题: GRUB 中的一个新BUG
今天没事在找GRUB参数时发现了hiddenmenu 命令这是隐藏菜单的命令。用上这个命令后进入有密码的菜单,在密码输入错误后会执行关机命令,不知道为什么。

这是在 Microsoft Virtual PC2007虚拟机 里面测试的,不知道真机会不会关机。

有兴趣的同学可以研究一下。

不知道这个BUG有没有人发现

看看下面的菜单,进入☆ 进入子菜单 ☆菜单时输入个错误个密码,然后按下回车,这时电脑会关机。

timeout 10
default 8
fallback 12
foreground 000000
background FFFF00
password --md5 $1$A$Kgt7r2bfpYeatMbIOU.YU/
find --set-root /wyboot.ck_
fontfile /minipe/boot/fonts.gz
splashimage /minipe/boot/happy_new_year.xpm.gz
hiddenmenu
title                ☆ U盘启动系统 ☆
clear
title                         ☆ 进入子菜单 ☆
password --md5 $1$A$Kgt7r2bfpYeatMbIOU.YU/
find --set-root /wyboot.ck_
configfile /MiniPE/boot/menu1.lst
title 【01】  加载USB2.0驱动后启动 WinPE(适合老主板,测试中)
find --set-root /wyboot.ck_
map --mem /MiniPE/boot/DOS2PE.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title ─────────────────────────────────────
clear
title 【02】  启动 WinPE 神(_州乄龙修改版 (081129)
find --set-root /wyboot.ck_
chainloader /minipe/ldrxpe
title ─────────────────────────────────────
clear
title 【03】  启动GHOST 11.5.0 手动操作(USB2.0)
find --set-root /wyboot.ck_
map --mem /MiniPE/boot/ghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title ─────────────────────────────────────
clear
title 【04】  启动本机 Windows NT/2000/XP/2003 (hd0,0)
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1
title ─────────────────────────────────────
clear
title 【05】  重启计算机
reboot
title ─────────────────────────────────────
clear
title 【06】  关闭计算机
halt
title ─────────────────────────────────────
clear
title 【07】  从光驱启动系统
cdrom --init
map --hook
chainloader (cd0)
boot
title ─────────────────────────────────────
clear
title
clear
title  ┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
clear
title  ┃ 穿别人的鞋 ┃  ☆ By 神(_州乄龙 hi.baidu.com/353999772 ☆  ┃
clear
title  ┃  走自己的路 ┣ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ━ ┫
clear
title  ┃让别人找鞋去吧┃     河南·禹州  2008.6.18~2009.1.29    ┃
clear
title  ┗━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━┛
clear

作者: yobbo    时间: 2009-2-2 22:51
这样也行??>...........
作者: 七仙花    时间: 2009-2-2 22:58
你把这两个菜单的命令行顺序调换一下,试试会有什么结果。

title 【05】  重启计算机
reboot

title ─────────────────────────────────────
clear
title 【06】  关闭计算机
halt

作者: xya168    时间: 2009-2-2 23:00
好象你执行的是第8个任务   是关机  真机也会!
作者: yjd    时间: 2009-2-2 23:10
foreground 000000
background FFFF00
有上面就不要
splashimage /minipe/boot/happy_new_year.xpm.gz
不要混合用。

这里记错了。是和color不能混合用-_-!!!

[ 本帖最后由 yjd 于 2009-2-2 23:35 编辑 ]
作者: yjd    时间: 2009-2-2 23:21
原帖由 七仙花 于 2009-2-2 22:58 发表
你把这两个菜单的命令行顺序调换一下,试试会有什么结果。

title 【05】  重启计算机
reboot
title ─────────────────────────────────────
clear
title 【06】   ...

这位说的没错。

问题出在楼主自己菜单编写有误
前面有fallback 12

当输入错误密码回车=失败,将执行第12 title菜单,刚好你设置的是halt
作者: szl1990    时间: 2009-2-2 23:25
这也应该算是一个BUG吧

如果去掉  hiddenmenu  输入错误密码后再按下回车会返回主菜单,但是加上后输入错误密码却执行了fallback 12
后面的菜单,正常的话也应该返回主菜单才对的

大家说是不是
作者: yichya    时间: 2009-2-3 09:59
既然是fallback,输错密码也是启动失败,当然会跳fallback。




欢迎光临 无忧启动论坛 (http://bbs.c3.wuyou.net/) Powered by Discuz! X3.3