老版本xmeye下载安装:重新安装grub到mbr

来源:百度文库 编辑:中财网 时间:2024/04/28 00:12:13
因为重新了windows系统,grub坏了,只好自己重新安装上了。

1.先下载grub4dos并安装重新启动进入grub命令模式(这个就不说了,很多有教材)

2.进入linux操作系统
root (hd0,8)
kernel (hd0,8)/boot/vmlinuz-2.6.27.7-134.fc10.i686
initrd (hd0,8)/boot/initrd-2.6.27.7-134.fc10.i686.img
boot

3.重新安装grub到MBR
[jerry@jerry ~]$ cd /boot
[jerry@jerry boot]$ su
密码:
[root@jerry boot]# grub
Probing devices to guess BIOS drives. This may take a long time.


GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root (hd0,8)
root (hd0,8)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 23 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+23 p (hd0,8)/boot/grub/stage2 /boot/grub/grub.conf"... succeeded
Done.
grub> quit
[root@jerry boot]# 

4.重新启动后就可以进入图形化的grub了

ps:
[root@jerry grub]# cat grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,9)不知道这里是怎么回事,变成了9,应该是8,所以要把下面的(hd0,9)全部换成8,否则找不到
# kernel /boot/vmlinuz-version ro root=/dev/sda10
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=2
timeout=30
splashimage=(hd0,8)/boot/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$yN9a5rTU$ktMVYhwhJhnh9DB2pCOLT0
title Fedora (2.6.27.7-134.fc10.i686)
root (hd0,8)
kernel /boot/vmlinuz-2.6.27.7-134.fc10.i686 ro root=UUID=c7bd3111-548f-4561-961d-dcd336ecce3f rhgb quiet
initrd /boot/initrd-2.6.27.7-134.fc10.i686.img
title Fedora (2.6.27.5-117.fc10.i686)
root (hd0,8)
kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=UUID=c7bd3111-548f-4561-961d-dcd336ecce3f rhgb quiet
initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1