修复ubuntu 9.04的Grub

由于重新分配了硬盘,所以导致Grub损坏,无法正常找到启动脚本。
于是用UltraISO,制作了ubuntu 9.04 usb启动盘,很容易,记得选择HDD+。

我用的是老婆的S10,自动识别U盘。通过启动盘进入系统,在管理模式输入以下命令:
#grub sude
!— 进入grub配置模式
[ 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> find /boot/grub/stage1
!— 查找boot引导分区的位置
(hd0,5)

grub> root (hd0,5)
!— 设置root所在位置

grub> setup (hd0)
!— 把Grub写到MBR上
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)”… 17 sectors are embedded.
succeeded
Running “install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,5)/boot/grub/stage2
/boot/grub/menu.lst”… succeeded
Done.

注意:有些文章说如果想删除grub,从双系统恢复成单系统,可以用“Fdisk /mbr”命令,一定要注意,我用过2次这个命令,一次是ok的,但另一次把我硬盘的分区表弄没了,还好通过DiskMan修复了,要不我珍贵的资料就。。。。。。

本文出自 Frank's Blog

版权声明:


本文链接:修复ubuntu 9.04的Grub
版权声明:本文为原创文章,仅代表个人观点,版权归 Frank Zhao 所有,转载时请注明本文出处及文章链接
你可以留言,或者trackback 从你的网站

留言哦

blonde teen swallows load.xxx videos