MBR修复

# MBR损坏修复
1 备份恢复
   备份 :dd if=/dev/sda of=/root/mbr.bin bs=512 count=1
   恢复 :dd if=/root/mbr.bin of=/dev/sda bs=512 count=1
2 使用紧急救援模式
    1)BOOR.ISO
    2)用光盘启动
    进入 Linux rescue 模式 基本蓝色配置 chroot /mnt/sysimage
    小LINUX# fd -l  看看boot目录录在哪个磁盘 若sha1=(hd0,0),sdb1=(hd1,0)
    grub> root (hs0,0)
    grub> setup (hd0)
    grub> quit  退出grub
    sync 同步
    reboot 重启


# MBR配置文件损坏
    grub> find (0,0)/---TAB     看能不能找到内核所在的
    grub> root (hs0,0)
    grub> kernel /vmlinuxz--TAB ro root=/dev/sda1所在路径 rhgb quiet
    grub> inintd /initrd--TAB
    grub> boot

 

posted on 2023-12-06 15:30  luokeli  阅读(31)  评论(0)    收藏  举报

导航