MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Fri, Aug 07, 2015 7:21 pm

Obtaining hard disk drive and optical drive information on an Ubuntu system

On a Ubuntu Linux system, you can determine the hard disk drive (HDD) serial number, disk capacity, and manufacturer with the command sudo lshw -class disk:

$ sudo lshw -class disk
[sudo] password for jdoe: 
       description: ATA Disk
       product: QUANTUM FIREBALL
       vendor: Quantum
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: A35.
       serial: 186021137091
       size: 27GiB (30GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 signature=59915410
       description: SCSI CD-ROM
       physical id: 1
       bus info: scsi@1:0.0.0
       logical name: /dev/cdrom
       logical name: /dev/sr0
       capabilities: audio
       configuration: status=nodisc

You can obtain information on an optical drive, such as a CD-ROM or DVD drive using the dmesg command. Piping the output to egrep allows you to filter out extraneous data.

$ dmesg | egrep -i 'cdrom|dvd|cd/rw|writer'
[    1.183545] sr0: scsi3-mmc drive: 48x/48x cd/rw xa/form2 cdda tray
[    1.183556] cdrom: Uniform CD-ROM driver Revision: 3.20

From the above output, I can see the read and write speed for the CD/RW drive in the system is 48 speed.

You can also obtain the speed of the drive by examining the contents of /proc/sys/dev/cdrom/info.

$ cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17

drive name:		sr0
drive speed:		48
drive # of slots:	1
Can close tray:		1
Can open tray:		1
Can lock tray:		1
Can change speed:	1
Can select disk:	0
Can read multisession:	1
Can read MCN:		1
Reports media changed:	1
Can play audio:		1
Can write CD-R:		0
Can write CD-RW:	0
Can read DVD:		0
Can write DVD-R:	0
Can write DVD-RAM:	0
Can read MRW:		1
Can write MRW:		1
Can write RAM:		1


You can obtain the manufacturer and model number for a CD-ROM, CD/RW, or DVD drive using the cd-drive utility from the libcdio-utils package. If it isn't installed, you can install it on an Ubuntu system with sudo apt-get install libcdio-utils.

$ cd-drive
The program 'cd-drive' is currently not installed.  You can install it by typing:
sudo apt-get install libcdio-utils
$ sudo apt-get install libcdio-utils

Once you've installed the package, you can view vendor, model number, and other information for the drive, including functions the drive supports by issuing the command cd-drive.

$ cd-drive
cd-drive version 0.83 i686-pc-linux-gnu
Copyright (c) 2003, 2004, 2005, 2007, 2008, 2011 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
The driver selected is GNU/Linux
The default device for this driver is /dev/cdrom

Drivers available...
  GNU/Linux ioctl and MMC driver     
  cdrdao (TOC) disk image driver     
  bin/cuesheet disk image driver     
  Nero NRG disk image driver         

CD-ROM drive supports MMC 3

                       Drive: /dev/cdrom
Vendor                      : HL-DT-ST
Model                       : CD-ROM GCR-8483B
Revision                    : 1.05
Profile List Feature

Core Feature
	ATAPI interface

Morphing Feature
	Operational Change Request/Notification not supported

Removable Medium Feature
	Tray type loading mechanism
	can eject the medium or magazine via the normal START/STOP command
	can be locked into the Logical Unit

Random Readable Feature

CD Read Feature
	C2 Error pointers are not supported
	CD-Text is supported

Initiator- and Device-directed Power Management Feature

Ability to respond to all commands within a specific time Feature

Vendor-specific code ffde Feature

Hardware                                  : CD-ROM or DVD
Can eject                                 : Yes
Can close tray                            : Yes
Can disable manual eject                  : Yes
Can select juke-box disc                  : No

Can set drive speed                       : No
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device                     : No

  Can read Mode 2 Form 1                  : Yes
  Can read Mode 2 Form 2                  : Yes
  Can read (S)VCD (i.e. Mode 2 Form 1/2)  : Yes
  Can read C2 Errors                      : No
  Can read IRSC                           : Yes
  Can read Media Channel Number (or UPC)  : Yes
  Can play audio                          : Yes
  Can read CD-DA                          : Yes
  Can read CD-R                           : Yes
  Can read CD-RW                          : Yes
  Can read DVD-ROM                        : No

  Can write CD-RW                         : No
  Can write DVD-R                         : No
  Can write DVD-RAM                       : No
  Can write DVD-RW                        : No
  Can write DVD+RW                        : No


In the above example, I can see the drive model number is GCR-8483B, so can look online for futher information that might be available from the manufacturer, if needed.

Note: all of the above examples were run on a Ubuntu 12.04 LTS system.

[/os/unix/linux/ubuntu] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo