Unable to install GRUB, Running 'grub-install --force failed

8,063

Solution 1

During the install, did you set a partition as the EFI boot partition? If not, that is most likely the issue. Here is the procedure I used (and recommend) when installing any Linux distro to dual boot with Windows 8.1. In order to use this procedure, Ubuntu will need to be on a UEFI bootable media (such as a GPT FAT32 UFD, a DVD/CD, or other media that is UEFI supported).

If you want Ubuntu on the same disk as Windows 8.1, here are the steps I had to go through:

1) Turn off Windows Fast Boot

2) You need to shrink the main Windows 8.1 partition. This can be tricky, as Windows expects a certain partition scheme to be used. Let me show you a diagram:

[(Windows RE Tools)(EFI System Partition)(Microsoft Reserved Partition)(Windows 8.1)(Anything else)]

You can use your favorite tool to edit these partitions. I prefer Gparted, but any good disk partitioning tool can handle this. Backup your Windows install first. Then, resize the Windows 8.1 partition so that you have enough space for another OS. I prefer to give any Linux distro about 100 GB of space.

3) Download your Ubuntu iso and put it on some media (CD/DVD/USB/(insert your preferred media here)).

4) Shut off Secure Boot and Fast Boot in the UEFI. DO NOT TURN ON LEGACY BOOTING (if your motherboard supports UEFI only booting without Secure Boot and Fast Boot on.)

5) Insert your install media and install Ubuntu in the space you left. Make sure that for your EFI boot partition (you can select this in the partitions menu), you make the installer use the EFI System Partition already created by Windows 8.1. The partition should be something like sdx2, but this could be different. DO NOT REFORMAT THIS PARTITION!! You are only going to tell the installer to use it as the EFI partition. It will put the grubx64.efi bootloader for Ubuntu in this location.

6) With that done, continue the install as normal and set up your partitions as you see fit. Once the install is finished, you should be able to boot into Ubuntu easily.

If you are trying to fix an existing install of Ubuntu (that was installed in UEFI mode), you will need to do:

sudo apt-get install grub-efi-amd64

sudo modprobe efivars

sudo grub-install /dev/sdx (x being the drive Debian is installed on)

sudo update-grub

From there, the UEFI should use Grub-EFI as the bootloader. I have not found a way to get the Windows 8 bootloader to see and allow Debian to boot. YYMV.

At this point, I think I have re-wrote (aka copy/pasted) this procedure about four times. I should probably just make a wiki at this point.

Solution 2

I think that your file system is not so good.

So I suggest you check your file system via using following command.

sudo fsck.vfat -a /dev/sda2

When /dev/sda2 is mounted, you must unmount it with following command before use fsck.vfat command.

sudo umount /dev/sda2
Share:
8,063

Related videos on Youtube

vicban3d
Author by

vicban3d

Updated on September 18, 2022

Comments

  • vicban3d
    vicban3d over 1 year

    I am trying to install Ubuntu 14.04 on a Lenovo Yoga 2 Pro alongside windows 8.1 on a separate partition. I assigned 10GB for swap space and 90GB for Ubuntu itself.

    Whenever I try to install Ubuntu I get an error saying:

    Unable to install GRUB in /dev/sda Executing grub-install /dev/sda failed. This is a fatal error.
    

    Also in details I get the following message:

    ubuntu kernel: [ 1946.372741] FAT-fs (sda2): error, fat_get_cluster: invalid cluster chain (i_pos 0).
    
    ubuntu grub-installer: error: Running 'grub-install --force failed.
    

    Can anyone suggest a solution?

    • ChrisR.
      ChrisR. about 10 years
      On what hardware? UEFI or BIOS? Ubuntu version? All of these things would be really helpful. You labeled this with the "dual-boot" tag. Are you attempting to dual boot with another OS, such as Windows? If so, what OS and version?
    • vicban3d
      vicban3d about 10 years
      I have edited the original post.
  • vicban3d
    vicban3d about 10 years
    Thank your for your reply. I've disabled windows fast boot and secure boot and tried to install from a live USB, the installer detected the EFI partition and set in correctly but I still got the same error. No luck there :-(
  • ChrisR.
    ChrisR. about 10 years
    Then I would go with what xiaodongjie said and check the partition.