A guess is a field has a non-printable character.
How to inspect / examine / pull 1 field from a M.2
drive?
This means get the raw field from the drive and
see if the raw field has a non-printable character.
background:
A drive was purchased.
WD (Western Digital) M.2 sata 1TB 2280
drive was raw from store
drive was not partitioned
drive was not formatted, no filesystem
with Kubuntu 22.04
lsblk --version
lsblk from util-linux 2.37.2
lsblk -ido KNAME,TYPE,SIZE,MODEL |grep -i 'sd|disk|size'
KNAME TYPE SIZE MODEL
sda disk 931.5G WD Blue SA510 M.2 2280 1000GB
but with parted version 3.4 and other commands …
parted --version
parted (GNU parted) 3.4
sudo parted -l
Error: /dev/sda: unrecognised disk label
Model: ATA WD Blue SA510 M. (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
.
Using 7 commands:
sudo smartctl -i /dev/sda | grep 'Device Model'
lsblk -ido KNAME,TYPE,SIZE,MODEL |grep -i 'sd|disk|size'
sudo fdisk -l /dev/sda
sudo sfdisk -l /dev/sda
sudo parted -l
sudo lshw -class disk |grep 'product:'
grep . /sys/class/block/sd*/device/model
output of above 7 commnads with respect to field ‘Device Model’ :
WD Blue SA510 M.2 2280 1000GB smartctl 7.2 2020-12-30
WD Blue SA510 M.2 2280 1000GB lsblk from util-linux 2.37.2
WD Blue SA510 M. fdisk from util-linux 2.37.2
WD Blue SA510 M. sfdisk from util-linux 2.37.2
WD Blue SA510 M. sudo lshw -class disk |grep 'product:'
WD Blue SA510 M. grep . /sys/class/block/sd*/device/model
ATA WD Blue SA510 M. (scsi) parted (GNU parted) 3.4
Summary:
2 of 7 commands show ‘Device Model’ WD Blue SA510 M.2 2280 1000GB
5 of 7 commands show truncating in mid-field
of M.2
at the period.
Guess is a non-printable character after the period . in M.2
Guess smartctl
and lsblk
filter out non-printables.
While other 5 commands do not filter out non-printables.
Said differently
To test, What command can be done?
How to pull a field from M.2
drive to test for non-printables? in:
WD Blue SA510 M.2 2280 1000GB
For example:
grep '[^[:print:]]' filePath
reference:
https://stackoverflow.com/questions/25720471/how-to-find-non-printable-characters-in-the-file
While looking for a non-printable character in field ‘Device Model’
WD Blue SA510 M.2 2280 1000GB
How to inspect this 1 field above in a M.2
sata ssd drive?
—