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.

6
  • /dev/nvme stands for SSDs
    – Raphael
    Nov 12, 2015 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, 2015 at 4:28
  • But its not read as nvme, gparted should read your ssd as sda
    – Raphael
    Nov 12, 2015 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, 2015 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. Apr 6, 2016 at 4:14

6 Answers 6

11

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.

9
  • Thank you very much! EFI boot section was what I was missing. Installation completed successfully right after creating it.
    – Paul Lysak
    Sep 23, 2016 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, 2016 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 Feb 14, 2017 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, 2018 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... Mar 23, 2018 at 7:26
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.

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.

3
  • I owe you a box of doughnuts sir. May 11, 2016 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 Jul 17, 2017 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? Aug 13, 2017 at 4:09
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.

0
3

/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

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

2
  • 1
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review
    – 0xF2
    Apr 24, 2019 at 20:47
  • I've updated my answer to be more explicit, this solution did solve the main problem described for me(it does not solve the subsequent problem of freezing as that would merit a separate question).
    – Marc
    Apr 25, 2019 at 18:45

You must log in to answer this question.

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