LinuxSir.cn,穿越时空的Linuxsir!

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

[已解决]如何恢复f7的引导记录?

[复制链接]
发表于 2007-7-2 15:36:46 | 显示全部楼层 |阅读模式
我的硬盘是双系统的,f7的引导记录原来是在C盘(windows系统盘),结果今天帮朋友挂硬盘装系统,忘了调主从盘,把引导记录都写到我的盘上了。现在f7的引导记录都没了,只能进windows,想请教一下,该怎么恢复呢?
我原来是用硬盘安装的f7,手头上没有光盘。硬盘上现在有f7安装文件,grub for dos。windows系统盘是sda1,f7所在盘是sda3.
发表于 2007-7-2 15:38:37 | 显示全部楼层
f7的引导记录原来是在C盘(windows系统盘)

没法理解你的这句话。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-2 15:43:47 | 显示全部楼层
不好意思,我是新手,没说清楚。
原来安装时选择grub引导文件安装位置时我是选择的c盘,就是windows系统所在盘,而不是f7的根分区。
回复 支持 反对

使用道具 举报

发表于 2007-7-2 15:45:34 | 显示全部楼层
grub引导文件安装位置

这个我也不懂。

我不是高手,我比你菜。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-2 15:54:42 | 显示全部楼层
默认Linux的GRUB程序将覆盖windows的启动引导装载程序,安装时我没有改过这个选项@#¥%&×感觉越说越乱了……囧
回复 支持 反对

使用道具 举报

发表于 2007-7-2 17:18:14 | 显示全部楼层
用grub for dos,这是我的menu.lst文件内容,根据自己的linux分区修改下。

default=0

timeout=5

splashimage=(hd0,8)/grub/splash.xpm.gz

hiddenmenu

title Fedora (2.6.21-1.3228.fc7)

        root (hd0,8)

        kernel /vmlinuz-2.6.21-1.3228.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet

        initrd /initrd-2.6.21-1.3228.fc7.img

title Other

        rootnoverify (hd0,0)

        chainloader +1
回复 支持 反对

使用道具 举报

发表于 2007-7-2 17:20:13 | 显示全部楼层
grub for dos
http://nchc.dl.sourceforge.net/s ... b_for_dos-0.4.2.zip

grldr和menu.lst放C盘根目录,编辑boot.ini文件,在末尾添加c:\grldr="LINUX"
回复 支持 反对

使用道具 举报

发表于 2007-7-2 19:54:41 | 显示全部楼层
恩,楼上的是正解,要不挂一个盘,用光盘引导重新装Grub也是可以的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-7-3 02:23:51 | 显示全部楼层
谢谢啦!
往menu.lst里添加那个title运行老是提示file not found。不过意外发现原来的menu.lst有个install grub to mbr的title,运行了一下,竟然恢复了,嚯嚯,高兴啊!
顺便把它的内容也贴一下吧:

title install GRUB on (hd0,2) to MBR (hd0) and reboot. Password: danger
pause You requested to install GRUB onto MBR. We highly recommend you NOT to do so, basically for two reasons: 1. For some non-MS-compatible boot loaders(in case you might be using), the install is INDEED dangerous and may cause your whole disk(and all your operating systems on it) unaccessible. 2. Even if you are using(in MBR)an MS-compatible boot loader such as LILO and GRUB, you may encounter problems like hard-disk-boot-failure when you move or delete the /boot/grub/stage2 file, or even when disk defragmentation operations are made. Press any key to continue...
pause A password prompt will confirm that you want the operation anyway. Press any key to continue...
password danger
pause This will install GRUB in (hd0,2)/boot/grub/ to MBR. Press any key to begin...
root (hd0,2)
setup (hd0)
pause GRUB install OK! Press any key to reboot your machine...
reboot


不过还是看不明白就两句命令做了些什么?新手~~~
回复 支持 反对

使用道具 举报

发表于 2007-7-3 16:08:56 | 显示全部楼层
mbr 程序

boot sector 程序

理解了就好办了。
回复 支持 反对

使用道具 举报

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

本版积分规则

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