From fe1aea4a643225f573f90f00625116ead86fc89b Mon Sep 17 00:00:00 2001 From: Brooks Swinnerton Date: Mon, 5 Nov 2018 20:57:56 -0500 Subject: T967: Include nvme drives when probing --- scripts/install/install-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/install/install-functions') diff --git a/scripts/install/install-functions b/scripts/install/install-functions index d241e040..afda4d91 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -151,7 +151,7 @@ get_drive_size () { # Probe hardrives not shown in /proc/partitions by default probe_drives () { # Find drives that may not be in /proc/partitions since not mounted - drive=$(ls /sys/block | grep '[hsv]d.') + drive=$(ls /sys/block | grep '[hsv]d.|nvme.') # now exclude all drives that are read-only for drive in $drive; do -- cgit v1.2.3 From 7b7136592a921f2a3bdc75b483429687e244722c Mon Sep 17 00:00:00 2001 From: Brooks Swinnerton Date: Mon, 5 Nov 2018 20:59:49 -0500 Subject: T967: Include nvme drives when selecting drive I had a difficult time finding a canonical source of device name formatting in Linux (was hoping for an RFC), but this should be pretty close to reality. NVMe drives are typically named as so: - nvme0: first registered device's device controller - nvme0n1: first registered device's first namespace - nvme0n1p1: first registered device's first namespace's first partition --- scripts/install/install-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/install/install-functions') diff --git a/scripts/install/install-functions b/scripts/install/install-functions index afda4d91..d65a6c6c 100755 --- a/scripts/install/install-functions +++ b/scripts/install/install-functions @@ -176,7 +176,7 @@ select_drive () { # the first grep pattern looks for devices named c0d0, hda, and sda. drives=$(cat /proc/partitions | \ awk '{ if ($4!="name") { print $4 } }' | \ - egrep "c[0-9]d[0-9]$|[hsv]d[a-z]$" | \ + egrep "c[0-9]d[0-9]$|[hsv]d[a-z]$|nvme[0-9]n[0-9]" | \ egrep -v "^$") # take the first drive as the default -- cgit v1.2.3