在LINUX下备份-恢复MBR

九月 14th, 2009 Posted in Centos, Ubuntu | 阅读次数: 226 次

制作:高进波
时间:2009-09-14

1.术语解释
MBR:
主引导记录,为计算机启动后从可启动介质上首先装入内存并且执行的代码,通常用来解释分区结构。以硬盘为例,通常为LBA的0扇区。

EBR:
自MICROSOFT推出扩展分区的概念后,扩展分区就沿用了基本分区所采用的DPT结构,为了加以区别,人们通常把扩展分区的分区表所在的扇区称为EBR、EMBR、扩展MBR或虚拟MBR.

DBR:
为操作系统进入文件系统以后可以访问的第一个扇区,通常用来解释文件系统,在UNIX类文件系统中,等同于SUPERBLOCK。

2.备份MBR
dd if=/dev/sda of=/root/boot.mbr bs=512 count=1
说明:将MBR备份到/root/boot.mbr文件,如果硬盘是IDE,请将sda换成hda

3.恢复MBR
dd if=/root/boot.mbr of=/dev/sda bs=512 count=1

4.故障演示
1)清除,破坏MBR
dd if=/dev/zero of=/dev/sda bs=512 count=1
fdisk -l

2)恢复
dd if=/root/boot.mbr if=/dev/sda bs=512 count1
fdisk -l

强烈建议故障演示在非工作环境测试!
此方法同样适合Redhat,centos,ubuntu,fedora,debian等系统

完成!

随机日志

Tags:

2 Responses to “在LINUX下备份-恢复MBR”

  1. Home Remedies for Yeast Infections Says:

    Recent Favourite Sites…

    [...]below you’ll find my recommended links page http://www.yeastinfectiontreatmentcure.net/links/ with some great websites that I think you should visit[...]…


  2. yeast infection cure Says:

    My Recommended Websites…

    [...]some new websites on the web we love, even if they are not related to ours. Check them out[...]…


留下您的脚印