{"id":1071,"date":"2013-08-07T04:50:59","date_gmt":"2013-08-07T10:50:59","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=1071"},"modified":"2018-10-04T00:51:57","modified_gmt":"2018-10-04T06:51:57","slug":"backup-and-restore-mbr-in-linux","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/backup-and-restore-mbr-in-linux\/","title":{"rendered":"Backup and Restore MBR in Linux"},"content":{"rendered":"<p>The Master Boot Record (MBR) is the first 512 bytes of a storage device. The MBR is not a partition, it is reserved for the operating system&#8217;s boot-loader and the storage device&#8217;s partition table.<\/p>\n<p>MBR Total Size<br \/>\n446 + 64 + 2 = 512<\/p>\n<p>Where,<br \/>\n446 bytes Bootstrap.<br \/>\n64 bytes Partition table.<br \/>\n2 bytes Signature.<\/p>\n<p>To backup the MBR:<\/p>\n<blockquote><p>dd if=\/dev\/sda of=\/path\/mbr-backup bs=512 count=1<\/p><\/blockquote>\n<p>To restore the MBR and partition table:<\/p>\n<blockquote><p>dd if=\/path\/mbr-backup of=\/dev\/sda bs=512 count=1<\/p><\/blockquote>\n<p>Restoring the MBR with a mismatching partition table will make your data unreadable.<\/p>\n<p>To restore the MBR:<\/p>\n<blockquote><p>dd if=\/dev\/zero of=\/dev\/sda bs=446 count=1<\/p>\n<p>If you require help,<a href=\"https:\/\/www.supportpro.com\/requestquote.php\"> contact SupportPRO Server Admin<\/a><\/p><\/blockquote>\n<p style=\"text-align: center;\"><!--HubSpot Call-to-Action Code --><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><!-- [if lte IE 8]><\/p>\n\n\n\n\n\n<div id=\"hs-cta-ie-element\"><\/div>\n\n\n<![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><img decoding=\"async\" id=\"hs-cta-img-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-img\" style=\"border-width: 0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b.png\" alt=\"Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value\" \/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '9d590242-d641-4383-94b4-8cfd62f0af6b', {}); <\/script><\/span><!-- end HubSpot Call-to-Action Code --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Master Boot Record (MBR) is the first 512 bytes of a storage device. The MBR is not a partition, it is reserved for the operating system&#8217;s boot-loader and the&hellip;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-1071","post","type-post","status-publish","format-standard","hentry","category-linux-basics"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/1071","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=1071"}],"version-history":[{"count":6,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/1071\/revisions"}],"predecessor-version":[{"id":3145,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/1071\/revisions\/3145"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=1071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=1071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=1071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}