Bug 17743 - Unable to install mga5 on nvme drive
Summary: Unable to install mga5 on nvme drive
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: 5
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thomas Backlund
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2016-02-12 19:43 CET by Bill Randle
Modified: 2016-09-25 11:43 CEST (History)
7 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
report.bug output after h/w detection (133.92 KB, text/plain)
2016-02-12 19:43 CET, Bill Randle
Details

Description Bill Randle 2016-02-12 19:43:50 CET
Created attachment 7452 [details]
report.bug output after h/w detection

Attempt to install Mageia 5 on a laptop with a single PCIe NVMe SSD drive fails when the SSD drive is not detected as a valid media for installation.

Details:
  Lenovo P50
  Xeon Skylake CPU
  Samsung PCIe NVMe SSD

Installer kernel started with added options "i915.preliminary_hw_support-1 nvme".

I proceeded trough the installer startup, then it came to a screen titled "HARD DRIVE DETECTION" where it said "Found 'usb_storage' interfaces. Do you have another one?". If I select Yes, then it brings up a long list of drivers (of which nvme is not included). If I select Hardware List, then I see my drive listed as:
    nvme    : Samsung Electronics Co Ltd|Device a802 [NOT_DEFINED] (subbv:144d subd:a801)

I checked dmesgs for nvme entries and there was this one (besides the kernel parameters entry):
    nvme0n1: p1 p2 p3 p4 p5 p6 p7 p8

Attached is the report.bug file from the 'bug' command after h/w detection.

See also this forum thread: https://forums.mageia.org/en/viewtopic.php?f=7&t=10761&p=62553#p62553 .
Comment 1 Florian Hubold 2016-02-12 20:23:41 CET
@tmb: Can you please have a look, maybe you have some box that has an M.2 SSD which is attached via NVMe ... Or suggestions on how to get that nvme disk recognised.

Otherwise, do you have any suggestions on how to use a newer installer to install mga5 or how to adjust the installer to also recognise nvme devices?

CC: (none) => doktor5000, tmb

Comment 2 Bill Randle 2016-02-12 22:13:51 CET
Installation media is Classic DVD x86_64.
Comment 3 Marja Van Waes 2016-02-13 22:09:32 CET
CC'ing some more.

@ tmb

Assigning to you, though, but please reassign if i'm wrong to do so!

CC: (none) => marja11, pterjan, thierry.vignaud
Assignee: bugsquad => tmb

Comment 4 Mageia Robot 2016-02-14 00:28:44 CET
commit 4eb296a89c540a3ebdcecbc3f55758c4b5e5b97c
Author: Thomas Backlund <tmb@...>
Date:   Sun Feb 14 01:28:37 2016 +0200

    detect partitions on nvme devices (mga#17743)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=4eb296a89c540a3ebdcecbc3f55758c4b5e5b97c
Comment 5 Mageia Robot 2016-02-14 01:47:14 CET
commit bc20ede924dc68640ca39ed338775aaebdd538fd
Author: Thomas Backlund <tmb@...>
Date:   Sun Feb 14 02:47:07 2016 +0200

    detect nvme devices as block devices (mga#17743)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=bc20ede924dc68640ca39ed338775aaebdd538fd
Comment 6 Thomas Backlund 2016-02-17 09:00:51 CET
Just a quick info.. 

I will try and prepare an installer patch for mga5 this weekend that can be loaded/applied with the installer patch command
Comment 7 Florian Hubold 2016-02-17 20:39:10 CET
(In reply to Thomas Backlund from comment #6)
> Just a quick info.. 
> 
> I will try and prepare an installer patch for mga5 this weekend that can be
> loaded/applied with the installer patch command

Thanks Thomas, sounds awesome :)
Comment 8 Arne Spiegelhauer 2016-02-19 23:21:56 CET
FYI, I was able to install mga5 to a Samsung SM951 M.2 PCIe NVMe SSD from a live USB stick after applying slightly modified versions of the above patches.

Changes:

1: added a missing comma after the call to getNVMe subroutine

2: /sys/bus/pci_express/devices was empty in my system. Replacing pci_express with pci allowed the installer to recognize the NVMe device.

Note: this was with the kernel from the live ISO. After upgrade to latest kernel, there was no /sys/bus/pci/devices/*/block directory and /sys/bus/pci_express/devices was still empty

CC: (none) => gm2.asp

Comment 9 Thomas Backlund 2016-02-20 10:51:24 CET
Oh, nice :)

and yeah, I added the missing comma in in a later commit.

for the location in /sys it's been moving depending on kernels, so I need to make that code part better.
Comment 10 Adrien Guichard 2016-04-22 12:50:08 CEST
I am using NVMe too, the proposed patch does not work for me..

The name of the device is /dev/nvme0n1 and the partition are named /dev/nvme0n1pN (N being the partition number). Notice the 'n1'.

CC: (none) => guichard.adrien

Comment 11 Thierry Vignaud 2016-04-22 13:03:03 CEST
Can you:
- run the installer,
- attach an USB key,
- go to tty2
- run the "bug" command
- attach (not paste) the report.bug file you'll found on your USB key here

Keywords: (none) => NEEDINFO

Comment 12 Thierry Vignaud 2016-04-22 13:40:32 CEST
BTW for those who want to test, qemu enables to emulate nvme devices...
Comment 14 Thomas Backlund 2016-04-22 13:45:36 CEST
(In reply to Thierry Vignaud from comment #12)
> BTW for those who want to test, qemu enables to emulate nvme devices...

iirc Virtualbox got fixed NVMe support too in 5.0.18
Comment 15 Adrien Guichard 2016-04-22 13:47:17 CEST
I confirm network install fixes the problem for me, thanks!
Comment 16 Thierry Vignaud 2016-04-22 14:12:59 CEST
(In reply to Thomas Backlund from comment #14)
> iirc Virtualbox got fixed NVMe support too in 5.0.18

for testing with qemu:

ISO=/home/tv/mga/pkgs/drakx-installer-images/boot-home.iso
DD=nvme_img.qcow2
ID=DD2
qemu-img create -f qcow2 $DD 16G
qemu-system-x86_64 -m 1024 -cdrom $ISO -drive file=$DD,if=none,id=$ID \
    -device nvme,drive=$ID,serial=1234 --boot d --enable-kvm
Comment 17 Thierry Vignaud 2016-06-17 11:53:37 CEST
Closing

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 18 Mageia Robot 2016-09-25 11:43:18 CEST
commit a957610d01a094e040bb2bf0ce893be24ec9e449
Author: Thomas Backlund <tmb@...>
Date:   Sun Feb 14 01:28:37 2016 +0200

    detect partitions on nvme devices (mga#17743)
    
    (cherry picked from commit 4eb296a89c540a3ebdcecbc3f55758c4b5e5b97c)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=a957610d01a094e040bb2bf0ce893be24ec9e449
Comment 19 Mageia Robot 2016-09-25 11:43:22 CEST
commit 2e56d3c5dd9c062b5a91973d569220c01c74e9b4
Author: Thomas Backlund <tmb@...>
Date:   Sun Feb 14 02:47:07 2016 +0200

    detect nvme devices as block devices (mga#17743)
    
    (cherry picked from commit bc20ede924dc68640ca39ed338775aaebdd538fd)
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=2e56d3c5dd9c062b5a91973d569220c01c74e9b4

Note You need to log in before you can comment on or make changes to this bug.