====== MBR Tips ====== ===== Backup/Restore MBR ===== [[wp>Master_boot_record|MBR]] [[wpr>Главная_загрузочная_запись|ГЗЗ]] http://www.shell-fu.org/lister.php?id=803 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 ===== http://community.livejournal.com/ru_linux/2544765.html?thread=36215677#t36215677 ''# cat /sys/block/sda/sda1/{start,size}'' /sys/block/sda/sda1/start:63 /sys/block/sda/sda1/size:2120517 ''# fdisk /dev/sda'' Command (m for help): n Command action e extended p primary partition (1-4) p 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