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