Bootloader Grub for very old computers with old-fashioned BIOS: how to repair or re-install it


Back to the home page


Note: this how-to is only fit for very old motherboards that run on a conventional old-fashioned BIOS. This usually means an old computer that was sold with Windows 7 or earlier pre-installed on it.

But this how-to is definitely unfit for motherboards that run on UEFI in full UEFI mode. This is the case for computers that were sold with a pre-installed Windows 8 or newer.

The how-to for Grub on modern (U)EFI BIOS in full UEFI mode can be found here.


First the explanation, then the how-to.

Explanation

If you install Linux first and Windows afterwards, then you lose Grub. So it's better when you install Windows first and then Linux..... Also, Grub might not successfully be installed when installing Linux Mint.

Fortunately, it's an easy problem to solve. However, it's very important that you follow the instructions exactly.

Grub consists of two parts:

First, the main part of the program itself, which is placed in the Master Boot Record (MBR). The Master Boot Record is the first sector of the hard disk.

Secondly, there's the Grub boot menu with the various operating systems, plus some supporting files. These are not in the MBR, but in a folder on the active Linux partition.

Do you have two physical hard disks in your computer? Then it's important for you to know that Grub always resides in the MBR of the first hard disk. The first hard disk is the hard disk that's number 1 in the boot priority (boot sequence) in the BIOS of your computer.

If you restore (repair) Grub in the MBR, then you must again tell Grub where it can find the existing boot menu.

How-to

Repair Grub like this, for example when a consecutive installation of Windows has wiped Grub:

1. Boot your computer from the Mint DVD (of from a Live USB stick with Mint on it).

Note: only use the USB stick/DVD of the Mint version that you wish to repair. So for 22.3, use the USB stick/DVD of 22.3.

2. Now you need to find out what's the name (and the partition number) of the root partition (the partition on which your Mint has been installed).

Check this with the application Gparted Partition Editor. Gparted is present on the Linux Mint USB stick/DVD.

Tip: the root partition of your Mint will usually be formatted in EXT4. The EFI partition wil probably be formatted in FAT32, and it'll have the boot flag.

On my computer, the Mint root partition is called sda5. For the sake of clarity I'll use that example in the rest of the how-to.

3. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

4. Copy/paste the following command line into the terminal:

sudo mount /dev/sda5 /mnt

Note: only if Mint is on sda5! Change the number according to your situation.

....and press Enter. This mounts the Mint root partition on the hard disk.

5. Copy/paste this command line into the terminal:

sudo grub-install /dev/sda --root-directory=/mnt

....and press Enter. This installs Grub.

Note: definitely use copy/paste and do not type this command by hand! Many people forget to type essential spaces in this command.

Note: you might get the following harmless error report:

grub probe: error: failed to get canonical path of /cow
Installation finished. No error reported.


As said, this grub probe error is harmless, and all should be well.

Now type in the terminal:

sudo reboot

....and press Enter.

6. Reboot the computer normally, so don't forget to take out the DVD first.

Now you can only see Linux in Grub, but no Windows (when Windows has been installed after Linux Mint).

7. Put Windows back in the Grub menu:

- Start Mint normally.

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Copy/paste the following command line into the terminal:

sudo update-grub

- Reboot your computer. Windows will (again) be visible in the Grub menu. If necessary, you can make the Grub menu visible when you turn on your computer, by hitting the Esc key just once, immediately after the BIOS screen disappears.


Want more tips?

Do you want more tips and tweaks? There's a lot more of them on this website!

For example:

Speed up your Linux Mint!

Clean your Linux Mint safely

Avoid 10 fatal mistakes


To the content of this website applies a Creative Commons license.

Back to the home page

Disclaimer