Ramblings From The Litter Tray of Life

Archive for the ‘IT’ Category

Upgrading Nagios

Posted by graycat on 30 April 2010

For those of who have to look after multiple servers then you’ll understand the benefits of monitoring systems. In fact anything that will tell you of a problem before it becomes a major one has got to be a good thing!

Now whilst there’s many offerings out there in the market with solutions to fit every budget and requirements I’ve gone for Nagios. Nagios is an open source offering which really differs from others in the fact that it’s just the framework for the monitoring and you have to build or bolt on the checks on top. For me, this modular design is excellent as I know I’m starting with a blank slate and then adding only the bits I need.

Having have a Nagios box in place for well over a year now, I felt it was time to update the configuration into something a bit more manageable (covered in another post) but before I could do that I took the time to upgrade the application itself. It was an interesting process and one with a few tweaks from standard which may be applicable to others.

The upgrade of a vanilla install is pretty simple and covered here, however I’ll throw down a quick summary:

ssh onto the box and run as the local nagios account
su -l nagios

Remove the old HTML files that were being used by the gui frontend as they’re going to be upgraded.
rm /usr/local/nagios/share/{main,side,index}.html

Change into your downloads directory and download the latest source code of nagios
cd /downloads

Extract the tarball
tar xzf nagios-3.x.tar.gz
cd nagios-3.x

Run the confguration script with the name of the group used to control the external command file permissions
./configure –with-command-group=nagcmd

Compile the source code, install the updated binaries and web interface.
make all
make install

Verify the configuration files all work with this handy command:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Restart nagios service like thus:
/sbin/service nagios restart

Note: I found some of these stages more reliable to run as root rather than the nagios user.

At this point you’re pretty much done with the upgrade of a vanilla system. However, I use the Nuvola style to make Nagios that much easier on the eyes.

The Nuvola style sheet is pretty easy to install and tweak but does override some of the default web front end. Unfortunately when you upgrade Nagios it tramples all over these files so you have to rerun the install almost from scratch.


Posted in Applications, IT | Leave a Comment »

Install CentOS 5 via NetInstall

Posted by graycat on 9 July 2009

I’ve recently started playing with linux to the point that it’s in the live domain now doing various rolls. However, I’ve recently tried installing it on an old and dodgy laptop for a specific task and ran into a few issues.
Firstly the only install CD I had was in fact a DVD which whilst no big deal normally would not boot in this laptop. I told you it was old, right?
I looked at downloading the install CDs but there are five or so of them and it just didn’t light my fire. Then I discovered NetInstall – basically this is a tiny iso that allows you to boot from it, point the install at the online repositories and install from there over the network.

Neat, huh?

I found a really good guide here (http://www.chrisgountanis.com/technical/34-technical/45-centos-netinstall.html) but failed at the first hurdle of starting the install. The error message was something like “Could not find kernel image: linux”.
Touch annoying but it turns out it is a known bug. The really easy solution is to type the following command at the start screen and hit go: “/isolinux/vmlinuz initrd=/isolinux/initrd.img”
Once that’s going, follow the previous link to get the install going as per normal and you’re well away.

Now to just watch the blue line work its way across the screen …..

Posted in IT | Leave a Comment »

Deploying AutoCAD 2010 via GPO (Bringing it all together)

Posted by graycat on 16 June 2009

Now we’re a good four posts into my trial and tribulations of deploying this application via GPO, I thought it’d be a good time to round it all up together in what should hopefully be my last post on this subject for a while. Ok, I may do a complete “how to” once it gets out of the testing phase but one step at a time, ok?

The basic process of installing this application unfortunately requires more than just the deployment package from AutoDesk. To successfully install AutoCAD 2010 you will need to also install the following:

  • DirectX 9.0c and its latest updates.
  • 2008 C++ redistributable library / package
  • the missing files from the deployment

This also have to be installed in the above order with the AutoCAD package slotting in nicely before the missing files. To do this I’ve split the deployment into two GPO’s – the first installs DirectX and updates it to the latest version whilst the second installs both the C++ and AutoCAD msi packages before running a startup script to pull the missing files. To make sure these GPOs run in the right order (ie: AutoCAD doesn’t try installing before its got DirectX etc) I’ve use a WMI filter to control the second GPO.

For those of you familiar with GPOs you will no doubt be familiar with WMI filters. If you’re not familiar with them already, they can be summed up as a local check on the PC for a defined condition to be true before the GPO will activate. A lot of cases will look for an installed applicaiton (Office 2003 if you’re installing the 2007 compatability pack for example) or many other things.

In this case I’ve used the WMI filter to look for a directory under C:\Windows that only arrives after the DIrectX update. Here’s the filter:

Select * from Win32_Directory where name = ‘c:\\Windows\\Microsoft.Net\\DirectX for Managed Code’

It’s set in the root\CIMv2 namespace incase you were awake and wondering about that. ūüôā

Once you’ve set the DIrectX update / deployment GPO up successfully and controlled the AutoCAD GPO via this WMI filter it should all install fine. I’ve moved on to testing this on a large group of live production machines and these little changes have really helped. The only tweaks I do have are for neatness of scripts and installs (eg: the copy script needs to hide the copy section from view) but that’s minor and more to do with me being picky.

Hope that helps somewhat with your endeavours of deploying this application via GPO.

Posted in IT | Tagged: , , , , , , | 2 Comments »

Deploying AutoCAD 2010 via GPO (Part 4)

Posted by graycat on 10 June 2009

Or  Death by Application Rollout!

Now that I’m into the testing phase on live machines, all manner of lovely issues seem to crop up. Here’s some of the major ones and how to resolve them.

FATAL ERROR: Unhandled e0434f4dh Exception at 7c812a5bh

This is related to the .NET installs on the local machine. The latest version I have allowed here is 3.5 SP1 and there seems to have been issues with the initial release from MS. A quick an easy resolution to this is to uninstall the SP1, reboot the machine and let it pick up the updated SP1 from WSUS or wherever. In all the cases I’ve had here, this has resolved the issue nicely.

Various DLL, cui / cuix and chm files missing

This was a tough one to figure out but it seems for some reason that the msi package doens’t copy all the dll files down from the install point. To resolve this, I added a start up script to the policy like this:

REM     check if done previously
if exist “c:\Program Files\AutoCAD 2010\dllsynch.flg” exit else
goto copy

REM    synchronise dll files from install point
start /wait xcopy /d/e/h/c/y “\\domain\dfs\it\Deployment\ACAD2010_Fixed\AdminImage\x86\acad\en-us\Acad\Program Files\Root” “c:\Program Files\AutoCAD 2010\”

REM    create dllsynch.flg to prevent rerun.
echo done > “c:\Program Files\AutoCAD 2010\dllsynch.flg”


As you can tell I’ve added a bit more into it to synchronise the whole directory. At first it was just the dll files but there was a later issue involving chm and cuix files. No idea why these files don’t make it down to the computer but this seemed to resolve various issues.

New Features Workshop

This was due to missing chm files in the install directory. The script sorted that one out.

Missing acad.chm

This is the help menu which I’m told could be pretty useful and fortunately it’s a simple missing chm file. Thankfully, the script (I’m beginning to think it needs a proper name!) sorted this one out again.

Well, second round of installs is tomorrow so we’ll see how things go. Watch this space as they say. ūüėČ

Posted in IT | Tagged: , , , , , , , , , , | Leave a Comment »

Deploying AutoCAD 2010 via GPO (Part 3)

Posted by graycat on 9 June 2009

or  AutoCAD 2010 and my DLL HELL!

Following on from my previous posts on deploying AutoCAD 2010 via GPO you may will noticed that I’ve run into the dreaded dll issues that sometimes plague these installs. In most cases a rebuild of the initial admin install point of msi is required but that hasn’t worked in this case.

My slightly off the wall but works solution is to synchronise the dll directory in the installation package with the local install directory. Here’s my little script that has a few extra bits in:

REM     check if done previously
if exist “c:\Program Files\AutoCAD 2010\dllsynch.flg” exit else
goto copy

REM    synchronise dll files from install point
xcopy /d/e/h/c/y “\\domain\dfs_share\it\Deployment\ACAD2010Fixed\AdminImage\x86\acad\en-us\Acad\Program Files\Root\*.dll” “c:\Program Files\AutoCAD 2010\”

REM    create dllsynch.flg to prevent rerun.
echo done > “c:\Program Files\AutoCAD 2010\dllsynch.flg”


As you can see that does a quick flag file check then synchronises the dll files in there and creates the flag file so it only does it the once.

Fortunately that seemed to cover most if not all of the dll errors I ran into and at which point the application runs smoothly.

After retesting from scratch on a blank machine, I found the group policy was working and the application was deploying ok but it took two restarts – the intial one to get the gpo and start the install and the second to finish it off.

I’ve tracked this down to the scripted installs of DirectX running after the msi package of AutoCAD 2010 has tried to install. As DirectX isn’t installed by this point, AutoCAD aborts then the DirectX installs. A reboot finishes off the AutoCAD install fine.

Posted in IT | Leave a Comment »

Deploying AutoCAD 2010 via GPO (Part 2)

Posted by graycat on 9 June 2009

Carrying on from my previous post on deploying AutoCAD 2010 via GPO here’s an update with the latest problems and solutions I’ve run into.

AutoCAD LT¬† deploys fine now. I think after the scripted installs had finished doing their thing, it was happy. Since then all the deployments have gone through fine including those on live machines. Now it’s all down to the CAD guys to let me know how it works.

I’ve since rolled up my sleeves and am taking a swing at the bigger one with the full fixed licence install.

The installation package went up to the server / dfs share fine as you would expect but my god it’s huge! 1.4Gb to be slightly more accurate!! Ok, so that is with all the packages included but it’s still a touch large in my opinion. The price of progression and all that.

So post package upload I was looking through it and it claims to have the C++ package embedded so I decided to leave my own package off at this point and see how it rolls. I created the new GPO, security group, wiped the test rig and linked it all together.

Unfortunately it failed.

DirectX – error message¬† saying “must install DirectX first” was he only indicator which was a bit frustrating as DirectX was already installed! A quick test using “dxdiag” confirmed it was there but the install package was just not having it.

Looking into deploying DirectX showed some interesting approaches out there. A quick try of a few and the most reliable one was using the web setup. To do this you need to download the dwebsetup.exe from Microsoft and then setup a nice startup script to actually run the install. Here’s mine:

REM    Check if dxwebsetup.exe exists already
if exist %windir%\system32\DirectX\DXWebSetup.exe exit else

REM     make folder and copy down base installer
md %windir%\system32\DirectX

xcopy /c/y \\domain\dfs\it\deployment\directx\dxwebsetup.exe %windir%\system32\DirectX\

REM     install DirectX
%windir%\system32\DirectX\DXWebSetup.exe /c:”DXwSetup.exe /windowsupdate” /q /r:n


Let that one rip and ……. AutoCAD 2010 installs like a dream!!

Kinda. Well, until you try to run it and then you get an error message stating: “adui18res.dll no found”


Watch out for part 3 when I tackle that particular issue!

Edit: After further testing it seems the script needs to hang on for a bit whilst DirectX finishes the download and install. To make it do this, simply add “start /wait” to the front of the line running dxwebsetup.exe and the PC will launch it as a seperate process and wait until it terminates before moving on.

Posted in IT | Tagged: , , , , | Leave a Comment »

Deploying AutoCAD 2010 via GPO

Posted by graycat on 2 June 2009

If you’re in the engineering or architectural business at all then I’m sure you’ll be familiar with AutoDesk’s AutoCAD offerings. I don’t think I’m wrong in saying it’s probably the most commonly used CAD program around the world. I’ve used a few others here and there but by far the most common is AutoCAD.

So when a new version comes out, you’d think it’s be pretty easy to roll out? You’d be wrong. In fact I don’t think I’ve had a smooth roll out of AutoCAD since the 2007 version. The 2008 had a materials libary with texture files that were longer than 256 characters in length not to mention the .NET problems that seem to have plagues AutoCAD for years.

It was with a slight feeling of anticipation of the challenge and a resigned air of “this is not going to be straight forward at all” that I downloaded the latest version and set about creating the deployment package. Thinking I was being clever, I went for the LT version as a starting point as they are usualy the easiest. Boy was I wrong!

The creating of the initial image is a plain and straightforward as ever – stuff disc in / run package, tell it what you’re doing, point it at the server share and you’re away. For most applications that’s the most difficult bit.

Initial problems were calling out with many “side-by-side” errors in the system log. I kid you not, one of my admins checked this machine looking at a Java rollout we’re doing and just about died of panic! Fortunately he wasn’t holding anything when he fainted so we just left him to get on with it.

These erros are pointing towards a C++ error rather than my expected .NET runtime issue (don’t worry though, they’re in there to!) and a quick google points towards having to install the libaries. Fortunately Microsoft provide a redistributable package for just that …… unfortunately it’s in the form of an exectuable though. There are a bunch of exmples on their websites for deploying this via scripts (ie: xcopy it to the local machine then run the exe with “/q” on the end) so had to suffer it.

The 2005 C++ redist package made no effect what-so-ever and really depressed me. My few living braincells then kicked in with the thought that it’s a brand new app so why not use the latest C++ package (ie: 2008). A quick Google found me not only the package but also a throw away line in a forum saying that it extracts to an msi! Now we’re talking my language! A quick download and double click gets the first install menu whilst a quick search for “*.msi” locates a new msi in a temp directory. Just to be safe, I copied all of this folder up to our deployment share ready to go.

A quick edit of the original GPO to add the 2008 C++ package, restart the test rig and ……. it works!!

well, it gets you to the front page at least. now it’s just a matter of working through the rest of the bugs….. but that’s a job for tomorrow I think.

Posted in IT | Tagged: , , , , | Leave a Comment »

Customising System Properties

Posted by graycat on 30 May 2009

If you build your own PCs for a living or look after corporate ones with standard builds, you may find it interesting or useful to customise the system properties of a machine if only to add a little “corporate identity” and colour.

Here’s how I do it:

The logo – create a new bmp image file 180×114 pixels in size with whatever you want to display. Yes you can use rude pictures, no I don’t think that’s a great idea for work even though it might be funny. Maybe an April Fool idea though ….
Once you’ve got your logo up and running as you like is, copy it to %SYSTEMROOT%\System32. This will be c:\WINNT\system32 in a 2000 machine and c:\windows\system32 in and XP machine.

The writing – open Notepad and create a new text file with the following info:

Model=ICMB 500

[Support Information]
Line1=” ”
Line2=” For general support, upgrades and questions please”
Line3=” log on to the IT Help Desk at:”
Line6=”¬†¬† ¬†¬†¬† ¬†http://Help.Desk.com ¬† ¬†¬†¬†¬† ”
Line9=” For urgent issues contact you local IT admin.”

Obviously customise that to your liking and environment then save as “oeminfo.ini” in the same directory as the logo.

Now when you hit the system properties you’ll have your company logo displayed with the first two lines under [general]. When you click the support information button, you’ll get the rest of the information too (warning: only the first ten lines though).

Neat huh?

Posted in IT | Tagged: , , , | Leave a Comment »

How To Build A Network Boot Disc

Posted by graycat on 16 May 2009

If you’re using a network based system for deploying your corporate images such as Symantec’s Ghost Solution or Suite then you will no doubt be familiar with network boot discs. As a concept they simply load a small operating system into RAM from CD or floppy disc during boot with the sole aim of getting the machine on the network. Usually once they’re actually chatting away on the network happily you then map a drive and run an executable like ghost.exe and have fun from there.
Unfortunately there are limitations with the ones built with ghost etc so here’s my guide on making a super-duper all singing and dancing one. Hopefully this will work with all the network cards on your network but every now and then you run into an awkward one. As a fail safe, I thoroughly recommend you have an Intel Pro network card spare and to hand and use that in a pinch.

Software needed:
1. The bootdisk – http://netbootdisk.com/index.htm
2. Menu editor – http://netbootdisk.com/menuedit.htm
3. Floppy disk to image – http://www.winimage.com/download.htm
4. CD Burner – Nero works but I prefer “CD Burner XP Pro v3” as it’s freeware. I recently tried the latest version and struggle. When I’ve worked it out, I’ll repost.¬†¬†

1. Make the floppy.
2. Edit the setup to suit.
3. Create bootable CD from that.

1. Making the Floppy
– download the latest version from netbootdisk.com and unzip to somewhere on your machine
– format a floppy disc – make the floppy an XP bootable disk (an option on the format menu)
– run the batch file in the unzipped folder
– check it works by test booting a machine with it
2. Edit the default settings to suit
– download the Menu Editor GUI from netbootdisk.com
– launch the executable and make and changes you wish, ie: default username, password, domain etc
– enabling the CD drive at this point is very useful
– save file over existing to update disk
3. Create CD
– create image of floppy disk using WinImage
– insert floppy disk and run WinImage
– select Disc -> Read Disk (make sure a:\ drive is selected first)
– once read has been done, click save and save as a *.ima file.
– run CD Burner XP Pro v3 and select data disk (top option)
– select Disc -> Boot Options
– tick “Make Disc Bootable”
– select the floppy image you’ve just made and hit ok. It might query you to the file type but just ignore it and leave it alone
– hit “burn disc” and burn the CD
– test the CD in a machine and see what it does.

Optional extras– you can copy extra files of applications to the root of the CD before burning. As long as you enable CD in the original menu edit, you’ll be able to access the CD drive as R:\. If you do, you can add such things as ghost.exe or even a whole image to the CD and run the entire imaging session from there.

Posted in IT | Tagged: , , | Leave a Comment »

Dead Servers and Backup Exec

Posted by graycat on 8 May 2009

Sometimes stuff does just go wrong and a machine dies on you. As i said, it just happens. Unfortunately if you’re running Veritas Backup Exec (owned by Symantec now) you might find that it still has the old server in it’s backup jobs.

In this case gets a touch annoying when you have successful backup jobs reporting as failing ….. and that just irritates the hell out of me!

So diving into the backup job to take out the old server and what do you see? Yep, it’s not there! The trick is to not view it in a graphical manner.

When you open the job, go to Selections and then in the right-hand pane, click “View Format” from graphical to text and you’re in business!

A nice little fix for an irritating little problem.

Posted in IT | Tagged: | Leave a Comment »