重装windows之后恢复grub

热度:

装win+linux双系统的人都会碰到windows重装之后grub被洗掉的问题,解决起来倒也简单,google一下就好了,以下是google到的方法(测试有效):

找一张linux的live cd或者live dvd(我用的是Ubuntu 8.04 LTS的live dvd),开一个live session(就是试用),然后打开终端,输入:

sudo grub

sudo就是以root身份执行命令,grub就是启动grub配置程序

然后就是所谓的"grub shell",提示符会变成"grub>"。输入命令

find /boot/grub/stage1

会返回一个hdx,y的值,其中x,y都是数字。这代表了你的linux装在哪个硬盘的那个分区上,这是下一步恢复grub的重要信息!一般来说x都是0(双硬盘的除外),y则随着分区设置不同而变化。不管是多少,记住就好了。

接下来输入命令:

root (hdx,y)

x,y就是刚才返回的值。

再输入命令:
setup (hd0)

分区表就被写入了,恢复就算完成了。因为之前双系统的grub配置并没有被破坏,menu.lst也不用重写,只是把信息重新写到MBR里面,所以过程很简单。

最后打个quit退出grub shell,重启就能看到原来的grub菜单了。

Technorati 标签: , ,

本站标签: , ,

发表评论

日历

2010年七月
« 六    
 1234
567891011
12131415161718
19202122232425
262728293031  

文章索引模板

链接

StatPressCN

Since 20091224:
  • Current page is visited 0 times
  • Now there are 0 friends visiting this blog, 10 today, 7 yesterday, and 148 totally
  • The posts have been viewed 20 times today, 10 yesterday, and 465 totally
  • 0 friends have subscribed this blog
  • The TopPost is Cadence IC5141+Assura 314完全安装指南, TopBroswer is Firefox 3, TopOS is Windows XP
  • You come from , your broswer is , OS is
  • This blog have 53 posts, 4 pages, 8 comments, and 5 commentors.

技术支持来自 天高云淡

BABY COUNT

Just updated...
The Count is 2236.