Monday, January 20, 2014

How to get BIOS/Motherboard Info from Linux

It is possible to read the BIOS version and motherboard information from a live Linux OS. You don't need to reboot your PC to get the BIOS and motherboard info. The command you use to get these information is called "dmidecode" (DMI table decoder). It will dump a computer's DMI (Desktop Management Interface - an API to enable software to collect info about a computer env) table contents in a human-readable format. This table contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision.

"dmidecode" utility also reports information about your system's hardware as described in your system BIOS according to the SMBIOS/DMI standard. This information typically includes system manufacture, model name, seial number, BIOS version, asset tag as well as a log of other details of varying level of interest and reliability depending on the manufacturer.

From command line, simply just rum "dmidecode":

# dmidecode
# dmidecode 2.11
SMBIOS 2.4 present.
38 structures occupying 1178 bytes.
Table at 0x000F0100.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: Award Software International, Inc.
Version: F3
Release Date: 08/20/2010
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 8192 kB
Characteristics:
...


You can specify --string or --type to filter the results:
# dmidecode --type
dmidecode: option '--type' requires an argument
Type number or keyword expected
Valid type keywords are:
  bios
  system
  baseboard
  chassis
  processor
  memory
  cache
  connector
  slot

# dmidecode --type bios
# dmidecode 2.11
SMBIOS 2.4 present.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: Award Software International, Inc.
Version: F3
Release Date: 08/20/2010
Address: 0xE0000

You can consult "dmidecode"'s man page for details.

To get system serial number (sometimes it is very important, for example, you need to call support for a particular server that's can't be take down), you can use "dmidecode -s system-serial-number".
# dmidecode -s system-serial-number.
Invalid string keyword: system-serial-number.
Valid string keywords are:
  bios-vendor
  bios-version
  bios-release-date

A helpful alias:
alias bios='[ -f /usr/sbin/dmidecode ] && sudo -v && echo -n "Motherboard" && sudo /usr/sbin/dmidecode -t 1 | grep "Manufacturer\|Product Name\|Serial Number" | tr -d "\t" | sed "s/Manufacturer//" && echo -ne "\nBIOS" && sudo /usr/sbin/dmidecode -t 0 | grep "Vendor\|Version\|Release" | tr -d "\t" | sed "s/Vendor//"'

This will spit out a nicely formatted summary of the bios and motherboard information, using sudo so it can be run as a normal user. Example output:
# bios
Motherboard: Gigabyte Technology Co., Ltd.
Product Name: H55M-D2H
Serial Number: 

BIOS: Award Software International, Inc.
Version: F3
Release Date: 08/20/2010

If you prefer graphic inteface, you can install "hardinfo",
# yum install hardinfo
# hardinfo

1 comment:

Marshall628 said...

Another way to get this info is lshw

http://ezix.org/project/wiki/HardwareLiSter