Skip to content

Commit

Permalink
T967: Include nvme drives when selecting drive
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bswinnerton committed Nov 6, 2018
1 parent fe1aea4 commit 7b71365
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/install/install-functions
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7b71365

Please sign in to comment.