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.
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
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
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