我键入如下命令:
sudo gedit /etc/default/grub
修改成:
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
然后输入
sudo update-grub
这样就隐藏了grub2的菜单了吧
但是我隐藏后怎么在隐藏菜单的情况下开机显示菜单?
我是因为怕别人进我的win7系统所以就隐藏了gurb菜单,
可也不能每次想进win7的时候总先在linux中修改grub吧,
从网上查得按shift键可以显示菜单。
可是我试了好几次都只是显示grub loading……就进系统了!
求高手讲解一下!
关于grub2的隐藏问题,求高手解答!
- zwwlucky
- 帖子: 58
- 注册时间: 2008-09-05 15:26
- 联系:
- onshoestring
- 论坛版主
- 帖子: 4666
- 注册时间: 2009-09-06 5:53
Re: 关于grub2的隐藏问题,求高手解答!
使用者可以在启动时按住 SHIFT 键不放以强制显示菜单。
启动过程中,系统将会检查 SHIFT 键状态。若无法辨识按键状态,会有一个短时间的延迟让使用者可通过按下 ESC 键来显示菜单。
启动过程中,系统将会检查 SHIFT 键状态。若无法辨识按键状态,会有一个短时间的延迟让使用者可通过按下 ESC 键来显示菜单。
- zwwlucky
- 帖子: 58
- 注册时间: 2008-09-05 15:26
- 联系:
Re: 关于grub2的隐藏问题,求高手解答!
正解!原来是按esc键啊,也不知道前几次按esc怎么不管用呢!可能是没有按对时间吧!谢谢了onshoestring 写了:使用者可以在启动时按住 SHIFT 键不放以强制显示菜单。
启动过程中,系统将会检查 SHIFT 键状态。若无法辨识按键状态,会有一个短时间的延迟让使用者可通过按下 ESC 键来显示菜单。
-
- 帖子: 127
- 注册时间: 2006-11-10 0:34
Re: 关于grub2的隐藏问题,求高手解答!
lz 你试过了么,确认这样可行? 我从8.04更换系统到10.04时也遇到过这个问题
后来研究grub2文档时发现一段
Note to multiple-OS users: If GRUB 2's os-prober identifies additional operating systems while running the /etc/grub.d/30_os-prober script the hidden menu timeout feature is disabled by conditional statements. This also disables the ability to use the SHIFT key to display the menu during boot. Users with multiple operating systems wishing to hide the menu can find script edits on various forums which will allow them to add a hidden timeout feature to the boot sequence.
也就是说多系统时 os-probe 发现其他系统后, timeout 功能关闭,shift功能关闭,想要强制隐藏菜单,用户可以自己去各大论坛找
后来找到了一种答案,试验成功的,这样做之后,开机后就会隐藏菜单,按shift键会显示
而且 /etc/default/grub 文件不需要改动,PS 我现在是用双系统
把这一行注释掉
换成:
然后
后来研究grub2文档时发现一段
Note to multiple-OS users: If GRUB 2's os-prober identifies additional operating systems while running the /etc/grub.d/30_os-prober script the hidden menu timeout feature is disabled by conditional statements. This also disables the ability to use the SHIFT key to display the menu during boot. Users with multiple operating systems wishing to hide the menu can find script edits on various forums which will allow them to add a hidden timeout feature to the boot sequence.
也就是说多系统时 os-probe 发现其他系统后, timeout 功能关闭,shift功能关闭,想要强制隐藏菜单,用户可以自己去各大论坛找
后来找到了一种答案,试验成功的,这样做之后,开机后就会隐藏菜单,按shift键会显示
而且 /etc/default/grub 文件不需要改动,PS 我现在是用双系统
代码: 全选
sudo gedit /etc/grub.d/30_os-prober
代码: 全选
if [ "x${found_other_os}" = "x" ] ; then
代码: 全选
if [ true ] ; then
代码: 全选
sudo update-grub