grub2的问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

grub2的问题

#1

帖子 gzbao9999 » 2009-10-05 17:37

新装的xubuntu9.10
装完后一路就直接进去了
没有出现选择内核的界面
该怎么修改?

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 ###
load_env
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,6)
search --no-floppy --fs-uuid --set 64fbf5de-d898-4bea-a4cc-80aabe843173
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=10
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-11-generic" {
recordfail=1
save_env recordfail
set quiet=1
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 64fbf5de-d898-4bea-a4cc-80aabe843173
linux /boot/vmlinuz-2.6.31-11-generic root=UUID=64fbf5de-d898-4bea-a4cc-80aabe843173 ro quiet splash
initrd /boot/initrd.img-2.6.31-11-generic
}
menuentry "Ubuntu, Linux 2.6.31-11-generic (recovery mode)" {
recordfail=1
save_env recordfail
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 64fbf5de-d898-4bea-a4cc-80aabe843173
linux /boot/vmlinuz-2.6.31-11-generic root=UUID=64fbf5de-d898-4bea-a4cc-80aabe843173 ro single
initrd /boot/initrd.img-2.6.31-11-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/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: grub2的问题

#2

帖子 smallapple » 2009-10-05 19:22

启动时长按shift键。
或把这段的timeout改为10,教程内有

### 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 ###
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: grub2的问题

#3

帖子 gzbao9999 » 2009-10-05 20:01

:em13
谢谢
按你提供的修改配置文件的方法
重启后就可以了


突然有个想法,
能不能在这弄个重启的选项?
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: grub2的问题

#4

帖子 smallapple » 2009-10-05 20:15

重启命令应该是 reboot

menuentry "Reboot" {
reboot
}
试试
上次由 smallapple 在 2009-10-05 22:32,总共编辑 1 次。
头像
windwiny
帖子: 2254
注册时间: 2007-03-13 17:26

Re: grub2的问题

#5

帖子 windwiny » 2009-10-05 20:17

都说了不要改这个文件,不看里面的说明。。。
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: grub2的问题

#6

帖子 gzbao9999 » 2009-10-05 21:42

smallapple 写了:重启命令应该是 reboot

menuentry"Reboot" {
reboot
}
试试
大哥 你太牛了! :em20
我那台电脑陷入重启死循环了
还有救吗?
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: grub2的问题

#7

帖子 smallapple » 2009-10-05 21:52

我那台电脑陷入重启死循环了
还有救吗?
怎么循环法? :em06
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: grub2的问题

#8

帖子 gzbao9999 » 2009-10-05 21:56

就是
本来该显示选项界面那
现在界面也不出了 直接又重启了
反复这样
---------------------------------------
怎么想办法恢复配置文件阿
关键一加载grub就自动重启了
更别提进系统了
上次由 gzbao9999 在 2009-10-05 22:05,总共编辑 1 次。
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: grub2的问题

#9

帖子 smallapple » 2009-10-05 22:04

你不会把timeout设为0又把
menuentry "Reboot" {
reboot
}
设为默认吧?
启动时按住shift 看能不能调出菜单。
上次由 smallapple 在 2009-10-05 22:30,总共编辑 1 次。
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: grub2的问题

#10

帖子 gzbao9999 » 2009-10-05 22:08

没有
我在原来的基础上
就添加了你提供的那几行
---------------------------------
不信你可以自己加上试试 :em06
按shift也不顶用,试过了
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: grub2的问题

#11

帖子 smallapple » 2009-10-05 22:10

我试试先 :em04
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: grub2的问题

#12

帖子 gzbao9999 » 2009-10-05 22:14

smallapple 写了:我试试先 :em04
:em29 :em08
等你消息
气血鼓荡,身体发胀,偶飘上头,三时舒畅
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: grub2的问题

#13

帖子 gzbao9999 » 2009-10-05 22:22

:em16
有一会了
估计又一台电脑开不起机了 :em25 :em19
气血鼓荡,身体发胀,偶飘上头,三时舒畅
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: grub2的问题

#14

帖子 smallapple » 2009-10-05 22:33

我真该死,我有罪。 :em02
上面少打了个空格。
LZ有没有可启动的光盘或U盘?
gzbao9999
帖子: 627
注册时间: 2008-11-08 18:34

Re: grub2的问题

#15

帖子 gzbao9999 » 2009-10-06 1:31

没有啊, :em20
这下死球了
困的眼都要睁不开了,先睡。
是哪儿少打个空格?
---------------------------------
我这只有xp的盘,怕是不顶用
气血鼓荡,身体发胀,偶飘上头,三时舒畅
回复