1

As the title says, I'm trying to install Ubuntu 16.10 so that I can dual-boot Ubuntu alongside my existing Windows 7 installation. I'm installing from a USB drive and I keep getting the error:

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

My situation is as follows:

I currently have:

  • HDD #1 : Windows 7 64-bit (750 GB)
  • HDD #2 : NTFS partition for extra files (700 GB) and Ubuntu 16.10 (300 GB)
  • SSD #1 : Unformatted (120 GB)

I was able to install Ubuntu 16.10 successfully, prior to GRUB failing to install.

I want to install Ubuntu such that it is on the 300 GB partition of the 1 TB drive. I can't seem to get Ubuntu to install GRUB successfully.

Though this is a common error, I can't seem to find anyone in exactly the same situation (apparently Windows 8 and later play differently with Ubuntu and can cause other problems, and other posts from people with this problem seem to be trying to install Ubuntu over Windows 7 as a replacement rather than a dual-boot option).

I'd prefer not to put Ubuntu on the SSD (eventually I'm going to get around to reinstalling Windows 7 there, but that's another day's project).

I can provide screenshots (or at least, pictures of the screen) if that would be helpful.


The lsblk -a command yielded this:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop1    7:1    0         0 loop 
sdd      8:48   1  57.7G  0 disk 
└─sdd1   8:49   1  57.7G  0 part /cdrom
sdb      8:16   0 698.7G  0 disk 
├─sdb2   8:18   0 698.6G  0 part 
└─sdb1   8:17   0   100M  0 part 
loop6    7:6    0         0 loop 
loop4    7:4    0         0 loop 
sr0     11:0    1    38M  0 rom  /media/ubuntu/SAMSUNG SSD
loop2    7:2    0         0 loop 
loop0    7:0    0   1.4G  1 loop /rofs
sdc      8:32   0 931.5G  0 disk 
├─sdc2   8:34   0     1K  0 part 
├─sdc5   8:37   0    16G  0 part [SWAP]
├─sdc1   8:33   0 651.5G  0 part 
└─sdc6   8:38   0 264.1G  0 part 
sda      8:0    0 111.8G  0 disk 
loop7    7:7    0         0 loop 
loop5    7:5    0         0 loop 
sr1     11:1    1  1024M  0 rom
loop3    7:3    0         0 loop

1 Answer 1

1

First, use lsblk -a to determine what's your Ubuntu drive mount point.

From the output you provided, your 1 TB drive is /dev/sdc. This is what you should provide to grub when it asks you the installation drive. I explain that lower.

Then, just use the Ubuntu LiveCD to reinstall Grub, as described here


Bootloaders and drives.

Bootloaders, like Grub, install themselves in the Master Boot Record (MBR) of a drive. This is the first 500 KB of the drive, that are readed by the BIOS during startup.

Windows 7 installed it's own bootloader in /dev/sdb, so we must keep it there, it won't annoy us. It can still be useful if you want to boot windows alone, say in another PC.

/dev/sda is your SSD. That's why grub-install returned this error : there isn't any OS nor partition in there. Hopefully, because installing the grub here would mean that if you unplug the SSD, then Ubuntu won't boot anymore !

By installing Grub in /dev/sdc, you'll still be able to boot Ubuntu even if all the other drives are unplugged. Grub will also add entries to boot from Windows, even if it's on another drive. Just don't forget to define your 1 TB drive as primary HDD in BIOS/UEFI.

9
  • Should I be selecting the whole drive (like /dev/sda) or should I be selecting specifically the Ubuntu partition I want to use (like /dev/sda/sda1)? If I select the former (the whole drive), could it wipe the 700 GB partition that I do want to keep? Commented Jan 19, 2017 at 21:53
  • You have to install grub on /dev/sdX where "X" is your drive letter found with lsblk -a. Grub will be installed on the MBR (the first 500 Ko of your drive) so no data will be wiped. But if you choose the wrong drive, you'll make your win 7 unbootable !
    – Taz8du29
    Commented Jan 19, 2017 at 22:28
  • Stupid question, but I'm assuming I run that command ('lsblk -a') on the Ubuntu Live USB, and not from the command line in Windows itself? And ultimately are we trying to put it on the drive that Windows is already on (which, to my limited understanding, would be where the MBR already is), or are we trying to put it on the drive that Ubuntu will be on? Commented Jan 19, 2017 at 22:53
  • Yes you should run this command in your ubuntu installation live media ! You should install Grub on the disk where you installed your Ubuntu (the 1TB one with the 700/300 Gb partitions).
    – Taz8du29
    Commented Jan 19, 2017 at 22:58
  • Thanks! I added the results from that command to the original answer (too long to include here). So the answer is /dev/sdc? Commented Jan 19, 2017 at 23:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .