grub error 21, please help me

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

grub error 21, please help me

#1

帖子 chenweiguang82 » 2007-10-30 23:53

After re-install winxp and the grub doesn't work.
I am using the ubuntu 7.04 livecd now. (no chinese input method)
The following problems output while i want to fix the grub:( I once fixed grub in the same circumstance, and successed , but fail this time)

grub > root (hd0,
Error 21: Selected disk does not exist

but the output of fdisk -l is :
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1216 9767488+ c W95 FAT32 (LBA)
/dev/sda2 1217 9590 67264155 f W95 Ext'd (LBA)
/dev/sda3 3649 6080 19535008+ b W95 FAT32
/dev/sda5 1217 2104 7132797 83 Linux
/dev/sda6 2105 3436 10699258+ 83 Linux
/dev/sda7 3437 3648 1702858+ 82 Linux swap / Solaris
/dev/sda8 6081 9590 28194043+ b W95 FAT32

and when i use the gparted, which showes the whole hard disk unallocated
so I want to re-install ubuntu again, but in the 4th step, partation steps, which also showes a whole hard disk, so i can not continue.

But I can mount the above partation sda5(/) and sda6(home),and the files seems ok.

root@ubuntu:/# grub-install /dev/sda5
/dev/sda5: Not found or not a block device.

root@ubuntu:/# grub-install /dev/sda
/dev/sda: Not found or not a block device.

root@ubuntu:/# grub-install hd0
/dev/sda8: Not found or not a block device.
头像
chenweiguang82
帖子: 18
注册时间: 2007-05-09 12:12

#2

帖子 chenweiguang82 » 2007-11-01 16:57

高手帮忙看看呐,这个问题真的很郁闷的,想用linux用不了,想装也装不了
头像
fortruth
帖子: 1795
注册时间: 2005-11-06 1:51
来自: 七彩云世界
联系:

#3

帖子 fortruth » 2007-11-01 17:06

检查有没有挂上。要先挂一吧
佛出寺,求索真世界 For_Truth:Free_Open_Share
OPEN GPG KEY:03D18D95
dbzhang800
帖子: 3182
注册时间: 2006-03-10 15:10
来自: xi'an China
联系:

#4

帖子 dbzhang800 » 2007-11-01 17:29

grub>root (hd0,4)
grub>setup (hd0)
头像
chenweiguang82
帖子: 18
注册时间: 2007-05-09 12:12

#5

帖子 chenweiguang82 » 2007-11-04 19:52

fortruth 写了:检查有没有挂上。要先挂一吧
挂上了,绝对挂上了,而且在ubuntu的那个安装程序中也是只显示了整个硬盘,没分区的那种。
头像
aerowolf
帖子: 1778
注册时间: 2006-02-25 17:09
来自: 西安

#6

帖子 aerowolf » 2007-11-04 19:58

dbzhang800 写了:grub>root (hd0,4)
grub>setup (hd0)
看楼主的文字,可能应当是sd0,4。

不太懂,随便说说。 :oops:
早起的鸟儿有虫吃
早起的虫儿被鸟吃

http://aerowolf.blog.sohu.com/
亲,点一下免费获得Dropbox空间!
头像
chenweiguang82
帖子: 18
注册时间: 2007-05-09 12:12

#7

帖子 chenweiguang82 » 2007-11-04 20:04

dbzhang800 写了:grub>root (hd0,4)
grub>setup (hd0)
我输入root(hd0,
然后按“tab”键什么也没有,如果试着填的话,都出上面我说的那个错误。但是我使用mount可以加载原来的linux分区,也可以看到文件都正常。

另外我在windows下的磁盘管理可以看到如下的问题(见附件):
其中C为系统盘,后面的三个是linux分区,再往后的那个绿色和按着的E盘是一个问题,这两个应该为同一个盘。最后的两个和E盘的情况类似,也应为同一个盘,只是最后那个显示没有分配。
而且我这个硬盘实为80G。
在dos下的PQ中看是一个错误,显示不出来分区,ubuntu 的安装程序中也是。
请问这种情况是怎么回事?咋解决呢?我那个E、F盘有重要数据。
附件
在windows下的磁盘管理下的分区图
在windows下的磁盘管理下的分区图
头像
chenweiguang82
帖子: 18
注册时间: 2007-05-09 12:12

#8

帖子 chenweiguang82 » 2007-11-04 20:11

aerowolf 写了:
dbzhang800 写了:grub>root (hd0,4)
grub>setup (hd0)
看楼主的文字,可能应当是sd0,4。

不太懂,随便说说。 :oops:

谢谢帮助,sda也试了,不行,而且我mount时使用的是/dev/sda{number},可以正常加载,我想问题可能不是出在这个地方,而是分区表。但是分区表如上图,不知道咋解决 :(
头像
aerowolf
帖子: 1778
注册时间: 2006-02-25 17:09
来自: 西安

#9

帖子 aerowolf » 2007-11-04 20:21

分区表修改、修复工具:Disk Genius(DiskMan)。
早起的鸟儿有虫吃
早起的虫儿被鸟吃

http://aerowolf.blog.sohu.com/
亲,点一下免费获得Dropbox空间!
头像
aerowolf
帖子: 1778
注册时间: 2006-02-25 17:09
来自: 西安

#10

帖子 aerowolf » 2007-11-04 20:26

补:

实在不行先备份数据,工具finaldata,easyrecovery。

安装好Ubuntu之后,一定看看viewtopic.php?t=34110,超级简单,一劳永逸。

祝你好运。
早起的鸟儿有虫吃
早起的虫儿被鸟吃

http://aerowolf.blog.sohu.com/
亲,点一下免费获得Dropbox空间!
头像
chenweiguang82
帖子: 18
注册时间: 2007-05-09 12:12

#11

帖子 chenweiguang82 » 2007-11-04 21:20

谢谢各位,冲动了一下,使用diskgen重建了分区表,幸运的是数据没有丢,不过原来的ubuntu是没了。
不推荐这么做,这样的问题通常是分区表重叠导致的。
回复