LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1744|回复: 4

请教如何使用dd命令备份MBR和引导区

[复制链接]
发表于 2004-8-26 11:00:06 | 显示全部楼层 |阅读模式
系统是winxp+win2k3+FC2,  用NTOSLDR引导, 每次重装xp后2k3不能引导, 用紧急恢复控制台中的fixmbr和fixboot都不解决问题. 由于是NTFS的文件系统, 没有找到较好的备份工具. 突然想到我的linux的引导区的dump是用dd做的, 不知能否也用dd来备份MBR和C盘引导区. :help
发表于 2004-8-26 11:41:42 | 显示全部楼层
Example:
MBR
dd if=/dev/hda of=<backup file> bs=512 count=1

Boot Sector (not sure):
# dd if=/dev/hda1 of=<backup file> bs=512 count=1

Take a look at this article:
http://mandrakeusers.org/index.php?showtopic=16804

google keyword:
dd backup mbr
发表于 2004-8-26 22:01:09 | 显示全部楼层
For mbr backup to floppy:
dd if=/dev/hda of=/dev/fd0 bs=512 count=1
Floppy will boot like the hd does.
For bootsector backup:
dd if=/dev/[partition] of=/dev/fd0 bs=512 count=1
Floppy will boot like partition does.
For backup of either to file (mbr in this case):
dd if=/dev/hda of=/mbr.bak bs=512 count=1
If you want to copy back to hd, keep in mind that parititon info is in the first 16 bytes of the mbr, you will need to skip it if you don't want new partition data overwritten.

http://www.linuxquestions.org/qu ... d=853241#post853241
 楼主| 发表于 2004-8-28 07:43:30 | 显示全部楼层
收到. 突然发现, 不好把备份文件写回去. 难道要用WinHex?
发表于 2004-8-28 23:23:33 | 显示全部楼层
If you want to copy back to hd, keep in mind that parititon info is in the first 16 bytes of the mbr, you will need to skip it if you don't want new partition data overwritten
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表