Ramblings From The Litter Tray of Life

Archive for May, 2008

Tips on making standard corporate PC images

Posted by graycat on 22 May 2008

As with many companies nowadays, we use standardised operating builds for our PC’s and laptops. Due to the size and way we’ve grown this has been taken up in some offices more rapidly than others but we’re making headway. After using the same base process for the last few (four or more I think) years, I thought I’d jot down some notes about how we’ve been doing things and maybe a few tricks I’ve found along the way.

Firstly, lets talk a bit of history. Now the previous method would be to build a standard base image on a clean install of the OS using one of your standard desktops or laptops and then use Ghost and sysprep to copy it onto other machines. The only problem with this is that it’s very specific to the hardware you’ve built it on and indeed drivers have to be declared in the sysprep file. If you’re in a company like mine where things have grown “organically” then standardisation, like documentation actually, is a very dirty word. This basically means that in an office of thirty computers you could quite easily have fifteen different PC hardware if not manufacturer then definitely models. Understandably this could prove tricky to do with one base image and making multiple images just adds to the overhead.

So how do you get round this? A very good and valid question. Thanks for paying attention at the back. 😉

After a lot of research I found a “little” application called Universal Imaging Utility (or UIU for short). Funnily enough, this was written by the guys that created Ghost before selling it on to Norton and then Symantec so they know a little about the cloning process at a guess. You can find their website here if you fancy a look.
Basically this software doesn’t do anything too technical but what it does do, and do incredibly well, is shoehorn in about 15 million drivers! This means that you can make one standard image and apply it to different hardware.

Let me run that one past you again slowly incase you missed it. You can build one image and then apply it to all manner of hardware.

Cool, huh?

So basic kit you’ll need for this: 1 x PC for base image, 1 x Ghost, 1 x network and network boot disk, UIU, some storage space and some coffee. Ok, the last one is for me but you can use the rest.

So the basic principles are like this:

  1. Bare metal install the OS from volume licensed CD’s
  2. Customise OS install to your needs but keeping it as light as possible.
  3. Update and patch as far as humanly possible …. ok, as far as you dare then.</li?
  4. Reboot and use your favourite network boot CD to launch Ghost and take an image off. This is your fall back image so keep it and look after it
  5. Boot back into Windows and run UIU. Just like Dorothy, follow the wizard!
  6. Reboot into ghost and take an image off
  7. Deploy and test …. if it works, you can bask in your godlyness. If not, drink more coffee and get back to work!

That’s about as much as there is to it but as with everything in IT – if it works, it’s easy. If it doesn’t then you could be in for a very long night! 🙂 lol

Anyway, here’s a few tips to go along with that:

  1. Use a dedicated machine. This will make creating base images a lot easier. I would suggest you do the initial install and then ghost off before running UIU or sysprep-ing the machine so if something goes wrong you can always go back to before you messed it up
  2. Don’t use the latest machine but one model back if possible. Third party drivers always lag behind what you can get from the manufacturer. If you’re using UIU then you’re pretty much stuck with their driver pack as you can’t add to it. I will say their support guys are great and will do their best to add in anything you request into the next update. Can’t recommend them enough really.
  3. If you’ve got USB only desktops floating about, use a similar base machine. This one took us a while to try and trouble shoot deploying a PS2 image to a USB only one. We managed it but the easiest way is to start with a USB one as it’ll go onto a PS2 machine just fine.
  4. Keep the base image as light as possible. Tune it by removing all the bits you won’t use and add in the bits you will. In our case we take out IM and outlook express sections amongst other things and add in printing services for unix and a few other choice things. The important thing though is to keep it to just Windows and as little in it as possible. This way if you deploy something like Java or Flash, then you don’t be fighting the base installation.
  5. Change the machine type to “standard PC” after you’ve sysprep’ed the machine but before you take an image. This is a tricky one to find by trial and error but by working with the support guys we managed to find out that this will help on different BIOS’s and hardware types. This gets round a few issues with SATA drives and newer BIOS settings that have caused images to fail.

wow, that’s an epic post! So I think I’ll leave it there for the moment. I’ll probably pick up the details I’ve missed out regarding network bootdisks and troubleshooting image installs.

Advertisements

Posted in IT | Tagged: , , | 1 Comment »

Generating an event log with a batch script

Posted by graycat on 20 May 2008

It’s not something I’ve ever really had to do before but as part of some troubleshooting today I needed to prove a script was not only running but connecting to a remote executable. My plan was to add a local entry into the event log and then echo the username, date and time to a centralised log file alongside the remote executable.

The first part was remarkably easy to achieve! Unbeknownst to me there is an executable under %windir%\system32 called eventcreate.exe …. which does exactly what is says on the tin, namely create an event in the event log. A few switches are all you need to specify event type (error, info, warning), ID number (anything from 1 – 1000) and the information included.

Here’s what I went with:

%windir%\system32\eventcreate.exe /T INFORMATION /ID 666 /D “SCRIPT RAN LOCALLY”

Told you it was easy!

Slapping the username, date and time into the remote log file was just a case of using the following:

echo %username% %date% %time% >> \\remote\log\file.txt

And now hopefully there’s going to be a local event and a remote log file to help me sort this darn issue out!

Only time will tell but I’ll keep in touch.

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

Attack of the Kamakaze Pheasants!

Posted by graycat on 12 May 2008

T’other day I was heading up north on the motorbike just generally enjoying the lovely day and freedom (plus speed of course) that comes from riding a sports bike or indeed any type of motorbike on the public roads. The trip is going well but boring as it is mostly motorways for a good 80% of the 100 mile plus trip and the roads were reasonably clogged with traffic. At least it was all moving, huh?

Anyway, I was riding lazily using the full range of power and revs on the bike as I rolled onto the final motorway session. Another car was entering the motorway was the same time so to make a bit of space I rolled full throttle to move round a car already on the motorway ….. and a thought occurred to me: the motorway is five lanes wide and empty not to mention it is a beautiful day …. so it would be rude not to. So I slid my arse back, hunkered down behind the screen and opened the throttle to the max!!

Oh my god!!! I was expecting fast but Jesus H Christ not that fast! On the flat it was doing over twice the national speed but with a long run ending in a slight decline, the rev counter climbed up and up and up and up and up into the red!! Splitting my attention between the rev counter and the road (with the very occasional glance at the speedo) I bottled out just before the needle hit the rev counter. As the power came off, the speed dropped and the bike settled back my heart rate and indeed whole being seemed to slow down from Star Wars style hyper-speed to mere normal speeds. After that blast to the pinnacle of speed the national speed limit seemed like doing 30 and it was a struggle to keep back down to those speeds. Fortunately five minutes of gentle cruising calmed all my systems down to mortal levels and the rest of the motorway section was completely uneventful.

This wasn’t to last all that long though.

I soon peeled off onto minor a-roads and then onto empty b-roads. These roads I’d driven many times to knew well in a car sense but not in a bike sense so I had a good working knowledge of the route. Using my usual default setting of “even if you know the roads, give it 20% and only ride to what you can see” to keep me in the condition I’ve become accustomed to (ie: alive). So blipping along the empty vaguley twisty bits I it the final straight not even a mile from my destination. A smooth roll on of the throttle out of the bend and I was soon sitting at 90 mph enjoying the wind down from a long but fun ride.

All of a sudden this ninja pheasant rises out of the long grass and like a heat seeking missile wearing a rising sun bandana, a death my care glint in its eye and a death cry on its lips …. it dove at me with intent!

A moment of shock and WTH flitted across my mind as all I had time for other than to duck my head out of the way and …… BAMM!!! Impact. Like being hit with a bag of wet sand. Well wet sand that smells like hell and exploded everywhere!!

There was feathers, there was dust, there was bird crap, there was blood and there was guts. Everywhere. No, seriously I’m talk everywhere! All over my arm and shoulder where it hit. All over my upper leg. All over the whole of the fuel tank. All over me and the bike in general! I found out later I’d even managed to get it on my back under my backpack. How? I just don’t know!

After the exploding bird was a few moments of interesting riding getting the bike under control and doing a quick fit check of all systems. All was good except for the blood and gore that was prevailent all over me …. and my left arm which for some reason had gone all numb with pain and I could no longer feel my fingers. After a moment’s hesitation, I decided to plug on through the last mile to where I was going but had to ride most of it with only one hand on the bars. This made some of the tight turns and slow work tricky round the village where I was forced to use my left arm and literally guess what was going on with my hand and trust it was all still working even if I couldn’t feel it.

I made it to where I was going and stopped.

Peace.

Silence.

Pain.

Receding shock.

What the hell is that smell and where’s the rest of my screen gone??

Anyway, after dismounting and getting the folks I was meeting round it was time for a quick assessment. Other than there being blood, guts n gore all over the place which a quick attack with soapy water and a sponge sorted, the only damage was numb / tingly fingers for a good few hours and a huge chunk missing out of my screen.

I’d consider myself lucky especially as there has been a report of one biker taking a bird to the face, breaking nose and cheek bones before stuffing the bike in a ditch due to pain and sudden blindness brought on by high velocity poultry to the face. Not to mention the one that was reported dead at the scene after head-butting another low flying bird. Personally, I think luck, good kit, darn good reactions all played a part.

End result?

Ninja Pheasant Army 0 – Me 1

Note: drove back along that road on the way out that night and there was not a lot left of the bird. That’s the last time it messes with a biker!! 😉

Posted in Real Life | Leave a Comment »