Set up to Boot from MBR

These are essential milestones in configuring a new system to boot from legacy MBR. These are often done as a part of a new OS install.

Boot Modes

There are different boot modes. These days, the modern option is GPT. But on old hardware, you might want or be stuck with MBR, Master Boot Record.

Partition the Hard Drive

First, you'll want to set up your hard drive to be ready for this boot mode.

Mark the partition table type as DOS, not UEFI.

Then mark the OS partition, the Linux FS partition, as bootable.

These operations can be accomplished in fdisk. That will be some combination of:

sudo fdisk /dev/sda
# then, when interactive...
m - help
o - mark partition table as type dos
a - mark partition as bootable

Install the OS

This is likely the point at which you're install a shiney new OS. Probably Arch. :)

Install a Bootloader

Next, you'll need a bootloader, the program that runs on computer startup and that preps and transfers control to the OS. Grub is a great option. On arch, install with:

sudo pacman -S grub

Then run the install script for the architecture of your PC. To find the architecture code, type:

uname -m

Then install grub with the output. For me, x86_64:

grub-install --target=x86_64-efi /dev/sda

ls -l /usr/lib/grub will show you your target options too.

Remove Secure Boot

Modern BIOS may include an option for secure boot. When using MBR, this will need to be disabled.

To enter BIOS config, reboot and press F2 (sometimes F12 or Delete) during POST (at the beginning, about when the computer logo appears).

Change Boot Mode to Legacy

While in the BIOS, you'll also want to enable Legacy or MBR boot mode.

Depending on your BIOS, these could be labelled slightly differently.

Reboot and Enjoy

Save your changes in BIOS, exit and reboot. You should be greeted with Grub, showing an option to boot to your OS. Take the option, and enjoy!

When do you find yourself needing or wanting to use MBR?