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.

  • /dev/nvme stands for SSDs – Raphael Nov 12 '15 at 3:43
  • Ah ok, cool. thanks for clearing that up. Any reason grub wouldn't be able to install on an SSD? – JakeP Nov 12 '15 at 4:28
  • But its not read as nvme, gparted should read your ssd as sda – Raphael Nov 12 '15 at 4:31
  • Boot to your live USB and click on try Ubuntu, then from there open gparted and see what your ssd is read as. Do you have other drives installed too? – Raphael Nov 12 '15 at 4:32
  • 1
    I'm using the Ubuntu desktop 15.10 live image. Gparted doesn't recognize my nvme disk, it only shows the live USB as /dev/sda1. Gparted is v0.19.0. – Hovis Biddle Apr 6 '16 at 4:14
up vote 6 down vote accepted

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.

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.

  • Thank you very much! EFI boot section was what I was missing. Installation completed successfully right after creating it. – Paul Lysak Sep 23 '16 at 14:23
  • This did not work for me until I booted the USB stick with the install image in UEFI mode – ctuffli Dec 8 '16 at 16:37
  • Bios in Legacy mode and Manual partitions, with default / ext4 and swap partitions (just the two) worked for me. I get a invalid partition table error on screen just before the Ubuntu log-in GUI, probably from one of the previous failed install attempts. So I plan on wiping the drive and doing it again. Might have to dd if=/dev/zero of=/dev/nvme0n1 bs=1b count=1000 in order to clear the corrupt information. I have no plans on ever installing Windows so I was trying to avoid creating the EFI data. Thanks +1 Worked on a Dell E3 Tower 5818 – TheHairyOne Feb 14 '17 at 21:29
  • This allowed it to boot...but the actual install was unusable. Everything was either super slow and/or crashed. I couldn't even get updates because apt-get would dump a trace. – Cerin Mar 14 at 20:39
  • @Cerin Well, that's another issue. If you managed to boot, than the instructions were correct. That you have some kind of hardware or network issue, that's another thing... – Lilian A. Moraru Mar 23 at 7:26

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.

  • I owe you a box of doughnuts sir. – Jacob Holloway May 11 '16 at 22:33
  • 1
    I was able to get an encrypted install of Ubuntu with v16.04 with the bootloader on /dev/nvme0n1 working with UEFI boot The steps I followed in the installer were: 1) Select manual partition setup 2) make sure drive /dev/nvme0n1 is blank 3) create a partition at front of drive, 1000MB (whatever size you need), mapped to /boot 4) create "physical encrypted partition" following the boot partition with the remaining space 5) assign new encrypted partition with the / mount point 6) select /dev/nvme0n1 as the partition to install the boot loader – user1652110 Jul 17 '17 at 4:29
  • @user1652110 thanks for the comment. Quick question please: where did you find the "physical encrypted partition" option? was it in the install wizard? or in gparted? I can't find it. were you live disc installing (aka you launched the installer within a live session?), or just installing? can you share a screenshot of your disk allocation please? – pipo17171 Aug 13 '17 at 4:09

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.

/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

There is no EFI option when you select manual and create the partiton at 500 MB, so for Ubuntu Server 16.04 Lilian's instructions do not pertain.

protected by Community Mar 18 '17 at 3:19

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.