LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1405|回复: 11

各位大哥,帮帮忙啊:最近重装了98和XP,启动时就见不到grub的选择界面,修复后还是没有,怎

[复制链接]
发表于 2004-11-7 09:31:45 | 显示全部楼层 |阅读模式
我有三个系统,98(C盘)xp(D盘),还有redhat。。。
最近重装了98和XP,启动时就见不到grub的选择界面了。。。
之后我就用论坛的方法,
用安装盘进入linux rescue
接着chroot / mnt/sysimage
然后grub
grub> root (hd0,9)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
Running "install /grub/stage1 (hd0) (hd0)1+16 p (hd0,9)/grub/stage2 /grub/grub.conf"... succeeded
Done.
修复之后出现grub loading please wait。。。。
接着整个屏幕就只有一个光标在左上角一直闪,很久之后还是没有出现grub的画面。。。按回车键的话却出现没装linux前那样的98跟XP的选择界面。。。用‘方向键的向右’有时也跟按回车键出现的情况一样,但有时却给出现grub的画面。。。不过画面很模糊(没有以前正常时那么清晰)。。。接着直接选Red Hat Enterprise Linux ES (2.4.21-9.EL)还是进不了redhat 只有edit,把
  root (hd0,10)
  kernel /vmlinuz-2.4.21-9.EL ro root=LABEL=/
  initrd /initrd-2.4.21-9.EL.img
中的root (hd0,10)改为root (hd0,9)才能进入redhat
请问这是什么问题,应该如何修复,让它正常???
附一点我的配置:
文件系统               1K-块        已用     可用 已用% 挂载点
/dev/hda11             5344528   4603672    469360  91% /
/dev/hda10              101089      9222     86648  10% /boot
/dev/hda13              342241     41617    282955  13% /linxx
none                    127464         0    127464   0% /dev/shm
/dev/hda8             20472816  20137296    335520  39% /mnt/win/g
/dev/hda6             19416736  19310696    106040 10% /mnt/win/e
/dev/hda5              5114692   4112540   1002152  58% /mnt/win/d
/dev/hda1              2044244   1367376    676868  67% /mnt/win/c
/dev/hda7             15343104  15332280     10824 35% /mnt/win/f
/dev/hda9              4753936   4361912    392024  82% /mnt/win/h

(parted) pr
Disk geometry for /dev/hda: 0.000-76319.085 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          0.031   2000.280  primary   fat32       boot
2       2000.281  76316.594  extended              lba
5       2000.312   7004.904  logical   fat32
6       7004.936  26003.649  logical   fat32
7      26003.681  41001.833  logical   fat32
8      41001.864  61004.641  logical   fat32
9      61004.672  65656.274  logical   fat32
10     65656.305  65758.249  logical   ext3
11     65758.280  71060.954  logical   ext3
12     71060.985  71311.970  logical   linux-swap
13     71312.001  71657.116  logical   ext3
14     71657.147  76316.594  logical   ntfs


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,10)
#          kernel /vmlinuz-version ro root=/dev/hda12
#          initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,10)/grub/splash.xpm.gz
password --md5 $1$HZAh84gC$uklhiH1lqRi5JQe.
title Red Hat Enterprise Linux ES (2.4.21-9.EL)
        root (hd0,10)
        kernel /vmlinuz-2.4.21-9.EL ro root=LABEL=/
        initrd /initrd-2.4.21-9.EL.img
title DOS
        rootnoverify (hd0,0)
        chainloader +1
发表于 2004-11-7 11:07:31 | 显示全部楼层
进入系统后改/boot/grub/grub.conf把(hd0,10) 改为(hd0,9).相应的fstab里的swap分区可能也要改一下。
这种情况是由于重装windows过程中造成分区表改变,分区序号与以前不同造成的。
 楼主| 发表于 2004-11-7 12:06:42 | 显示全部楼层
谢谢snoopyxp兄,用你的方法修改之后问题解决了一半(也就是能够成功进入linux了)。。,但还没完全解决:
重启之后出现grub loading please wait。。。。
接着整个屏幕就只有一个光标在左上角一直在闪,很久之后还是没有出现grub的画面。。。还是这个文件
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,10)
# kernel /vmlinuz-version ro root=/dev/hda12
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,10)/grub/splash.xpm.gz
password --md5 $1$HZAh84gC$uklhiH1lqRi5JQe.
title Red Hat Enterprise Linux ES (2.4.21-9.EL)
root (hd0,10)
kernel /vmlinuz-2.4.21-9.EL ro root=LABEL=/
initrd /initrd-2.4.21-9.EL.img
title DOS
rootnoverify (hd0,0)
chainloader +1

]重启之后还是出现grub loading please wait。。。。
接着整个屏幕就只有一个光标在左上角一直在闪,很久之后还是没有出现grub的画面。。。按回车键或用‘方向键的向右’的话却出现没装linux前那样的98跟XP的选择界面。。。
我把default=1改为default=0之后,重启,还是出现grub loading please wait。。。。
接着整个屏幕就只有一个光标在左上角一直在闪,很久之后还是没有出现grub的画面。。。按回车键或用‘方向键的向右’的话却直接进入redhat??
这又是怎么一回事,我想让它有得选择,不要每次系统切换老是要改default=* 。。。请snoopyxp兄再帮帮忙!!!
发表于 2004-11-7 12:13:50 | 显示全部楼层
splashimage=(hd0,10)/grub/splash.xpm.gz
这里的(hd0,10)也要改为(hd0,9),不然的话grub加载背景图片出错,就会造成你现在遇到的情况。
 楼主| 发表于 2004-11-7 12:41:30 | 显示全部楼层
真是笨啊,
谢谢snoopyxp兄,问题解决了
发表于 2005-1-12 15:37:16 | 显示全部楼层
我的情况
grub> root (hd0,7)
Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

error 15:File not found

下一步,我该责么作
发表于 2005-1-12 17:29:57 | 显示全部楼层
你的grub文件不在(hd0,7),你的/boot分区是在hda8么
发表于 2005-1-13 09:24:41 | 显示全部楼层
我在grub>状态下只看到hd0,7是linux分区,并且在hd0,7下只看到root,dev,etc,usr,var,temp,没看到boot,我用find / -name grub.conf,也说没找到文件。是不是我的机器被人误删了文件了,本来我的机器的问题是,用root登录时,报没有认证的错,我就硬关机。我用的是redhat9.0,现在不能重装,因为上面有数据文件的,在/home/usr上,现在在grub下home目录也看不到。我该怎么办,请各位帮我想想办法。
发表于 2005-1-13 11:42:24 | 显示全部楼层
这样试试:(假设你只有一个硬盘)
grub>find (hd0,
敲Tab键会打印出hd0的所有分区,仔细看,如果你只有7是linux分区的话,接着往下:
grub>find (hd0,7)/
再次敲Tab键,会打印出(hd0,7)上面所有的文件,看看是不是只有你说的只看到root,dev,etc,usr,var,temp,真是这样的话,我想很难挽回了
发表于 2005-1-13 15:20:45 | 显示全部楼层
是的,还没有boot,我的数据在/home/usr/下,也没看到/home。现在我只能重装了吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表