Difference between revisions of "Master Boot Record"

From ArchWiki
Jump to navigation Jump to search
(Moving MBR information from Bootloader Recovery to separate page to help merge Grub pages)
(redirect article)
(101 intermediate revisions by 31 users not shown)
Line 1: Line 1:
Most PCs today use firmware called the [http://en.wikipedia.org/wiki/BIOS BIOS].  The BIOS is run when the computer first starts up where it initializes system devices.  After system devices have been initialized the BIOS then launches the Master Boot Record (MBR).  The MBR contains both a program that is able to start the operating system(s), and information of the partition table.  The MBR is run from the first sector (first 512 bytes) of the first recognized BIOS boot device (hard disk, CD/DVD drive, USB drive...) on your computer.  The program on the MBR is often referred to as a bootloader and in Linux and the common bootloader programs are [[GRUB]] and [[LILO]].
#REDIRECT: [[Partitioning#Master_Boot_Record]]
== Saving/Restoring ==
{{Warning|This information is intended only if you really know what you are doing.  Saving then Restoring the MBR with a mismatching partition table will make you data unreadable and nearly impossible to recover.  If you only want reinstall the bootloader see [[GRUB]] or [[LILO]].}}
Because the MBR is located physically on the disk can be saved and later recovered.
To save the MBR:
dd if=/dev/hda of=/path/mbr-backup bs=512 count=1
Restore the MBR:
dd if=/path/mbr-backup of=/dev/hda bs=512 count=1
To erase the MBR (may be useful if you have to do a full reinstall of another operating system):
dd if=/dev/zero of=/dev/hda bs=446 count=1
== Resources ==
* [http://kb.iu.edu/data/aijw.html What is a Master Boot Record (MBR)?]

Latest revision as of 01:04, 6 September 2016