26

I booted from a live usb and installed 15.10 but at the end of the installation process, I get an error:

Unable to install GRUB in /dev/nvme.

Next, it gives the option to change where the bootloader is installed but on pressing OK at this point, grub does nothing. I can't find any information regarding /dev/nvme, only /dev/sda which has always been what I've seen doing linux installations in the past. Why is it /dev/nvme now and how do I fix this? Thanks.

EDIT: It's probably also worth noting that I turned off secure boot and switched from UEFI to legacy because the ubuntu installation kept freezing at the purple loading screen on UEFI mode.

LiveWireBT
  • 29,597
JakeP
  • 363

6 Answers6

12

None of the suggestions worked but I found the solution for me.

When the installer asks how to partition, choose Manual, after that:

  1. Select /dev/nvme0n1, it will ask if it should create a new partition table(only the first time) - accept that.
  2. Select free space and choose to create an EFI boot section(in different tools this could be called differently but all should say EFI), set it to 500 MB(this should be first, before the other partitions inside nvme0n1)
  3. Now partition the rest of the free space, for example setting all of the free space to be root /, ext4(it is recommended to at least set /boot separately).
  4. At the bottom you should see a menu that asks where grub should be installed. Choose /dev/nvme0n1.

Done, it is a very simple setup in reality and you don't need to disable UEFI.

7

You need to tell the installer to install Grub to /dev/nvme0n1 (at least that's how it shows up on my NUC 5i5RYK with an NVMe drive. However, at least in my case, it appears the installer is broken as I still was not be able to boot into the newly installed system.

However, I did find two methods that fix broken Ubuntu 15.10 boot failure after initial install:

  1. Use the GUI program Boot Repair:

    The default or "Recommended Repair" doesn't work, but I selected the "Advanced Options" and uncheck "SecureBoot" but keep all other default options then follow the instructions, the system correctly boots to the newly installed OS.

    Results available at http://paste.ubuntu.com/14439023/

  2. Install Ubuntu 15.04 first, then upgrade to 15.10. As an alternative to running Boot Repair, I found that if I install 15.04, run all updates:

    sudo apt-get update
    sudo apt-get upgrade
    

    then run

    sudo do-release-upgrade -d
    

    then 15.10 will successfully boot.

muru
  • 207,228
5

I continually got this error when using the installer's default Erase disk and install Ubuntu (with LVM encryption) option, so instead I selected Something else to customise my partitions with gparted.

I set a sensible enough partition scheme (60GB primary ext4 /, 100GB logical ext4 /home, 10GB swap) and selected the primary partition as the Device for boot loader installation, then it installed without the error.

steevee
  • 236
  • 2
  • 4
4

/dev/nvme is not a correct devicename and will never 'read' as sda. NVMe's are numbered like mmcblk. /dev/nvme0n1 as devicename and /dev/nvme0n1p1 as first partition. grub-install /dev/nvme0n1 could work if EFI directory can be found gparted should be at least version 0.24.0-1 to recognize NVME devices

Delaney
  • 41
4

I have an Intel NUC5i7RYH with a Samsung NVMe SSD and faced the same issue, which I resolved by entering the BIOS settings and disabling "Legacy" boot.

Simon R
  • 41
0

I have a cluster of computers. Each computer that had an additional drive with Windows 10 installed had the issue you describe when not booting the Live Ubuntu Install USB drive in UEFI Mode. Each computer I have that only has the one Linux drive did not require UEFI Mode.

TLDR: If you have other systems installed on the same computer (even different hard drive) that use UEFI Mode, then ensure that you boot your live USB in UEFI mode.

From askubuntu.com

Having a PC with UEFI firmware does not mean that you need to install Ubuntu in UEFI mode. What is important is below:

if the other systems (Windows Vista/7/8, GNU/Linux...) of your computer are installed in UEFI mode, then you must install Ubuntu in UEFI mode too. if the other systems (Windows, GNU/Linux...) of your computer are installed in Legacy (not-UEFI) mode, then you must install Ubuntu in Legacy mode too. Eg if your computer is old (<2010), is 32bits, or was sold with a pre-installed Windows XP.

if Ubuntu is the only operating system on your computer, then it does not matter whether you install Ubuntu in UEFI mode or not.

as for your Ubuntu freezing during loading there could be many other reasons that would merit a separate question

Marc
  • 123