ubuntu 10.04显示grub菜单

来源:互联网 发布:windows 64 oracle sga 编辑:程序博客网 时间:2024/05/18 00:46
安装ubuntu10.04后,如果机器上只有一个系统,默认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 <<EOF
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
}

阅读(600) | 评论(0) | 转发(0) |
0

上一篇:链接静态库循环依赖解决方法

下一篇:内存屏障(memory barrier)

相关热门文章
  • linux 常见服务端口
  • 【ROOTFS搭建】busybox的httpd...
  • 什么是shell
  • linux socket的bug??
  • linux的线程是否受到了保护?...
  • 关于enqueue 的dump 文件帮看...
  • tar --newer 05/12/2013 这个...
  • 请教nginx代理tomcat作为子目...
  • LDAP安装 bus error是什么问...
  • select语句不修改sql,如何优...
给主人留下些什么吧!~~