MBR扇区故障问题!

一:模拟破坏/sda主硬盘破坏再修复!

[root@roomc~]#mkdir /a         //创建一个目录

[root@roomc~]#mount /dev/sdb1 /a     //将为故障的硬盘sdb挂载到/a目录上

[root@roomc~]#dd if=/dev/sda of=/a/xiufu bs=512 count=1     //备份sda到/a目录下取名为xiufu

[root@roomc~]#dd if=/dev/zero of=/dev/sda bs=512 count=1  //破坏sda主硬盘区

[root@roomc~]#ls /a     //查看/a目录下有没有xiufu的文件

[root@roomc~]#reboot    //重启虚拟机

二:进行故障修复!

选择troubleshooting      //故障修复

选择Rescue a CentOS system    //

输入1(Countinue)

回车

[root@roomc~]#mkdir /b

[root@roomc~]#mount /dev/sdb1 /b

[root@roomc~]#dd if=/b/xiufu of=/dev/sda bs=512 count=1

猜你喜欢

转载自www.cnblogs.com/cxm123123form/p/11308230.html