Packetwatch.net

Compile Dmidecode in Red Hat Enterprise Linux



Last modified: Feb. 15, 2009

Contents
1 - Summary
2 - Dependencies
3 - Dmidecode installation
4 - Commands


1 - Summary

This guide will show how to compile and install dmidecode from source in Red
Hat Enterprise Linux. Dmidecode can get the system serial number and BIOS
information. This has been tested in Red Hat Enterprise Linux 4.


2 - Dependencies

You will need the following package installed to compile dmidecode from source.
  gcc-*
# rpm -qa | grep gcc-*


3 - Dmidecode installation

Dmidecode can be downloaded at http://www.nongnu.org/dmidecode/. This will be
downloaded, compiled and installed from source. Dmidecode will be installed to
/usr/local. In Red Hat Enterprise Linux 4 the dmidecode package isn't included,
but the dmidecode binary is included.
# cd ~
# whereis dmidecode
dmidecode: /usr/sbin/dmidecode
# sudo mv /usr/sbin/dmidecode /usr/sbin/dmidecode.original
# wget http://download.savannah.gnu.org/releases-noredirect/dmidecode/dmidecode-*.tar.gz
# tar -zxvf dmidecode-*.tar.gz
# cd dmidecode-*/
# make
# sudo make install
# sudo make clean


4 - Commands

You can display the system information including serial number by typing the
following.
# sudo /usr/local/sbin/dmidecode -t 1 | grep -e 'Manufacturer' -e 'Product Name' \
-e 'Serial Number' | cut -f 2
Manufacturer: Dell Computer Corporation
Product Name: PowerEdge 1800
Serial Number: XXXXXXX

You can display the BIOS information by typing the following.
# sudo /usr/local/sbin/dmidecode -t 0 | grep -e 'Vendor' -e 'Version' \
-e 'Release Date' | cut -f 2
Vendor: Dell Computer Corporation
Version: XXX
Release Date: XX/XX/XXXX


Last modified: Thu Jan 1 00:00:00 1970 UTC
Packetwatch Research 2002-2024.