2

Lately I bought a new laptop - Lenovo Yoga 2 Pro 13" - Intel i5-4210U, 256 SSD.

I have tried to install Ubuntu 14.04 using these guides:
Ubuntu on Lenovo Yoga 2 Pro
http://peaceplantsandpushups.com/2014/03/12/22/

After I did step 7 in the second guide, I haven't succeeded to save, so I restarted my computer in order to do it again.

From this point, I couldn't boot into Ubuntu, and every time I try to reinstall Ubuntu I get this annoying error:

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

I tried to follow this guide: "Unable to install GRUB in /dev/sda" when installing GRUB

But it isn't working. I have no idea how to proceed.

How do I fix this?

Alon Netser
  • 21
  • 1
  • 1
  • 2
  • are you using a predefined boot option? I would recommend you try a something else install and define the efi partition manually – sbergeron Oct 05 '14 at 15:40
  • Can you describe your solution a bit more? What do you mean "predefined boot", and how can I define the EFI partition manually? – Alon Netser Oct 06 '14 at 16:42

6 Answers6

4

Solving 'grub-install /dev/sda' failed error.

  1. sudo mount /dev/sdaX /mnt # Make "X" the partition that has Ubuntu installed (i.e. /dev/sda2).
  2. for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/$i"; done
  3. sudo chroot /mnt
  4. update-grub
  5. if no errors skip this

  6. grub-install /dev/sdX (x is the hard drive that has linux installed (i.e. /dev/sda)
  7. update-grub Reboot the system

  • I have already deleted and formatted the partition which had Ubuntu 14.04 on it ,because it didn't boot, and I thought reinstalling Ubuntu will solve it. As I said, now I can't install Ubuntu, because the installation process fails every time. Do you have another solution? Thank you for your help! – Alon Netser Oct 06 '14 at 16:36
  • What can work is to reinstall ubuntu. Refer to this answer and follow the process outlined. –  Oct 07 '14 at 10:43
  • 1
    As I said, I can't install Ubuntu, because the installation process fails every time. – Alon Netser Oct 13 '14 at 14:08
  • This worked for me! #4 threw up an error, ran #5 then "update-grub" again. The same error flew, but I rebooted and all works now!!! Thank you so much! – Chris Apr 24 '15 at 18:13
  • Hmm, I run into the same problem, but it pops up a window ask me to 1. choose a different device to install the bootloader on or 2.continue without a bootloader or 3. cancel the installation. Neither of the first two option work. And I'm unable to go back to step 5..... – June Wang Aug 01 '20 at 05:25
1

The grub boot loader fails during installation because the installation USB is still plugged in and the system is attempting to load the grub to the USB drive. Unplug the USB drive at the point in the installation when asked to install the grub boot loader.

1

To solve this issue I had to create an EFI primary partition (fat32) instead of an ext4 /boot partition, which was my normal practice previously.

enter image description here

I used this as a guide:

https://help.ubuntu.com/community/DiskSpace

After rebooting I ran into this issue, but at least I was able to install Ubuntu.

https://sourceforge.net/p/boot-repair/home/Home/

EDIT: I finally gave up on this approach and simply created /, swap, and /home partitions (no /boot) and did not run into the "Unable to install GRUB" error.

6006604
  • 111
0

I had this problem. For me I had just gone through the hassle of installing windows 11 which needed me to remove all but one of my NVMe drives (my rig uses 5 NVMe drives).

It turns out the Ubuntu installer suffers from the exact same bug! It seems pretty peculiar, but removing all of the drives other than the drive with windows (and unallocated space for use with Ubuntu 22.04) allowed me to use the auto install option.

Ninjaxor
  • 101
0

My situation: new notebook ASUS UX303UB with preinstalled Windows 10 Home and 250 GB SSDorChip My desired state: One partition with Windows 10, one partition with Linux destribution (Ubuntu 14.04.3), one partition for personal data files.

I have in "BIOS": Boot -> Fast boot = Dsiabled and Security -> Secure boot menu -> Secure boot control = Disabled I have logged in Windows 10 -> Settings -> System -> Power & sleep -> Additional power settings -> Choose what the power buttons do -> Change settings that are currently unavailable -> Turn on fast start-up = Disabled

I have tried to install Linux distribution from USB stick with Windows 10 already installed, but was always getting the error Unable to install GRUB in /dev/sda Executing 'grub-install /dev/sda' failed. This is a fatal error. None of the advices from internet helped.

It is good to download all needed files before continuing with procedure described below. A USB key of at least 4 GB will be needed. Even better if you will have >=4 GB for Ubuntu, >= 4 GB for Windows 10, >= 256 MB for Clonezilla It is good to have another working computer.

How I have done it:

  1. Only if you already have Windows 10 installed and configured and don't want to install and configure it again: If you don't have your Windows 10 Product key: download and execute in Windows 10 for example ProductKey25Finder to get your product key. Send it per email to your enmail address, save it on your existing computer and on USB stick. Download Clonezilla ISO image. Create Clonezilla USB stick from ISO (in Windows for example with "ISO to USB"). Restart computer. When booting click Esc or F2 or F8 or F10 or F12 or Delete to get into Boot menu. Select the option: UEFI ... this USB stick. Connect USB device where to save the Windows 10 backup (you will probably need at least 30 GB free space) and continue. You also may want to create back ups of other partitions.

  2. install Linux distribution Download Ubuntu ISO image 1+GB Create Ubuntu USB stick from ISO (in Windows for example with "ISO to USB"). Connect this USB stick to computer. Restart computer. When booting click Esc or F2 or F8 or F10 or F12 or Delete to get into Boot menu. Select the option: UEFI ... this USB stick. Caution! Deletion of partition will cause the complete loss of data on it. Delete all partitions (Yes, there maybe several of them. On my new computer there were 5, but only C:\ was visible when logged on into Windows.) so that you have only one big "unallocated space". Create one partition EFI ~650 MB. As I understood this partition will be needed for Linux distribution to create a boot record. If you willl later delete this partition, you will loose the option to boot into Linux distribution. Create one partition Ext4 at least 10 GB (I made 30 GB) for Linux distribution installation, set mount point to slash /. Create one partition NTFS (I made 150 GB) for your personal data files. Leave unallocated space at least 30 GB (I left 70 GB) for Windows 10 installation.

Select EFI partition as one where to install boot manager of the Linux distribution. Continue with Linux distribution installation.

  1. Install Windows 10 Download Windows 10 ISO image 3+GB Create Windows 10 USB stick from ISO (in Windows for example with "ISO to USB" ). Connect this USB stick to computer. Restart computer. When booting click Esc or F2 or F8 or F10 or F12 or Delete to get into Boot menu. Select the option: UEFI ... this USB stick. During Windows installation process select "Advanced tasks". Select unallocated space, click on "New", program will create several new partitions. Select the biggest partition that was just created from unallocated space and continue installing Windows 10.

Now to choose what operating system to log in - during boot press the button to get in the boot menu and choose operating system.

  1. Only if you have made a Windows 10 backup and don't want to configure it again: Connect Clonezilla USB stick to computer. Restart computer. When booting click Esc or F2 or F8 or F10 or F12 or Delete to get into Boot menu. Select the option: UEFI ... this USB stick. Connect USB device from where to recover the Windows 10 backup and continue.

If I have any errors or missed something, let me know and I will improove the decription.

0

Ubuntu 14.04.4 LTS Server

Fatal error, unable to Install Grub

[SOLUTION, results may vary]

This occurred when attempting to install server using RAID configuration. The solution is to boot to USB and NOT UEFI from boot option menu. Leave the internal hard disks as first bootable options in BIOS, use F-Key at bootup to enter boot option menu. The admin will have to go through all the steps again to install, even erase partitions and redo as there is a glitch between UEFI and USB boot modes which will cause problems later. The interface should look slightly different, which will be obvious.

The Ubuntu Server documentation for installing the RAID is a bit confusing if someone is not familiar with it, so this will clarify that portion if running two internal disks on server. Here's the major steps:

  1. Configure the first hard disk partitions, assigning space for /boot, /, swap, /var, and etc... as necessary. Sizes vary on requirements but here is the down and dirty: /boot= 300-500MB (GRUB INSTALLED HERE); /root=15-50GB (Large enough to hold admin files, updates/packages); swap= twice ram size; /var= the remainder if hosting web server (ex: /var/www/).

  2. Set all file types as you go for each partition to the ......RAID... option and select finish then continue creating additional partitions until first disk is completed.

  3. Do the SAME EXACT things for second hard disk.

  4. Above both disk partition areas is a Configure RAID option, so select it.

  5. SELECT RAID option, in this case RAID 1, leave default to 2 disks followed by 0 extra disks.

  6. Check the box for the first partition on first hard disk and then check the first partition on second hard disk, then select continue. Repeat this for every partition until there are no more available options to link partitions of hard disk one and hard disk two. BE SURE NOT TO SELECT YOUR USB as it is in the available options, just ignore it as if it were not there.

  7. VERY IMPORTANT STEP... Above both disk partition areas but beneath Configure RAID option is an area that lists each "linked" partition for disk one and two. Select each RAID partition option on the screen and assign a file system, such as EXT4, swap area, and soforth for each RAID partition. You can even assign a name if you'd like to make it easier to differentiate the partitions, such as boot, root, var, swap, etc. Set boot flag on for /boot and / and leave all others off. The flag on/off is located beneath file system selection [EXT4, swap, etc] for each RAIDed partition. Some BIOS require it and will not work if not selected while others do not require it. Once completed then write changes to disk.

  8. Continue through some other steps and when it gets to GRUB boot loader it will install as it should, so long as appropriate file system type was appropriately selected in Step 7.

  9. Install your desired packages for what server will be used for, such as LAMP, MAIL, DNS, FILE SERVER (OPENSSH), etc...

Hope this helps someone else so they do not have to figure it out the painful, smashing face on keyboard for an entire day.

-SierraJuliet

  • 1
    And this is exactly why Linux sucks! Thanks for your detailed answer, but this is so typical for everything in the Linux world: You're fed up with Windows, try out Linux and it's 10x worse, and they millions of people go back to Windows because not even the most simple things work fine. – Sliq Jun 15 '16 at 22:19
  • @Sliq I'd like to disagree but experience talks, unfortunately. However, in that specific case, it is due to UEFI locking out any OS but Windows. People go back to Windows because the hardware is now able to support Windows only. And that's sad... – Matthieu Oct 27 '16 at 15:26