Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Fails to install GRUB on NVMe PCI Express SSD

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Lakef
Posts: 30
Joined: 2017-02-16 08:58

[SOLVED] Fails to install GRUB on NVMe PCI Express SSD

#1 Post by Lakef »

I can not install the GRUB boot loader on NVMe PCI Express SSD 3.0 x4 (Corsair Force MP500 M.2 240GB CSSD-F240GBMP500). The motherboard is Gigabyte GA-X170-EXTREME ECC, and CPU Intel Xeon E3-1245 v5.

I try to install Debian 8.7.1 64 bit (debian-8.7.1-amd64-netinst.iso), but the installation program refuses to install GRUB. This means that I can not start/boot Debian when I reboot after the (failed) installation.

During install i get the following messages for example:
Continue without boot loader
No boot loader has been installed, either because you chose not to or because your specific architecture doesn't support a boot loader yet. You will need to boot manually with the /vmlinuz kernel on partition /dev/nvme0n1p2 and root=/dev/nvme0n1p2 passed as a kernel argument.
Image
Install the GRUB boot loader on a hard disk
An installation step failed. You can try to run the failing item again from the menu, or skip it and choose something else. The failing step is: Install the GRUB boot loader on a hard disk
Image
Last edited by Lakef on 2017-02-23 13:25, edited 8 times in total.

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#2 Post by Lakef »

I have searched the internet about the error, but I can not figure out if it is a showstopper or if there is a solution to remedy this without losing performance and stability. On the internet, I have seen error reports (for Debian and Ubuntu) of GRUB boot loader failing to install on NVMe SSD's connected to PCIe port (via for example M.2 interface on motherboard).

I am a total newbie to Debian and Linux, but want Debian in order to make a computer that at the same time is a NAS (network attached storage), email server, file server and web server. But now it seems like there is not support for the hardware I have chosen. I went for an NWMe SSD connected to PCIe via M.2 interface in order to achieve 3000 MB/s read, instead of a regular SSD which only read in e.g. 530 MB/s (which is close to the SATA 3 maximum rate of ~600 MB/s).

Is there anybody that knows if this is a showstopper? Is there any proper remedy for this? What should I do next?

As I have seen this problem been mentioned on the internet before, I would guess it is reported, but I do not know how to find out if there is a group currently working on this error. Maybe they even have a "tested" or "unstable" solution to the problem?

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Fails to install GRUB on NVMe PCI Express SSD

#3 Post by debiman »

i tried to understand what nvme is and whether an nvme pci ssd is a non-standard technique. i don't know. maybe up to you to do the research?

but it seems that the install went ok, and all you have to do is to install grub.

so, try that.
make yourself a bootable (usb?) linux medium (don't even have to be debian, but it must have grub2, which 99% have), boot into it, and install grub to the first hard drive of that computer.

steps:

Code: Select all

sudo fdisk -l
sudo grub-install /dev/<whatyoufoundfromfdisk>
be aware that you have to install it to e.g. /dev/sda and NOT /dev/sda1.

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#4 Post by Lakef »

Debiman, thank you for giving me some ideas of how to solve the problem of installing GRUB! I made the installation via USB-stick loaded with Debian (Jessie) 8.7.1 (debian-8.7.1-amd64-netinst.iso). Would that contain GRUB2 rather than an older version of GRUB? I booted from the USB-stick, then I selected the graphical install option. Where would it be possible to run the instructions you suggested, i.e. "sudo grub-install /dev/nvme0n1"?

About NVMe

NVMe (NVM Express, Non-Volatile Memory Express is a logical device interface. It allows flash memorys to communicate at higher speeds than SATA 3. SATA 3 interface allows up to 600 MB/s, but NVMe uses the PCIe lanes. A device that uses four PCIe version 3.0 lanes can theoretically achieve 4000 MB/s.The NVMe devices connect to the motherboard via M.2, U.2 or PCIe connector.

I guess basically NVMe is the industry standard for PCIe SSDs. I guess one could use PCI Express connected SSD and NVMe SSD interchangeably. For me the terminology is still sligtly confusing.

Linux give the NVMe devices a different name than regular devices. Regular devices get names such as "/dev/sda", but NVMe devices get names as for example "/dev/nvme0n1".

There can be errors in my text above.

Links to information about NVMe:
http://www.nvmexpress.org/
http://www.pcworld.com/article/2899351/ ... -nvme.html

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#5 Post by Lakef »

I have searched the internet and read some of the information about the problem that the Debian (and other Linux systems, such as Ubuntu) fails to install GRUB on NVMe SSD. The pages I currently think are the most relevant are the following:

http://www.poweredbyjeff.com/2015/10/29 ... an-Jessie/

https://lists.debian.org/debian-user/20 ... 00062.html

https://wiki.debian.org/InstallingDebia ... SSD/jessie

http://unix.stackexchange.com/questions ... ing-debian

A couple of programs/tools were suggested at http://forums.debian.net/viewtopic.php?f=17&t=125595
Would they be of some interest to use at some point? :

http://www.supergrubdisk.org/super-grub2-disk/

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

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Fails to install GRUB on NVMe PCI Express SSD

#6 Post by Segfault »

Grub is not the only bootloader in the world. Use something else. UEFI can load the OS without bootloader, too.

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#7 Post by Lakef »

Segfault wrote:Grub is not the only bootloader in the world. Use something else. UEFI can load the OS without bootloader, too.
My motherboard has UEFI BIOS. Shall I enter the motherboard UEFI BIOS and change some setting?

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#8 Post by Lakef »

debiman wrote:make yourself a bootable (usb?) linux medium (don't even have to be debian, but it must have grub2, which 99% have), boot into it, and install grub to the first hard drive of that computer.

steps:

Code: Select all

sudo fdisk -l
sudo grub-install /dev/<whatyoufoundfromfdisk>
I guess I you mean that I shall make a bootable USB with Debian operative system. I already have a bootable USB with "a small installation image" of Debian Jesssie (debian-8.7.1-amd64-netinst.iso). What I do not understand is where, how and when to write the terminal commands you suggest. Because there is no GRUB, I can not start Debian in order to write any terminal commands.

In my case I guess the terminal commands you suggested would be:

Code: Select all

sudo fdisk -l   #in order to get the list of devices
sudo grub-install /dev/nvme0n1 #which was the name the device get when use the Debian Graphical install option (of UNetbootin) when booting on the USB-stick I prepared.
As you say GRUB shall not be installed on a partition. In my case this means that GRUB shall NOT be installed on for example "/dev/nvme0n1p1", rather it should be installed on "/dev/nvme0n1".

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Fails to install GRUB on NVMe PCI Express SSD

#9 Post by Segfault »

Lakef wrote:
Segfault wrote:Grub is not the only bootloader in the world. Use something else. UEFI can load the OS without bootloader, too.
My motherboard has UEFI BIOS. Shall I enter the motherboard UEFI BIOS and change some setting?
You need properly placed and configured EFI stub kernel and it will show up in UEFI boot menu and it will boot without any additional loaders involved. To get a choice, like booting backup kernels you need a boot manager like eEFInd.

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#10 Post by Lakef »

I have looked at the following pages now:

p1: 'Lukasz Szybalski' https://lists.debian.org/debian-user/20 ... 00062.html
p2: 'Jeff Ferrari' http://www.poweredbyjeff.com/2015/10/29 ... an-Jessie/
p3: 'LucaAlloatti' https://wiki.debian.org/InstallingDebia ... SSD/jessie

They propose solutions that are alike, but with small differences. It seems like one can reach a terminal via booting the debian operative system install USB-stick. There shall be an option for that according to internet page p3 (boot live USB ->Advanced ->Rescue mode..). Corresponds 'advanced' to 'graphical expert install' in the UNetbootin menu (the menu for the install USB)?
Image'

The three internet pages (p1, p2 and p3 linked to above) more or less suggests to write the following commands in the terminal/shell:

cd /target ( should it rather be "cd /dev/nvme0n1" in my case?)
mount --rbind /proc proc/
mount --rbind /sys sys/
mount --rbind /dev dev/
mount --rbind /run run/
chroot . /bin/bash

What are the "mount --rbind" commands above for? Do they simulate/pretend that the archives in the USB-stick directory "/proc" exist in the device directory "/dev/nvme0n1/proc" ? Why are they not copied then? Are they not needed later (when the system in installed)?

Shall I replace target with the path to the device I want to install Debian? In my case the path to the device (SSD M.2 NVMe PCIe) is "/dev/nvme0n1". Should I replace "/target" above with "/dev/nvme0n1" then?

Do you think that these commands are correct for my use?

Image

then they suggest GRUB is installed, but disagree wether it should be performed with 'backport' (which I think are 'test' or 'unstable' version of Debian) or not. Jeff Ferrari (p2) says NVMe support is much better for kernels with version number above 3.19. I have no clue what version of kernel that Debian 8.7.1 has, and I can not find it by searching the internet. Anybody knows what kernel has Debian 8.7.1 has or how to check it up?

For stable version :

apt-get update
apt-get install grub-efi-amd64
update-grub
grub-install (Should it rather be "grub-install --target=x86_64-efi /dev/nvme0n1" ?)

For backport version :

apt-get -t jessie-backports install linux-image-amd64
apt-get -t jessie-backports install grub-efi (Should this not rather be "grub-efi-amd64" ?)
update-grub
grub-install (Should it rather be "grub-install --target=x86_64-efi /dev/nvme0n1" ?)

How do you think the commands should be in my case for best solution?
Last edited by Lakef on 2017-02-19 13:21, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Fails to install GRUB on NVMe PCI Express SSD

#11 Post by Head_on_a_Stick »

Lakef wrote:
Segfault wrote:Grub is not the only bootloader in the world. Use something else. UEFI can load the OS without bootloader, too.
My motherboard has UEFI BIOS. Shall I enter the motherboard UEFI BIOS and change some setting?
https://wiki.debian.org/EFIStub
deadbang

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#12 Post by Lakef »

GRUB-EFI-AMD64

After research on the internet, I have some information about the difference between "grub-efi-amd64" and "grub-efi" packages. The "grub-efi" package that either links to grub-efi-ia32 or grub-efi-amd64, depending on the architecture.

I have found a stable version, a test version and an unstable version of "grub-efi-amd64":

Stable: grub-efi-amd64 (2.02~beta2-22+deb8u1) https://packages.debian.org/jessie/grub-efi-amd64
Test: grub-efi-amd64 (2.02~beta3-4) https://packages.debian.org/stretch/grub-efi-amd64
Unstable: grub-efi-amd64 (2.02~beta3-5 and others) https://packages.debian.org/sid/grub-efi-amd64

Which version should I go for do you think?

KERNEL VERSION

I try to figure out the kernel version. It it the 'kernel-common' package to look for?

Stable: kernel-common (13.014+nmu1) https://packages.debian.org/jessie/kernel-common
Test: kernel-common (13.018) https://packages.debian.org/stretch/kernel-common
Unstable: kernel-common (13.018) https://packages.debian.org/sid/kernel-common

If I use the test/stretch version of "grub-efi-amd64" (
apt-get -t jessie-backports install grub-efi-amd64) do I also have to use the test/stretch version of the kernel, in order to maintain compatibility?

Would this install the test/stretch version of the kernel?
apt-get -t jessie-backports install kernel-common
or are more packages necessary?

Does this install the whole test/stretch version of the Debian operative system?
apt-get -t jessie-backports install linux-image-amd64
Last edited by Lakef on 2017-02-19 22:08, edited 8 times in total.

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#13 Post by Lakef »

Head_on_a_Stick wrote:
Lakef wrote:
Segfault wrote:Grub is not the only bootloader in the world. Use something else. UEFI can load the OS without bootloader, too.
My motherboard has UEFI BIOS. Shall I enter the motherboard UEFI BIOS and change some setting?
https://wiki.debian.org/EFIStub
Thank you for informing me about this possibility! It is great to know this second possibility if I do not manage to make GRUB function.

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#14 Post by Lakef »

Oh, I think I have found the kernel version now. In the link below I found "Linux kernel image: 3.16 series". Still I have not found the version of the kernel of the stretch/test version or Debian Jessie.

Chapter 2. What's new in Debian 8:
https://www.debian.org/releases/stable/ ... #newdistro

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: Fails to install GRUB on NVMe PCI Express SSD

#15 Post by Lakef »

PROBLEM SOLVED

I booted the computer with the Debian install USB-memory-stick. In the Debuab GNU/Linux UEFI installer menu, I selected advanced options > graphical expert install. When I had the message that GRUB could not be installed, I ran a shell (from within the graphical expert install). This is what I wrote in the shell:

cd /target
mount --rbind /proc proc/
mount --rbind /sys sys/
mount --rbind /dev dev/
mount --rbind /run run/
chroot . /bin/bash

I got a root@XXX:/# prompt where I wrote:

apt-get update
apt-get install grub-efi-amd64
update-grub
grub-install

I quit the shell and finished the installation with the graphical expert install. Please note that, because I had already installed GRUB via the command line, I declined to install GRUB when asked by the graphical interface. I withdrew the USB-memory-stick and rebooted. Then I could log into Debian!!!

Note:
grub-efi-amd64 above should be replaced by grub-efi-amd32 for a 32-bit architeture. If one writes grub-efi-amd, then the correct architecture is chosen automatically.

Hoorah!!! It seems like the problem is solved!

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: [SOLVED] Fails to install GRUB on NVMe PCI Express SSD

#16 Post by debiman »

nice.

i didn't read everything you wrote, but even though it's working now, you should probably consider using a newer kernel?
the standard 3.16 for debian doesn't do newer machines justice anymore and kernel backporting is a fairly standard procedure.

but hey, if it works don't fix it.

Lakef
Posts: 30
Joined: 2017-02-16 08:58

Re: [SOLVED] Fails to install GRUB on NVMe PCI Express SSD

#17 Post by Lakef »

Debiman, Thank you for your advice!
I tried to install linux-image-4.9.0-0.bpo.1-amd64 kernel, but the system did not boot properly then. No GUI started, only a black screen with a prompt. I continue to struggle in a thread where I have no sound http://forums.debian.net/viewtopic.php? ... 78#p637374

User avatar
DebSam
Posts: 12
Joined: 2011-03-13 05:57

Re: [SOLVED] Fails to install GRUB on NVMe PCI Express SSD

#18 Post by DebSam »

Attempting Boot From CD-ROM
Attempting Boot From Floppy Drive (A:)
Attempting Boot From Hard Drive (C:)
GRUB loading..
Welcome to GRUB!

error: no such device: 88c52f2e-9f4b-4a02-92ea-3b16973bc
error: not a Btrfs filesgstem.
error: unknown filesystem.
Entering rescue mode...
grub rescue>

Deb install fails like that on 10.5, 10.6, 10.9, system 100 % hosed

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [SOLVED] Fails to install GRUB on NVMe PCI Express SSD

#19 Post by p.H »

Please open a new topic. And decribe the machine, its setup, what you have done...

Post Reply