Last updated on September 24, 2020 by Dan Nanni
In Linux, master boot record (or MBR) is a reserved space in disk storage which stores an OS bootloader as well as disk partition table. If GRUB bootloader is not loaded properly, you can try re-installing GRUB bootloader on MBR. Here is how to install GRUB bootloader on MBR on Ubuntu or other Ubuntu-derivatives such as Linux Mint.
In this tutorial, it is assumed that /dev/sda
is the disk which contains a boot partition.
First, using fdisk
command, verify that the boot partition (typically the first partition) in /dev/sda
is tagged as bootable. If the partition is bootable, it should show *
under Boot
column in the fdisk
output.
$ fdisk /dev/sda
If the boot partition is not bootable, mark it as bootable. You can press a
on fdisk
to toggle a bootable flag. After changing a bootable flag, make sure to press w
to write the change to disk.
After this, use the following commands to install GRUB bootloader.
$ sudo grub-install --boot-directory=/boot /dev/sda $ sudo update-grub
Finally, reboot and check if it can boot from disk.
This website is made possible by minimal ads and your gracious donation via PayPal or credit card
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.
Xmodulo © 2021 ‒ About ‒ Write for Us ‒ Feed ‒ Powered by DigitalOcean