MBR Tips

Backup/Restore MBR



Backup MBR:

dd if=/dev/sda of=/root/mbr.img bs=1 count=512

Restore MBR:

dd if=/root/mbr.img of=/dev/sda bs=1 count=512

Restore only bootstrap (part of MBR):

dd if=/temp/mbr.img of=/dev/sda bs=1 count=446

Restore only partition table (part of MBR):

dd if=/temp/mbr.img of=/dev/sda skip=446 seek=446 bs=1 count=64

Пример восстановления MBR


# cat /sys/block/sda/sda1/{start,size}


# fdisk /dev/sda

Command (m for help): n
Command action
e extended
p primary partition (1-4)
Partition number (1-4): 1
First sector (63-312581807, default 63):
Using default value 63
Last sector, +sectors or +size{K,M,G} (63-312581807, default 312581807): +2120516
info/boot/grub/mbr-tips.txt · Последние изменения: 2010/07/22 15:21 От dant
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki