lshw -C disk reports incomplete firmware version

Bug #663349 reported by Fabián Rodríguez
44
This bug affects 9 people
Affects Status Importance Assigned to Milestone
lshw
Confirmed
Unknown
lshw (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: lshw

I was able to reproduce this bug in both Ubuntu 10.10 and Ubuntu 10.04.1 LTS.

When getting firmware version information about a hard disk, the following command reports incomplete information:

sudo lshw -C disk

Here is example output:

  *-disk
       description: ATA Disk
       product: INTEL SSDSA2M040
       physical id: 0.0.0
       bus info: scsi@2:0.0.0
       logical name: /dev/sda
       version: 2CV1
       serial: CVGB036100TS040NGN
       size: 37GiB (40GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=000daa5d

In the above output, "version: 2CV1" should have been "2CV102DH". In another system with a standard SATA disk (non-SSD), the version was also truncated by 4 characters.

This is very inconvenient when trying to determine if such a disk needs a firmware upgrade on a headless system.

Palimpsest (under (System > Administration > Disk Utility) reports the right information. See attached screenshot.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: lshw 02.14-1build1
ProcVersionSignature: Ubuntu 2.6.35-22.34-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Tue Oct 19 11:38:31 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: lshw

Revision history for this message
Fabián Rodríguez (magicfab) wrote :
Revision history for this message
Fabián Rodríguez (magicfab) wrote :
description: updated
Revision history for this message
Fabián Rodríguez (magicfab) wrote :

It seems lshw grabs its output from /sys/block/sda/device/rev.

description: updated
Revision history for this message
komputes (komputes) wrote :

I can confirm that lshw only shows the first 4 characters whereas palimpsest shows 8. These 4 characters are the exact same as found in /sys/block/sda/device/rev.

Changed in lshw (Ubuntu):
status: New → Confirmed
Changed in lshw:
status: Unknown → New
Changed in lshw:
status: New → Confirmed
Revision history for this message
Fabián Rodríguez (magicfab) wrote :

Scratch that. I've since found out that dmesg reports the right f/w version, palimpsest (which probably gets this via udev) inverts the last two characters. I've filed Bug #672764 about this.

Revision history for this message
Jānis Kangarooo (kangarooo) wrote :

I confirm on 10.04.03 LTS Ubuntu Netbook Remix
palimpsest and
sudo hdparm -I /dev/sda | grep Firmware
SHows Firmware Revision: 100415
But
sudo lshw -C disk
shows in version only 4 chars
  *-disk
       description: ATA Disk
       product: JMicron
       physical id: 0.0.0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: 1004
       serial: 000000000203D
       size: 7686MiB (8059MB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=000853bd

Revision history for this message
Patrik Lundquist (patrik-lundquist) wrote :

Confirmed on Ubuntu 12.10. lshw/udev truncates product model at 16 chars and firmware version at 4 chars.

$ sudo lshw -C disk | egrep "product|serial|version"
       product: INTEL SSDSA2CW08
       version: 4PC1
       serial: BTPR146100P1080BGN

$ cat /sys/block/sda/device/model
INTEL SSDSA2CW08

$ cat /sys/block/sda/device/rev
4PC1

$ sudo hdparm -I /dev/sda | egrep "Number|Revision"
 Model Number: INTEL SSDSA2CW080G3
 Serial Number: BTPR146100P1080BGN
 Firmware Revision: 4PC10362

hdparm seems to be correct when printing Model as a 40 char string, Serial as a 20 char string, and Firmware as an 8 char string.

tags: added: raring
tags: added: saucy trusty
tags: added: bionic focal
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.