Chinaunix首页 | 论坛 | 博客
  • 博客访问: 113551
  • 博文数量: 16
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 380
  • 用 户 组: 普通用户
  • 注册时间: 2007-01-05 09:24
文章分类

全部博文(16)

文章存档

2011年(1)

2008年(15)

我的朋友

分类: LINUX

2008-03-12 16:22:02

$在 rescue 模式下修复 MBR:
# >1< 破坏 GRUB 使之不能启动;
[bady]#   dd if=/dev/zero of=/dev/sda bs=446 count=1;reboot
# >2< 从光盘/软盘启动输入 linux rescue 进入 rescue 模式;







sh-2.05b# mount       /* 以读写模式加载硬盘文件,进入后用 mount 检查文件系统加载是否正确 */
sh-2.05b# fdisk -l /dev/sda     /* 查看分区情况 */
sh-2.05b# cat /mnt/sysimage/boot/grub/grub.conf  /* 要注意:硬盘加载在/mnt/sysimage 目录下,检查 grub.conf 文件 */
sh-2.05b# chroot /mnt/sysimage    /* 使 /mnt/sysimage 成为 grub-install 认为的系统得根 */
sh-2.05b# grub-install /dev/sda    /* 加载 chroot shell,运行 grub-install */
sh-2.05b# exit       /* 退出 chroot shell */
sh-2.05b# exit       /* 退出 rescue 模式 */
阅读(2720) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~