Ask Your Question
0

How to access Lenovo Flex 5's SSD M.2 PCIe?

asked 2019-04-02 16:38:08 -0600

wallyk gravatar image

updated 2019-04-05 12:37:17 -0600

I have a Lenovo Flex-5 1570 laptop. Its specifications (for a similar model) say it has:

  • 500 GB 5400 RPM
  • Up to 512 GB PCIe SSD

Upon its first powerup, it began a Windows 10 installation of some sort. I stopped it, replaced the hard drive with a blank 960 GB SSD and powered it up. It began the Windows 10 shenanigans again. I interrupted and got it to boot a live Fedora USB, installed Fedora 27 and it hasn't bothered me with Windows since.

But it occurs to me there isanother 500 GB of SSD not being used (or worse: there is lurking Windows cr*pware in there). I wonder how to get Fedora to recognize the original SSD for additional storage use.

Gnome Disks doesn't notice that drive:ignome-disks display

And it doesn't appear as another device:

[wally@host ~]$ ll /dev/s*
brw-rw----. 1 root disk  8,   0 Mar 22 10:28 /dev/sda
brw-rw----. 1 root disk  8,   1 Mar 22 10:28 /dev/sda1
brw-rw----. 1 root disk  8,   2 Mar 22 10:28 /dev/sda2
brw-rw----. 1 root disk  8,   3 Mar 22 10:28 /dev/sda3
crw-rw----. 1 root disk 21,   0 Mar 22 10:28 /dev/sg0
crw-------. 1 root root 10, 231 Mar 22 10:28 /dev/snapshot
lrwxrwxrwx. 1 root root      15 Mar 22 10:28 /dev/stderr -> /proc/self/fd/2
lrwxrwxrwx. 1 root root      15 Mar 22 10:28 /dev/stdin -> /proc/self/fd/0
lrwxrwxrwx. 1 root root      15 Mar 22 10:28 /dev/stdout -> /proc/self/fd/1

--------------------------- Additional information ---------------------------

[wally@host ~]$ cat /proc/partitions 
major minor  #blocks  name

   8        0  937692504 sda
   8        1     204800 sda1
   8        2    1048576 sda2
   8        3  936437760 sda3
 253        0   52428800 dm-0
 253        1    8196096 dm-1
 253        2  875810816 dm-2

------- even more ---------

[wally@host ~]$ ls -ls /dev/mapper/
total 0
0 crw-------. 1 root root 10, 236 Mar 22 10:28 control
0 lrwxrwxrwx. 1 root root       7 Mar 22 10:28 fedora-home -> ../dm-2
0 lrwxrwxrwx. 1 root root       7 Mar 22 10:28 fedora-root -> ../dm-0
0 lrwxrwxrwx. 1 root root       7 Mar 22 10:28 fedora-swap -> ../dm-1
[wally@localhost bot]$ ls -l /dev/mapper/
total 0
crw-------. 1 root root 10, 236 Mar 22 10:28 control
lrwxrwxrwx. 1 root root       7 Mar 22 10:28 fedora-home -> ../dm-2
lrwxrwxrwx. 1 root root       7 Mar 22 10:28 fedora-root -> ../dm-0
lrwxrwxrwx. 1 root root       7 Mar 22 10:28 fedora-swap -> ../dm-1


[root@host ~]# fdisk -l
Disk /dev/sda: 894.3 GiB, 960197124096 bytes, 1875385008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C0A828D0-B398-498A-B026-8D91B5F29E09

Device       Start        End    Sectors   Size Type
/dev/sda1     2048     411647     409600   200M EFI System
/dev/sda2   411648    2508799    2097152     1G Linux filesystem
/dev/sda3  2508800 1875384319 1872875520 893.1G Linux LVM


Disk /dev/mapper/fedora-root ...
(more)
edit retag flag offensive close merge delete

Comments

please post the contents of "cat /proc/partitions" here.

rdtcustomercare gravatar imagerdtcustomercare ( 2019-04-03 16:39:37 -0600 )edit

please post the contents of "cat /proc/partitions" here. The SSD will be name nve... or similar , not s* , no wonder you don't see it. Any yes, the preinstalled windows bootloader crap is more than anoying and hard to get rid of.

rdtcustomercare gravatar imagerdtcustomercare ( 2019-04-03 16:41:13 -0600 )edit

I added the partitions information, a feature I didn't know about before. What is a dm-X device?

wallyk gravatar imagewallyk ( 2019-04-03 18:58:44 -0600 )edit

dm stands for devmapper => devicemapper

It builds virtual devices i.e. if you unlock a luks crypted device dm takes care of it.

rdtcustomercare gravatar imagerdtcustomercare ( 2019-04-04 07:49:05 -0600 )edit

pls add "ls -ls /dev/mapper/"

rdtcustomercare gravatar imagerdtcustomercare ( 2019-04-04 07:50:11 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-04-07 16:55:28 -0600

wallyk gravatar image

updated 2019-04-08 04:13:32 -0600

Thanks to @rdcustomercare for finding someone else with the same issue where it was resolved on an Ubuntu forum. The Ubuntu solution has many parts, but only the first step (change a BIOS setting) is needed for Fedora to find the M.2 SSD.

The BIOS setting for SATA mode must be AHCI for the SSD to be visible to Fedora. On Lenovo, the factory default for SATA mode is Intel RST and that results in Linux not recognizing the SSD. Once that is changed to AHCI (ignoring the dire warning of losing drive parameters), the contents of the SSD is visible. (Note that users who want to subsequently boot Windows, for whatever reason, are not able to with this set to AHCI. That link gives a fix.)

After rebooting Linux, here are the new displays:

------- fdisk -------

[root@host ~]# fdisk -l
Disk /dev/sda: 894.3 GiB, 960197124096 bytes, 1875385008 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C0A828D0-B398-498A-B026-8D91B5F29E09

Device       Start        End    Sectors   Size Type
/dev/sda1     2048     411647     409600   200M EFI System
/dev/sda2   411648    2508799    2097152     1G Linux filesystem
/dev/sda3  2508800 1875384319 1872875520 893.1G Linux LVM


Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora-swap: 7.8 GiB, 8392802304 bytes, 16392192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: DDC81B9A-A3E2-40B9-A698-8889B38F24DA

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1      2048    534527    532480   260M EFI System
/dev/nvme0n1p2    534528    567295     32768    16M Microsoft reserved
/dev/nvme0n1p3    567296 445640703 445073408 212.2G Microsoft basic data
/dev/nvme0n1p4 445640704 498069503  52428800    25G Microsoft basic data
/dev/nvme0n1p5 498069504 500117503   2048000  1000M Windows recovery environment


Disk /dev/mapper/fedora-home: 835.2 GiB, 896830275584 bytes, 1751621632 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

------- partitions --------

[root@host ~]# cat /proc/partitions 
major minor  #blocks  name

   8        0  937692504 sda
   8        1     204800 sda1
   8        2    1048576 sda2
   8        3  936437760 sda3
 253        0   52428800 dm-0
 253        1    8196096 dm-1
 259        0  250059096 nvme0n1
 259        1     266240 nvme0n1p1
 259        2      16384 nvme0n1p2
 259        3  222536704 nvme0n1p3
 259        4   26214400 nvme0n1p4
 259        5    1024000 nvme0n1p5
 253        2  875810816 dm-2

------- /dev/nv* -------

[root@host ~]# ls -l /dev/nv*
crwxrwxrwx. 1 root root 238,   0 Apr  7 14:37 /dev/nvme0
brwxrwxrwx. 1 root disk 259,   0 Apr  7 19:34 /dev/nvme0n1 ...
(more)
edit flag offensive delete link more

Comments

1

I'm not karma addicted ;)

I happy, that it's working now.

rdtcustomercare gravatar imagerdtcustomercare ( 2019-04-08 13:26:07 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-04-02 16:38:08 -0600

Seen: 135 times

Last updated: Apr 08 '19