Chinaunix首页 | 论坛 | 博客
  • 博客访问: 10508850
  • 博文数量: 2905
  • 博客积分: 20098
  • 博客等级: 上将
  • 技术积分: 36298
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-23 05:00
文章存档

2012年(1)

2011年(3)

2009年(2901)

分类: LINUX

2009-03-23 11:15:12

$在 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 模式 */

阅读(400) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~