Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ok, so I messed up my MBR and I need to set the boot flag, (not the active partition!). I have searched for similar questions but all the answers I see is "how to set a partition to active", and that is not what I want to do. Setting it to active tells the bootloader to load it, but does not tell the BIOS to execute the first 512 bytes. What I need is the last word of the MBR to be 0xAA55. Please help me with this, thanks.

share|improve this question
I'm really not sure what you want, or trying to. But have you tried with grub-install --recheck /dev/sdX and update-grub. What Linux system are you using? – Diblo Dk Jul 7 '13 at 11:22

On an MBR disk, the "boot flag" and the "active flag" are the same thing. This flag shouldn't matter to the firmware, although some do look for it before they'll boot a disk in BIOS mode. Some (but not all) BIOS-mode boot loaders rely on this flag being present; they look for it and transfer control to the boot sector of the partition that's so marked.

On a GPT disk, tools based on libparted (such as parted and GParted) identify the EFI System Partition (ESP) as having the "boot flag" set. Despite using the same name as an MBR construct, what libparted identifies as a "boot flag" in GPT has nothing to do with an MBR boot/active flag.

The 0xAA55 code at the end of the first sector of the disk simply identifies the sector as holding an MBR partition table. (GPT disks also have this code, since part of the GPT specification includes a "protective MBR" that's designed to keep GPT-unaware utilities from messing with the disk.) If fdisk, parted, and other MBR partitioning tools recognize the disk, then that code is already present. If it's not present, partitioning tools will either complain or claim that the disk is unpartitioned.

If you still have problems after reading this reply, you need to provide more information: What precisely is not working on your computer? As stated, your question is fairly abstract. Also, the output of parted /dev/sda print (typed as root or preceded by sudo) would be helpful.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.