Ubuntu 修复Grub问题解决

系统 Linux
上面的都是网上可以长到的方法,我也是用这个方法恢复了Grub列表的,但是我还碰到了另外一个问题就是,我是Find命令得出的结果是(hd0,5),但是运行的时候,发现Grub里面的全部都是(hd0,6),所以还是无法找到文件,进不去系统。

请几天破坏了GRUB,用LIVECD修复,用LIVECD进入图形界面,打开终端输入一下命令:
$sudosu
$grub
grub>boot(hd0,6)/*原本我内核装载(hd0,7),不知道怎么内核所在扇区变了*/
grub>setup(hd0)

重启电脑,发现grub不能请到到linux里面去
按照GRUB下方的提示,按E键编辑甘选项
将(hd0,6)改为(hd0,7)
按B键启动,可以进入linux
进入后在/boot/grub/menu.list文件里面将相关的启动项修改
以后没有启动电脑就不用在修改GRUB的启动选项了。ubuntu下修复grub
1.用LiveCD启动
2.打开一个终端,运行$sudogrub命令(这里可能需要等一会儿),你会看到'grub>'这样的提示符grubupdate
3.在提示符'grub>'后输入find/boot/grub/stage1,你会得到一个运行结果,比如我的机子上结果是(hd0,3)(这个命令其实就是找出/boot所在分区)
4.运行grub>root(hd0,3)(这个位置要填上你机子上的运行结果)
5.运行grub>setup(hd0)出现几行提示文字,***是“...succeeded”修复成功!
6.运行quit
8.重启计算机,取出liveCD

#menu.lst-See:grub(8),infogrub,update-grub(8)
#grub-install(8),grub-floppy(8),
#grub-md5-crypt,/usr/share/doc/grub
#and/usr/share/doc/grub-doc/.

##defaultnum
#SetthedefaultentrytotheentrynumberNUM.Numberingstartsfrom0,and
#theentrynumber0isthedefaultifthecommandisnotused.
#
#Youcanspecify'saved'insteadofanumber.Inthiscase,thedefaultentry
#istheentrysavedwiththecommand'savedefault'.
#WARNING:Ifyouareusingdmraiddonotuse'savedefault'oryour
#arraywilldesyncandwillnotletyoubootyoursystem.
default1

##timeoutsec
#Setatimeout,inSECseconds,beforeautomaticallybootingthedefaultentry
#(normallythefirstentrydefined).
timeout3

##hiddenmenu
#Hidesthemenubydefault(pressESCtoseethemenu)
#hiddenmenu

#Prettycolours
#colorcyan/bluewhite/blue

##password['--md5']passwd
#Ifusedinthefirstsectionofamenufile,disableallinteractiveediting
#control(menuentryeditorandcommand-line)andentriesprotectedbythe
#command'lock'
#e.g.passwordtopsecret
#password--md5$1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
#passwordtopsecret

【编辑推荐】

  1. Ubuntu GRUB非常优秀的系统引导器
  2. Ubuntu GRUB開機選項修改
  3. Ubuntu grub利用安装光盘硬盘安装ISO文件
  4. Linux rescuev修复模式跨越控制台登录
  5. Linux rescue单用户模式修复模式

 

责任编辑:chenqingxiang 来源: linuxdiyf
相关推荐

2010-06-13 11:41:53

Ubuntu Grub

2010-06-12 13:49:50

Ubuntu 10.0

2010-06-12 09:02:12

Ubuntu Grub

2011-08-16 14:32:23

UbuntuLinuxQQ

2011-09-07 17:41:01

ubunturvm

2009-11-17 10:43:59

ubuntu 9.10输入法解决方法

2011-09-02 15:01:29

ubuntu

2011-09-02 13:25:39

UbuntuMacbuntu

2011-06-13 16:16:32

Qt 中文问题

2011-06-27 16:44:59

Qmake

2010-04-28 18:01:15

Unix系统

2010-05-05 10:25:24

Unix操作系统

2011-11-28 22:45:19

Nginxsession

2009-12-28 10:56:45

WPF Image

2010-06-17 09:39:07

Ubuntu Grub

2011-01-12 17:26:27

2012-05-09 10:08:41

跨机房

2010-05-05 14:20:46

AIX CDE

2011-01-21 14:13:10

2010-06-12 10:03:20

Ubuntu Grub
点赞
收藏

51CTO技术栈公众号