Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3962698
  • 博文数量: 366
  • 博客积分: 9916
  • 博客等级: 中将
  • 技术积分: 7195
  • 用 户 组: 普通用户
  • 注册时间: 2011-05-29 23:27
个人简介

简单!

文章分类

全部博文(366)

文章存档

2013年(51)

2012年(269)

2011年(46)

分类: LINUX

2012-02-21 22:20:45

       安装ubuntu10.10后,如果机器上只有一个系统,默认grub菜单是不会显示的,如果想要显示,按如下步骤操作:
1.把/etc/default/grub文件中的GRUB_HIDDEN_TIMEOUT=0的0改为大于0的数字,比如5;
2.把/etc/grub.d/30_os-prober文件中的所有set timeout=0的0改为10,如下:
adjust_timeout () {
  if [ "x${found_other_os}" = "x" ] ; then
    if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
      if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
verbose=
      else
verbose=" --verbose"
      fi
      if [ "x${GRUB_HIDDEN_TIMEOUT}" = "x0" ] ; then
cat <if [ /${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=10
    fi
  else
    if sleep$verbose --interruptible 3 ; then
      set timeout=10
    fi
  fi
fi
EOF
      else
cat << EOF
if [ /${timeout} != -1 ]; then
  if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
    set timeout=10
  fi
fi
EOF
      fi
    fi
  fi
}
3.在终端下执行update-grub,更新grub.cfg文件
阅读(2139) | 评论(2) | 转发(0) |
给主人留下些什么吧!~~

txgc_wm2012-02-21 22:49:23

已作测试,no problem!

txgc_wm2012-02-21 22:41:57

第三步千万不能忘了。