Honghe.Wu
Honghe.Wu

Reputation: 6849

Dmidecode Can not get Base Board Serial Number of some board

Such as follow, the last 2 boards' serial nomber can't be get.

So:

  1. What's wrong?
  2. How can I get the base board serial number through C language on linux?

Thanks!

dmidecode --type baseboard

Board 1:

    SMBIOS 2.7 present.

    Handle 0x0002, DMI type 2, 15 bytes
    Base Board Information
            Manufacturer: TBD
            Product Name: TBD
            Version: TBD
            Serial Number: 4535NP0023
            Asset Tag:                                 
            Features:
                    Board is a hosting board
                    Board is replaceable
            Location In Chassis: TBD
            Chassis Handle: 0x0003
            Type: Motherboard
            Contained Object Handles: 

Board 2:

    SMBIOS 2.4 present.

    Handle 0x0002, DMI type 2, 8 bytes
    Base Board Information
            Manufacturer: Gigabyte Technology Co., Ltd.
            Product Name: P55-UD3L
            Version: x.x
            Serial Number:  SMBIOS 2.4 present.

    Handle 0x0002, DMI type 2, 15 bytes
    Base Board Information
            Manufacturer: Intel Corporation
            Product Name: 440BX Desktop Reference Platform
            Version: None
            Serial Number: None
            Asset Tag: Not Specified
            Features: None
            Location In Chassis: Not Specified
            Chassis Handle: 0x0000
            Type: Unknown
            Contained Object Handles: 0

Board 3:

    SMBIOS 2.4 present.

    Handle 0x0002, DMI type 2, 8 bytes
    Base Board Information
            Manufacturer: Gigabyte Technology Co., Ltd.
            Product Name: P55-UD3L
            Version: x.x
            Serial Number:  

Upvotes: 1

Views: 4165

Answers (1)

user145440
user145440

Reputation: 146

check the /sys/ directory (start at /sys/class/dmi) you will find files containing the serial number ... ... or not!

but be aware, only if the Board Manufacturer does his job, the DMI information will be filled through the start up phase by the BIOS or eventually by (??) ACPI initialisation during the OS startup.

Have a look at the BIOS Screen Some Manufactures show the serial number in the BIOS screen pages, but however, they do not fill the DMI information... (serial numbers are often stored in a different piece of hardware, e.g. an EEPROM connected by i2c)

Therefore, you will end up in working around bogus firmware..

However - ask youself if reading the serial number is the right solution to your problem. Eventually you only need something to identify the PC like a mac address, Disk serial number - more like an UUID...

Upvotes: 1

Related Questions