QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2308|回复: 13

关于重装xp进不了linux的(要求置为精华)

[复制链接]
发表于 2004-8-24 21:52:36 | 显示全部楼层 |阅读模式
关于grub的修改问题
原因:重新装windows系统导致MBR别重写,无法进入linux。(我的系统时redhat9+winxp)
解救的方法:

1.用linux光盘第一张,光驱引导进入。
2.linux rescue ,再回车。
3.一路continue下去。

4.到来好象有sh# 输入: chroot /mnt/sysimage
5.接着sh# 输入: grub,进入grub的环境


6.root (hd0, !!!有注意的是root 后面有个空格,很重要哦 !!!

(按Tab看你的linux装在哪里,这个是我的:
grub> root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type is fat, partition type 0xb
Partition num: 4, Filesystem type is fat, partition type 0xb
Partition num: 5, Filesystem type is fat, partition type 0xb
Partition num: 6, Filesystem type is fat, partition type 0xb
Partition num: 7, Filesystem type is ext2fs, partition type 0x83
Partition num: 8, Filesystem type unknown, partition type 0x82
Partition num: 9, Filesystem type is fat, partition type 0xb

grub> root (hd0,


这说明我的linux在(hd0,7)
hd0中的0代表第一个硬盘,普通人都是只有一个硬盘.
如果有两个硬盘的例外,如果你的linux放在第二个硬盘的话 ,要用hd1
上一步即是 root (hd0,7) 相对我的电脑

7.cat (hd0,7)/boot/grub/grub.conf (作用是看看你的grub的一些配置)


grub> cat (hd0,7)/boot/grub/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)
# kernel /boot/vmlinuz-version ro root=/dev/hda10
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=8
splashimage=(hd0,7)/boot/grub/splash.xpm.gz
title Red Hat Linux # (2.4.20-
root (hd0,7)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/ #这里阿!!!!!!!!!!!!!!!!!!!!
initrd /boot/initrd-2.4.20-8.img !!!!!!!!!!!!!!!!!!!!!!!!!
title WINXP
rootnoverify (hd0,0)
chainloader +1

grub>


8.kernel (hd0,7)/boot/vmlinuz-2.4.20-8 ro root=/dev/hda8 (如果忘记了,可以看上面的阿。)
9.initrd (hd0,7)/boot/initrd-2.4.20-8.img
10.setup (hd0)
11.boot
12.接着会跳出去,sh# 输入exit 再回车。(好象要两次)


说明:有个特殊的情况:当你重装windows时,一些原来hda即分区的顺序会改变了,
这时当你重启的时候,要按着上,下两个键来回换(在小键盘)
然后按到上面,在回车,它会提示你分区已经改变了
然后按 e ,修改。
例如: 原来的时root(hd0,9) 将它改成现在的root(hd0,7)
然后按 b ,重启。
发表于 2004-8-24 22:09:30 | 显示全部楼层
其实chroot 之后只要一个grub-instll 命令就行了。

还有有时候live cd 版的linux 比rescue 模式更好用。
回复

使用道具 举报

发表于 2004-8-24 23:36:14 | 显示全部楼层
回复

使用道具 举报

发表于 2004-9-27 01:26:47 | 显示全部楼层
楼主说的只是自动方式修复,那么当他不行时怎么办呢?!
回复

使用道具 举报

发表于 2004-9-27 10:20:01 | 显示全部楼层
请看我的关于Grub error 18的贴
回复

使用道具 举报

发表于 2004-9-27 15:24:43 | 显示全部楼层
怎么老找不到呢!??????     
回复

使用道具 举报

发表于 2004-9-27 15:32:53 | 显示全部楼层

我也找不到,看来是被删了

:-(
对于RH9, 简单说, 就是看Grub被装在哪里, 如果在了大于1024的柱面就不行
回复

使用道具 举报

发表于 2004-10-14 12:10:27 | 显示全部楼层

SOS

我用了楼主的办法去搞它了,但是每当我到
cat (hd0,2)/boot/grub/grub.conf这一步的时候系统就会提示找不到文件,我确定之前是按步骤一步一步地做的。即使跳过这一步,按照第8步的步骤也是不行的,也是提示找不到文件!到底要怎么办啊?好郁闷啊!
回复

使用道具 举报

发表于 2004-10-14 12:27:51 | 显示全部楼层
平谷六号 rh9 里的grub 已经没1024柱面问题了。

mdl56试试menu.lst 这个文件,有些版本的linux grub 的配置文件叫menu.lst

其实我开始就说过了,chroot 后 一个grub-instll 就行了。楼主是把简单问题复杂化了。
回复

使用道具 举报

发表于 2004-10-14 12:57:19 | 显示全部楼层
用grub-install /dev/hda把Linux成功重新引导了,但是又进不到我装的WinME了,这又要如何解决?
回复

使用道具 举报

发表于 2004-10-14 13:17:42 | 显示全部楼层
FT. 你的winme 放在哪个盘了?
贴你的grub.conf 看看。
回复

使用道具 举报

发表于 2004-10-14 14:19:46 | 显示全部楼层
# 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,0)
#          kernel /vmlinuz-version ro root=/dev/hda2
#          initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-
        root (hd0,0)
        kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
        initrd /initrd-2.4.20-8.img
我在grub模式里面用
root (hd0,
然后按TAB键的时候它好像显示第四个分区.
回复

使用道具 举报

发表于 2004-10-14 16:46:57 | 显示全部楼层
fdisk -l 看清你的win 安装分区所在。
然后在grub.conf 加下面这段
title Microsoft Windows
root (hd0,X)
chainloader (hd0,x)+1

x 等于几自己慢慢数吧,

btw:winme 不是应该在主分区的吗?
回复

使用道具 举报

发表于 2004-10-14 18:07:14 | 显示全部楼层
我是装了Linux后用PQ重分区,然后再装WinME的
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-6-7 13:17 , Processed in 0.058695 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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