Solaris 10 6/06 x86: Making smbios and prtdiag work on crap hardware

Solaris 6/06 includes many improvements for x86 platform. One of them is a smbios utility which allows administrators and developers to examine hardware configuration. Solaris supports SMBIOS specification versions 2.3 and 2.4 but many crap BIOSes exports version 2.2 structures. Errors reported in syslog:


SMBIOS not loaded (SMBIOS format is too old for processing)

And when you run smbios:


# smbios
smbios: failed to open SMBIOS: SMBIOS format is too old for processing

It is possible to skip SMBIOS version checks by specifying this parameter in /etc/system (see smbios.h):


set ksmbios_flags=2

smbios utility checks can also be skipped:


# smbios -B

Unfortunately other programs (such as prtdiag and SunVTS) linked with smbios library does not allow to skip version checks, so download:

compile:

# cc -g -xCC -Kpic -G -o smbios_version_hack.so smbios_version_hack.c
# gcc -g -fPIC -shared -o smbios_version_hack.so smbios_version_hack.c

and run:


# LD_PRELOAD=./smbios_version_hack.so /usr/sbin/prtdiag
# LD_PRELOAD=./smbios_version_hack.so /usr/sbin/smbios
# LD_PRELOAD=./smbios_version_hack.so /opt/SUNWvts/bin/sunvts

» Tags: , , ,

Reader's Comments »

  1. By Zika on February 27, 2009 at 5:08 pm

    done as per instructions and got:
    root@dell-p3 # LD_PRELOAD=./smbios_version_hack.so /usr/sbin/prtdiag
    ld.so.1: sh: fatal: libgcc_s.so.1: open failed: No such file or directory
    Killed

    Not sure if I am missig something or doing wrong way. Please assist me.

  2. By Zika on February 27, 2009 at 5:39 pm

    When I did:
    export LDPATH=/usr/local/lib
    LD_PRELOAD=./smbios_version_hack.so /usr/sbin/smbios
    I got:
    Segmentation Fault(coredump)

    Where to go freom there?
    Please help. God bless.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>