×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

DMI information during imaging

DMI information during imaging

DMI information during imaging

(OP)
I have need to pull a computer's serial number from DMI during the imaging process.

I'm using a scripted image and we are using ZfD 7 SP1.

I've seen mention about using dmidecode in a number of places, but neither have I been able to find a pre-compiled version of dmidecode that will work with the ZEN imaging kernel, nor have I been able to successfully compile one in any system that was able to work.

Can someone either help me find a pre-built one (the kernel is showing 2.6.5-7.191-default with gcc version 3.3.3) or send me to some instructions about how to correctly compile something such that it will work with the ZEN linux environment?

Thank you in advance.

-------------------------------------------------------------------------
Charlie Silverman
Sr. Systems Administrator
Globalstar, LLC

-------------------------------------------------------------------------
We now return you to your regularly scheduled reality.

RE: DMI information during imaging

What do you want to do with the computers serial number once you are done with it?


To build a system that has the same kernel as the ZfD imaging engine, build a Suse 9 Sp2 system.

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Brent Schmidt        Certified nut case   
Senior Network Engineer
Keep IT Simple http://www.kiscc.com

RE: DMI information during imaging

(OP)
We want to use two pieces of information from DMI.

The serial number will become the PC's workstation name.

The model number will be used to determine the correct driver add-on for imaging.

I will get a copy of SLES9 SP2 to build the program.

Thank you for your help!

-------------------------------------------------------------------------
Charlie Silverman
Sr. Systems Administrator
Globalstar, Inc.

-------------------------------------------------------------------------
We now return you to your regularly scheduled reality.

RE: DMI information during imaging

Well, for naming the PC, jump up to http://www.engl.co.uk/ and download the tool Zcnc.exe add it to your workstation setup script and use the command

CODE

zcnc.exe /wmi:"Win32_BIOS" /sn: /q

and it will name the PC by the BIOS serial number

the second part ... I think your doing it the hard way, but if you get it to work .... share the code  :).


Personally I would just lump all of the drivers together, or if your trying to conserve disk space, use the imaging rules to determine which drive package to use.

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Brent Schmidt        Certified nut case   
Senior Network Engineer
Keep IT Simple http://www.kiscc.com

RE: DMI information during imaging

(OP)

Quote:

Personally I would just lump all of the drivers together, or if your trying to conserve disk space, use the imaging rules to determine which drive package to use.

I prefer to have the drivers in separate packages.  It makes it much easier to update as we get new systems, and also makes our base image much simpler.

As far as using the imaging rules, that's fine except it still requires I have a scripted image created for each and every system type.

If I have the drivers separated out, I can set up a fairly simple scripted image that looks at the system model number gleaned from DMI and determines the file name of the drivers image that it needs to add.

As soon as I have a copy of SLES9 downloaded (it's going slow, currently saying it's going to take about 24 hours to download the DVD image) I will compile dmidecode and post back the resulting script.

-------------------------------------------------------------------------
Charlie Silverman
Sr. Systems Administrator
Globalstar, Inc.

-------------------------------------------------------------------------
We now return you to your regularly scheduled reality.

RE: DMI information during imaging

(OP)
I was able to compile dmidecode without issue using the SLES 9.2 install.

I added the following lines to the settings.txt file so that dmidecode was downloaded every time the imaging engine is started:

CODE

tftp $TFTPIP -m binary -c get $TFTPIP:decode /bin/decode
mv /bin/decode /bin/dmidecode
chmod +x /bin/dmidecode

I then use a scripted image with the following code:

CODE

# ************************************************************************
# Globalstar Standard Baseline Imaging Script
# Version: 1.0
# ************************************************************************
# Description: This script will place a default baseline onto a PC.
# ************************************************************************
# Change Log:
#    2006-08-25 - CJS - File created
# ************************************************************************

## Set the base path for all images
BASEPATH=//$TFTPIP/VOL1/Images/
## Set the name for the current base image file
BASEIMAGE=xpsp2-base-1_0.zmg
## Retrieve the workstation name from Image Safe Data
ZISNAME=`zisview Name`

## If there was no workstation name in Image Safe, retrieve the
## PC's serial number from DMI
if [ -n "$ZISNAME" ]; then
   ZISNAME=`dmidecode -s chassis-serial-number`
fi

## Retrieve the PC's model number from DMI and strip trailing spaces
MODEL=`dmidecode -s system-product-name | sed 's/[ \t]*$//'`

## Set the workstation's name in Image Safe Data
zisedit Name=$ZISNAME

## Delete all existing partitions
img pd-all
## Create one ntfs partition using all available space
img pc1 ntfs
## Activate the partition
img pa1
## Download the base image file
img rp $TFTPIP "$BASEPATH$BASEIMAGE" a1:p1
## Download the driver add-on image file
img rp $TFTPIP "$BASEPATH$MODEL.zmg" a1:p1

## Download the baseapps script to install default baseline apps
tftp $TFTPIP -c get $TFTPIP:baseapps /bin/baseapps
chmod +x /bin/baseapps
/bin/baseapps

## Reboot
reboot

This works for all system types.  If we have a Dell Latitude D610, for example, the system product name returned is "Latitude D610 ".  (Dell adds that space to the end for some reason, which is why I strip trailing spaces.)

I then created a driver add-on image called "Latitude D610.zmg".

The baseapps script contains lines to download each of the baseline apps.

I chose to implement this as a separate script so that it did not require modification of the scripted image just to add or remove an application from the baseline.

This makes for a very streamlined image, and also solves the problem of having multiple system types with similar hardware as we do not have to rely on imaging rules.  I set my imaging server rule to look for any machine that has a 2 in the IP address.  As all of our fixed IP ranges have 2's in them, as well as all of our DHCP address ranges, this will always be positive.

I hope this helps others with their implementations.

-------------------------------------------------------------------------
Charlie Silverman
Sr. Systems Administrator
Globalstar, Inc.

-------------------------------------------------------------------------
We now return you to your regularly scheduled reality.

RE: DMI information during imaging

This is pretty kewl.   Thank you for sharing the info.


I smell a Cool Solution artical here.

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
Brent Schmidt        Certified nut case   
Senior Network Engineer
Keep IT Simple http://www.kiscc.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close