[求助]9.10每次开机都得自己手动选择grub项,好麻烦 !!!

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
头像
hormos
帖子: 62
注册时间: 2008-07-20 21:00
来自: 山东省-菏泽市
联系:

[求助]9.10每次开机都得自己手动选择grub项,好麻烦 !!!

#1

帖子 hormos » 2009-10-31 14:14

以前开机就直接进入grub菜单里默认但那一项了

现在升级了9.10,每次开机却自动显示grub2的菜单,我得手动按一下enter才能进入系统
这样子很麻烦,由于对grub2的grub.cfg不熟悉我不敢乱修改,求告手帮个忙啦

贴grub.cfg内容:

代码: 全选

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  saved_entry=${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 2c3b869a-f331-4616-9ca3-1b82d850ab8c
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=0
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	set quiet=1
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 0c2ac5cd-f26b-41de-b2b1-2f4b10b77981
	linux	/vmlinuz-2.6.31-14-generic root=UUID=2c3b869a-f331-4616-9ca3-1b82d850ab8c ro   quiet splash
	initrd	/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 0c2ac5cd-f26b-41de-b2b1-2f4b10b77981
	linux	/vmlinuz-2.6.31-14-generic root=UUID=2c3b869a-f331-4616-9ca3-1b82d850ab8c ro single 
	initrd	/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-5-generic" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	set quiet=1
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 0c2ac5cd-f26b-41de-b2b1-2f4b10b77981
	linux	/vmlinuz-2.6.31-5-generic root=UUID=2c3b869a-f331-4616-9ca3-1b82d850ab8c ro   quiet splash
	initrd	/initrd.img-2.6.31-5-generic
}
menuentry "Ubuntu, Linux 2.6.31-5-generic (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
	insmod ext2
	set root=(hd0,1)
	search --no-floppy --fs-uuid --set 0c2ac5cd-f26b-41de-b2b1-2f4b10b77981
	linux	/vmlinuz-2.6.31-5-generic root=UUID=2c3b869a-f331-4616-9ca3-1b82d850ab8c ro single 
	initrd	/initrd.img-2.6.31-5-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
	linux16	/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	linux16	/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: [求助]9.10每次开机都得自己手动选择grub项,好麻烦 !!!

#2

帖子 smallapple » 2009-10-31 14:24

大概你有不良记录 :em04

代码: 全选

if [ ${recordfail} = 1 ]; then
  set timeout=-1
把上面的 set timeout=-1 改为set timeout=0 试试
HHuazz
帖子: 9
注册时间: 2009-01-26 13:49

Re: [求助]9.10每次开机都得自己手动选择grub项,好麻烦 !!!

#3

帖子 HHuazz » 2010-06-16 0:57

smallapple 写了:大概你有不良记录 :em04

代码: 全选

if [ ${recordfail} = 1 ]; then
  set timeout=-1
把上面的 set timeout=-1 改为set timeout=0 试试
大哥,我设了默认启动XP,timeout=0, 现在都不知道怎么才能显示启动选项,现在进不了Ubuntu了.开机按ESC 也不行. :em18
回复