[已解决]Grub菜单丢失,出现Grub>
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- lrk
- 帖子: 83
- 注册时间: 2007-10-11 17:44
[已解决]Grub菜单丢失,出现Grub>
ubuntu 7.40
在windows下用PM从C盘划出10G安装的ubuntu,Grub装在根分区,用windows的NTLDR来引导多系统。因为是校园网用不了,只好用代理上,方法是用VM使用物理硬盘,引导本来的XP,再用XP代理。昨日开代理用了很久,后来关机也很急(就是有些程序没关就直接关了XP和UBUNTU),后来开机就出错了,提示NTLDR丢失。在win下的恢复控制台显示C盘文件时枚举失败,怀疑是C盘磁盘发生错误,手上没什么启动盘,C盘又是NTFS,搞了很久没解决。最后是用了一张win2003来安装,在安装的开始阶段检查完硬盘后提示修复了错误,要重启继续安装,结果重启时正常了,多启动菜单也出来了,当进入了XP以为没事了。谁知今日上UBUNTU时,竟然出错了,Grub我启动菜单没见了,只有Grub>的提示。在网上找了找,找到个方法入系统,但是不成功,还是出错,我截了图,大家看看。
网上找到的解决方法
最终的出错
最奇怪的是好像分区的编号变了,我看了看/boot/grub/menu.lst,原来在ubuntu分区识别为(hd0,3),即是sda4吧?但现在要改成(hd0,1)才对,变成了sda2.问题可能就是出在这,但我又不知怎样解决,大家指点一下。
在windows下用PM从C盘划出10G安装的ubuntu,Grub装在根分区,用windows的NTLDR来引导多系统。因为是校园网用不了,只好用代理上,方法是用VM使用物理硬盘,引导本来的XP,再用XP代理。昨日开代理用了很久,后来关机也很急(就是有些程序没关就直接关了XP和UBUNTU),后来开机就出错了,提示NTLDR丢失。在win下的恢复控制台显示C盘文件时枚举失败,怀疑是C盘磁盘发生错误,手上没什么启动盘,C盘又是NTFS,搞了很久没解决。最后是用了一张win2003来安装,在安装的开始阶段检查完硬盘后提示修复了错误,要重启继续安装,结果重启时正常了,多启动菜单也出来了,当进入了XP以为没事了。谁知今日上UBUNTU时,竟然出错了,Grub我启动菜单没见了,只有Grub>的提示。在网上找了找,找到个方法入系统,但是不成功,还是出错,我截了图,大家看看。
网上找到的解决方法
最终的出错
最奇怪的是好像分区的编号变了,我看了看/boot/grub/menu.lst,原来在ubuntu分区识别为(hd0,3),即是sda4吧?但现在要改成(hd0,1)才对,变成了sda2.问题可能就是出在这,但我又不知怎样解决,大家指点一下。
- 附件
-
- 网上找到的方法
- 2008-03-11_223147.gif (8.08 KiB) 查看 172 次
-
- 最终出错
- 2008-03-11_223709.gif (11.41 KiB) 查看 173 次
上次由 lrk 在 2008-03-14 12:27,总共编辑 1 次。
-
- 帖子: 286
- 注册时间: 2006-11-08 16:33
- lrk
- 帖子: 83
- 注册时间: 2007-10-11 17:44
终于找到方法
kernel时换成了
可以启动了 但那个"root=UUID=ea5455c5-020d-4998-a7d4-bc6c24351cff"又长又难打啊 这是怎么回事
怎样解决好 重装grub有用吗?重装会不会丢失原来的菜单?我看到原来那个menu.lst是还完好存在的,怎么办好?
原来的menu.lst
kernel时换成了
代码: 全选
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=ea5455c5-020d-4998-a7d4-bc6c24351cff ro quiet splash
怎样解决好 重装grub有用吗?重装会不会丢失原来的菜单?我看到原来那个menu.lst是还完好存在的,怎么办好?
原来的menu.lst
代码: 全选
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10
## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu
# Pretty colours
#color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=ea5455c5-020d-4998-a7d4-bc6c24351cff ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,3)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## Xen hypervisor options to use with the default Xen boot option
# xenhopt=
## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true
## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-16-generic
root (hd0,3)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=ea5455c5-020d-4998-a7d4-bc6c24351cff ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,3)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=ea5455c5-020d-4998-a7d4-bc6c24351cff ro single
initrd /boot/initrd.img-2.6.20-16-generic
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,3)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=ea5455c5-020d-4998-a7d4-bc6c24351cff ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,3)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=ea5455c5-020d-4998-a7d4-bc6c24351cff ro single
initrd /boot/initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd0,3)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
chainloader +1
- eexpress
- 帖子: 58428
- 注册时间: 2005-08-14 21:55
- 来自: 长沙
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
-
- 帖子: 286
- 注册时间: 2006-11-08 16:33
- TeliuTe
- 论坛版主
- 帖子: 7668
- 注册时间: 2007-11-25 13:29
- 系统: 16/18/20/w7
- 来自: 新疆博乐
- 联系:
- BigSnake.NET
- 帖子: 12522
- 注册时间: 2006-07-02 11:16
- 来自: 廣州
- 联系:
-
- 帖子: 1331
- 注册时间: 2006-07-09 12:22
- 来自: 南京
- lrk
- 帖子: 83
- 注册时间: 2007-10-11 17:44
多谢8楼和9楼,终于可以登录了,用了下面的命令:
像3楼那样的确是试过并出错的,应该也没有输错,前后对比差异,问题可能就是在“ro quiet splash”这个参数上,之前的时候嫌麻烦没加上,后来看了一下menu.lst是有的就加上了。那么这三个参数到底是什么用的呢?
10楼changys04:
ls -l /dev/disk/by-uuid/的结果:
“grub>configfile (hd0,1)/boot/grub/menu.lst ”这个有什么作用??menu.lst我已修改成了(hd0,1)了,但还是没有恢复菜单。
多谢楼上所有人的热心帮助。
现在我可以登录ubuntu了,但我应怎样才可以修复grub呢,不能每次登录都靠输入啊。
代码: 全选
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=/dev/sda2 ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
boot
10楼changys04:
ls -l /dev/disk/by-uuid/的结果:
代码: 全选
总用量 0
lrwxrwxrwx 1 root root 10 2008-03-13 07:21 6F6B-B04A -> ../../sda5
lrwxrwxrwx 1 root root 10 2008-03-13 07:21 7413-C480 -> ../../sda7
lrwxrwxrwx 1 root root 10 2008-03-13 07:21 8E7C49185DEE8CC7 -> ../../sda3
lrwxrwxrwx 1 root root 10 2008-03-13 07:21 d1419681-e1b3-47c3-b13d-b76f7e9b59e6 -> ../../sda8
lrwxrwxrwx 1 root root 10 2008-03-13 07:21 D8BC77B4BC778BAE -> ../../sda6
lrwxrwxrwx 1 root root 10 2008-03-13 07:21 ea5455c5-020d-4998-a7d4-bc6c24351cff -> ../../sda2
lrwxrwxrwx 1 root root 10 2008-03-13 07:21 EA8CD3F98CD3BDEF -> ../../sda1
多谢楼上所有人的热心帮助。
现在我可以登录ubuntu了,但我应怎样才可以修复grub呢,不能每次登录都靠输入啊。