备份MBR分区
0. 备份硬盘的分区信息:
#fdisk /dev/sda -l > /tem/sda.txt
1.使用fdisk -l 确定MBR位置
2.备份MBR
dd if=/dev/sda1 of=/root/mbr bs=512 count=1
3.恢复MBR
dd if=/root/mbr of=/dev/sda1 bs=512 count=1
4.恢复分区表
dd if=/root/mbr of=/dev/sda1 bs=512 skip=446 count=66
注:mbr大小512 所以bs=512 count=1
bs=512 skip=446 count=66 用来确定分区表在备份文件中的位置
Linux下如何备份和恢复分区表
最新推荐文章于 2023-09-20 17:50:49 发布
本文介绍了如何使用fdisk和dd命令备份与恢复MBR分区信息。具体步骤包括确定MBR位置、备份MBR及分区表、恢复MBR及分区表等。适用于需要维护硬盘分区信息的场景。
904

被折叠的 条评论
为什么被折叠?



