Archive for the ‘IT’ Category

Could not load file or assembly ‘Microsoft.Office.Interop.Word

Saturday, February 4th, 2012

Someone at work wrote a .NET add-in for MS Word 2007 but when the test user tried to install it he got the following output in a dialogue window.


Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Office.Interop.Word, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
   at Microsoft.VisualStudio.Tools.Office.Word.Internal.IWordHostItemProviderProxy..ctor(IHostItemProviderExtendedContract hostItemProvider)
   at Microsoft.VisualStudio.Tools.Office.Word.Internal.IWordHostItemProviderProxy.GetProxy(IHostItemProviderExtendedContract contract)
   at Microsoft.VisualStudio.Tools.Office.Word.Internal.LocalWordServiceProvider.GetService(Type serviceType)
   at Microsoft.VisualStudio.Tools.Applications.Internal.LocalServiceProvider.System.IServiceProvider.GetService(Type serviceType)
   at Microsoft.VisualStudio.Tools.Office.EntryPointComponentBase.Microsoft.VisualStudio.Tools.Applications.Runtime.IEntryPoint.Initialize(IServiceProvider hostContext)
   at Microsoft.VisualStudio.Tools.Applications.AddInAdapter.ExecutePhase(ExecutionPhases executionPhases)
   at Microsoft.VisualStudio.Tools.Office.Internal.OfficeAddInAdapter.InitializeEntryPointsHelper()

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3625 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Runtime.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Runtime.v9.0.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3624 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.AddIn
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.AddIn/3.5.0.0__b77a5c561934e089/System.AddIn.dll
----------------------------------------
System.AddIn.Contract
    Assembly Version: 2.0.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.AddIn.Contract/2.0.0.0__b03f5f7f11d50a3a/System.AddIn.Contract.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Hosting.v9.0.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Deployment
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Deployment/2.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.ServerDocument.v9.0.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3623 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Contract.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Contract.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Contract.v9.0.dll
----------------------------------------
Microsoft.Office.Tools.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.v9.0.dll
----------------------------------------
TemplateDragDrop
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/ian.rees/Local%20Settings/Apps/2.0/4VOQMJE5.Z0K/VN2BE36X.AMJ/temp..vsto_cf3a11357a4f8903_0001.0000_a8fd7b1b77cdebc4/TemplateDragDrop.DLL
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Word.AddInAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Word.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Word.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.Office.Tools.Common.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Common.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.AddInAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Contract.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Contract.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Contract.v9.0.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 2.0.50727.3625 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_32/mscorlib/2.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Adapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Word.HostAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Word.HostAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Word.HostAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.HostAdapter.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.HostAdapter.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.HostAdapter.v9.0.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Office.Word.AddInProxy.v9.0
    Assembly Version: 9.0.0.0
    Win32 Version: 9.0.30729.1
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Office.Word.AddInProxy.v9.0/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Office.Word.AddInProxy.v9.0.dll
----------------------------------------

A few people examined the msg and the determined (kind of correctly) that a file must be missing. They then attempted repairing MS Office, and dragging various files to various locations.

By the time it got to me, a lot of options had been exhausted. Here’s a tip for this sort of thing:

If you are going to run .NET inside MS office, you will need to have the .NET Programmability Support installed for the application in question.

The screen shot below shows the option for Word, but there are also separate options for Excel and PowerPoint etc. etc.

This sort of thing also holds true under Linux systems when compiling applications instead of using pre-prepared packages. If you are trying to compile Apache with SSL and it’s failing at the SSL step, do have have SSL and it’s libraries installed ? Using pre-prepared packages deals with any missing dependencies (normally) so you don’t have to think about this stuff.

Part P Regulation For IT ?…….

Friday, February 3rd, 2012

I read an article last year by Steve Cassidy on PC Pro. The article was a light humoured piece about an argument he got into with an electrician over wi-fi. The electrician was clearly ignorant or misinformed about the subject matter, but this didn’t stop him spouting off about it.

In his article, Steve mentioned about Part P, an IET regulation that controls who can do electrical wiring. While I don’t really care too much about this, comments made later in the article struck home.

if you are a “computer person”. We are one of the last great self-taught professions, and from that many difficulties follow. Assuming that everyone is equally able to teach themselves

I confess to being pretty much self taught myself. I can’t recall the last time a company paid for me to go on a training course, and I feel awkward at interviews asking for it. I don’t want them to get the idea I’m unable to do the job, or am only in it to get some free training out of them.

But without an IT equivalent of Part P, how to we tell those who are truely smart enough to self learn and can do the job from those who cannot ?

Does the industry need some sort mandatory regulation and qualifications enforcing to make sure companies do no fail owing to hire those less competent self taught among us ? Or as Steve puts it

I’m trying to be polite and it might not work in my current mood, so I’ll settle for blunt: thick people think differently from nerds.

Certification goes some way to addressing this issue, but I have met self confessed people who simply have excellent short term memory and exam cram enough material to scrape a pass but have no actual hands on skills to back the qualification. I consider these people dangerous. They can install you into the IT equivalent of a cul-de-sac that you end up spending a lot of money for someone else to come in and undo and redo.

I sat a few exams myself, but I would have to say the questions I was asked bore little resemblance to actual real word IT (with the exception of the fundamentals covered, TCP/IP subnetting for example). Should IT exams contain real world scenarios that while there could be more than one solution to solve, have a clearly preferred one that has far better merits over the others ? This could perhaps weed out the ‘ok’ or ‘get by’ techs from the true ‘been there done that and this is the correct way to go’ types.

The whole article is well worth a read and certainly food for thought.

Read more: Why you shouldn’t let builders anywhere near your Wi-Fi | PC Pro blog

p.s. and while we’re at it I think the UK should follow the USA and require those working in real estate to be qualified and regulated. while I have never had the misfortune to have to deal with an estate agent for a house purchase, the horror stories I have heard make we want to avoid buying a house for ever.

Using Nagios NRPE To Monitor Windows Services Via WMI Part 2…….

Friday, September 30th, 2011

Have realised my first attempt at using NRPE to monitor Windows services via WMI is in fact badly thought out and badly done. This is what happens when companies want everything yesterday and rush things :o(

Having thought about it, the following has come to mind:

The service string to check should not be hard coded into the script. Otherwise we would need x1 script per service to check (i.e. lots !). The service string should be a variable that we can pass to the script as an argument at run time.

And, we can only check one service at a time with this script. Therefore, placing the service name into an array is whaaaayyy overkill. Will simply replace the array with a single string variable.

This in mind, here’s the revised version of the check script

strComputer = "."
'list services to monitor, comma seperated, inside quotes
strService = Wscript.Arguments.Item(0)
'connect using standard monkier
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
'get an array containing all services
Set objItems = objWMIService.ExecQuery ("Select * from Win32_Service")
'for each service compare it’s display name to the current one we are looking for
For each objService in ObjItems
	'if we get a service display name match
	If objService.DisplayName = strService Then
		'display the current service along with it’s current state
		'wscript.echo "service name = " & objService.DisplayName & " currently :: " & objService.State
		If objService.State = "Running" Then
		'If the service is running return exit code 0 = ok
			Wscript.Echo "SERVICE STATUS: OK"
			Wscript.Quit(0)
		Else
		'otherwise return non 0 = error = fire alert hopefully
			Wscript.Echo "SERVICE STATUS: Critical"
			Wscript.Quit(2)
		End if
	End if
Next

And the command to add to the nrpe.cfg file will now need a parameter adding to the end like so (note the quote marks “” around the $ARG1$ parameter. This is in case our variable has spaces in it !!).

command[check_windows_service]=cscript.exe //T:30 //NoLogo "C:\Program Files (x86)\NRPE_NT\libexec\check_windows_service.vbs" "$ARG1$"

The command.cfg file will need a command definition in it like this

# 'check_windows_service' command definition (using NRPE)
define command{
	command_name	check_windows_service
	command_line	$USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -p 5666 -c check_windows_service -a $ARG1$
}

And finally, in services.cfg, a service check section using the command, like this

define service{
        service_description     Check Windows Awesome Service
        servicegroups           cust-windows
        host_name               windows_server_1
        check_command           check_windows_service!"Some Windows Service"
        use                     generic-service
}

But we can now use the same script to check other services like this

define service{
        service_description     Check Windows Awesome Service
        servicegroups           cust-windows
        host_name               windows_server_1
        check_command           check_windows_service!"Some Windows Service"
        use                     generic-service
}

define service{
        service_description     Check Windows Spooler Service
        servicegroups           cust-windows
        host_name               windows_server_1
        check_command           check_windows_service!"Print Spooler"
        use                     generic-service
}

Second time’s a charm. At least I got to go back and correct my horrible (but technically working) mistake !

Next stop, monitoring for running processes by their executable name in the process list…….

doh !

Using Nagios NRPE To Monitor Windows Services Via WMI…….

Wednesday, September 28th, 2011

If you are setting up Nagios from scratch, install the NSClient++ agent on your Windows servers and get the increased flexibility that it offers. My predecessor at my current work place has only installed the NRPE addon (the same guy who installed the core datacentre router with a duplex mismatch….that made my first week fun), which means I can’t use much of the cool check_nt stuff to monitor services and processes :o(

I needed a way to tell if a service had stopped on Windows server, but I could only use NRPE. First stop, a script to check the status of a given service.


strComputer = "."
'list services to monitor, comma seperated, inside quotes
arrServices = Array("Awesome Service")
For each strService in arrServices
	'connect using standard monkier
	Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
	'get an array containing all services
	Set objItems = objWMIService.ExecQuery ("Select * from Win32_Service")
	'for each service compare it’s display name to the current one we are looking for
	For each objService in ObjItems
		'if we get a service display name match
		If objService.DisplayName = strService Then
			'display the current service along with it’s current state
			'wscript.echo "service name = " & objService.DisplayName & " currently :: " & objService.State
			If objService.State = "Running" Then
			'If the service is running say so
				Wscript.Echo "SERVICE running"
			Else
			'otherwise it must not be runing
				Wscript.Echo "SERVICE not running"
			End if
		End if
	Next
Next

This script binds to WMI, searches for a service called Awesome Service and then echoes a statement to say if it’s running or not. Perfect, but Nagios can’t use this quite yet. We need the script to send some data back to the NRPE engine for this to work.

The Nagios plug-in dev guide tells you most of what you need to know, in this case we need to pass return codes back, which is covered here.

So the finished version now looks like this


strComputer = "."
'list services to monitor, comma seperated, inside quotes
arrServices = Array("Awesome Service")
For each strService in arrServices
	'connect using standard monkier
	Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
	'get an array containing all services
	Set objItems = objWMIService.ExecQuery ("Select * from Win32_Service")
	'for each service compare it’s display name to the current one we are looking for
	For each objService in ObjItems
		'if we get a service display name match
		If objService.DisplayName = strService Then
			'display the current service along with it’s current state
			'wscript.echo "service name = " & objService.DisplayName & " currently :: " & objService.State
			If objService.State = "Running" Then
			'If the service is running return exit code 0 = ok
				Wscript.Echo "SERVICE STATUS: OK"
				Wscript.Quit(0)
			Else
			'otherwise return non 0 = error = fire alert hopefully
				Wscript.Echo "SERVICE STATUS: Critical"
				Wscript.Quit(2)
			End if
		End if
	Next
Next

So if the service is running, we exit with return code 0 Wscript.Quit(0). But if it’s not, we exit with a non 0 return code. I need an alert to fire an SMS, so I have used Wscript.Quit(2) for critical, but if you only want a warning you can use Wscript.Quit(1).

Save the file in the NRPE scripts location (mine are located at C:\Program Files\NRPE_NT\libexec\

Final piece of the puzzle is to add the actual command to run the script to the NRPE config file. Mine is located at ‘C:\Program Files\NRPE_NT\bin\nrpe.cfg’, but your may vary.

At the end of the file are a list of demo commands, we just need to add in


command[check_awesome_service]=cscript.exe //T:30 //NoLogo "C:\Program Files\NRPE_NT\libexec\check_awesome_service.vbs"

Now add a command definition to the Nagios commands.cfg


# 'check_awesome_service' command definition (using nrpe)
define command{
        command_name    check_galaxy_service
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -p 5666 -c check_awesome_service
        }

And finally in my Nagios services.cfg file an service definition that includes the command and the hosts to run this against


define service{
        host_name               windows_server_1
        service_description     Windows Awesome Service
        servicegroups           cust-windows
        check_command           check_awesome_service
        use                     generic-service
}

And that should be it. You need to restart Nagios to include the new commands and service definitions. And then test the monitor by stopping and the starting the service in question.

The next step would be to replace the service name in the .vbs script file with a variable. Then you can reuse the same script to monitor different services by passing the service name from Nagios to NRPE as a variable from the config file. :oD

Apache Header Byte Range DoS Exploit…….

Saturday, September 3rd, 2011

Grrrrr, looks like there’s an unpatched exploit in *all* versions of Apache web server.

Is to do with using header byte ranges which allow http responses to be broken into smaller chunks before sending. You can read about them here and here.

There are multiple workarounds for mitigating the issue that can be read here and here.

And as of 30th August, version 2.2.20 of Apache was released which has mitigation built in (If the sum of all ranges in a request is larger than the original file, ignore the ranges and send the complete file.)

Guess what I’m going to be doing all next week ? :-/…….

QNAP Data Recovery Hell…….

Wednesday, May 11th, 2011

It’s never goes easily does it ?!

Somehow, I had managed to almost fill my 1TB drives in my x2 bay QNAP NAS. Owing to my being paranoid about my data, I choose to mirror a pair of x1TB drives for 1TB total storage, rather the create a 2TB spanned volume using both of them.

I was down to a couple of hundred MB of free space, time to take action. I ordered a couple of shiny new Seagate 2TB drives online with the intention of going from a pair of mirrored 1TB drive to a pair of mirrored 2TB drives.

My plan was to removed one drive from the mirror set, and one of the new 2TB drives, wait for it to rebuild, and then replace the second drive and allow a subsequent rebuild to take place. Did not go according to plan :o(

I removed one of the 1TB disks, and then to ensure the 2TB disk would stand a greater chance of working, I upgraded the firmware (dumb dumb dumb !). I then installed one of the new 2TB disks.

The NAS did indeed rebuild/re-mirror with the new drive, but it created a 1TB volume on the 2TB disk. Not entirely unexpected, but not quite what I wanted :o(

Now I needed to get all the data off of the existing NAS 1TB disk onto something else, install both the new 2TB disks, create an empty 2TB volume, mirror it, and re-copy the data back onto the new larger volume. I attempted to connect one of the original 1TB disks to a Windows desktop machine with a SATA converter cabe/kit, and to mount the file system to copy the data off. And here’s where I hit real problems.

I could see the top level folder structure on the disk, but nothing below it ! :o( The QNAP version of EXT4 is a custom patched version that it seems can only be read by their chassis running their firmware. Fair enough, intellectual property and all that, but this was making my life a mite difficult now.

I tried putting the original drive back into the chassis and booting it to copy the files off over the network, but the new firmware update seemed not to like this, it booted ok, but the actual file server part did not kick in, I couldn’t see the device on the LAN to map a drive to.

In the end I had to ssh to the NAS device itself and use the Samba services to run a CIFS mount to my Windows desktop. I then spent several glorious days moving the files off folder by folder till I had them all. Then I put both new 2TB disks in, did a factory reset (including down grading the firmware as it seemed a little….buggy).

Once the device booted up and presented itself as a shiny new empty 2TB NAS, I began the unenviable task of copying all my crap back over…….several more lost days. Moral of the story for me would be:

a) don’t upgrade drivers/firmware for the sake of it
b) when dealing with a *lot* of data, *copy* and then delete, do not use move. even if a 20 stone psycho has a knife pressed to your throat

Ironically as I write this, my 2TB is being eaten into at a rate of knots. Am probably gonna have to buy a bigger NAS. Have my eye on one of these full to the brim with 3TB disks.

possibly all the storage I could need.......?

Default Windows 7 Partitioning Brakes WDS Imaging…….Kinda…….

Thursday, December 23rd, 2010

Another little Windows 7 nugget.

While installing Windows 7, I noticed that during the section for setting up the disk, some stuff was going on that I didn’t ask for (didn’t realise it at the time, took some trial and error to figure it out).

When you configure Windows 7 installation, the graphical section for configuring the disk will automatically create a 100MB primary partition for Bit Locker to use at a later stage. No matter what I did, I could not stop the GUI from doing this.

So I pressed on and agreed to the installation with the 100MB partition at the begining of the disk and the rest of the disk as a another primary partition.

Windows installs the *boot* files into the 100MB partition, and everything else into the second larger partition !

As I have mentioned before, I don’t think I am using WDS and imaging as Microsoft intended, but I essentially create a machine exactly how I want it and then sysprep and capture it using imagex. I can then reapply the image to another system of have it on the desktop in approx. 10-15mins all ready for use.

But this dual partition configuration breaks this. I believe to do it this way I would have to perform x2 sets of imagex capture and deploys :o( Not going to happen.

To get around this, I have to prepare the disk partitioning up front. The GUI disk section of the install will not alter the disk if it is already partitioned. I booted using a WINPE boot disk used ‘diskpart.exe /s ‘ and pass the following in a txt file as an argument

select disk 0
clean
create partition primary id=07
select partition 1
format fs=ntfs quick nowait
assign letter=c
active

This causes diskpart to select the first disk, wipe it clean and then create a primary partition using the whole disk, mark it as active and assign it drive letter C:

With the disk prepared in this way, I can now install Windows 7 (skipping over the GUI section of disk partitioning) and the boot files will be on the same partition as the system files. This can then be caught in a single image capture to .wim file which, when I then apply back to machines via WDS they will boot correctly.

Not sure of the implications this has should you then want to use Bitlocker at some later stage. Meh ! I don’t care, I don’t use Bitlocker right now :o)

Hope someone else finds this useful :o)

Support FizzBin, Shorten Support Calls…….

Tuesday, March 23rd, 2010

After spending most of the morning on the phone with Dell technical support *to replace a faulty DVD drive still under warranty* I find myself whole heartedly behind Scott Hanselman’s ‘FizzBin’ initative.

I actually slipped ‘FizzBin’ into the conversation a few times randomly in the first half hour to see if we could get to the ‘I’ll send a replacement unit out to your now sir’ phase, but alas it fell onto deaf ears (or certainly ears not briefed on the ‘FizzBin’ keyword initative’).

This left me repeating the mantra ‘ The optical drive is broken and needs replacing’ to every question and test I was asked to perform until their will finally broke and they promised to send an engineer out with a replacement drive.

So come on people, get behind ‘FizzBin’ coz’ I really don’t think I can handle another one of those calls again !

Microsoft IT Curriculum Path

Friday, March 19th, 2010

Just found this skills learning map while on Microsoft’s website for a book to assist me in studying for the Windows 7 exam 70-680.

Nice concept, it certainly breaks down the steps involved in getting into IT (from a Microsoft point on view anyway).

Unfortunately, most of the people I know would fail before they have even hit the first fork in the trail, ‘Digitaly Aware Individual’. Given how much we have come to depend and trust in computers and technology, I sometimes find it a bit alarming how little some people know about how PC and their software work.

Modern systems are admittedly much more reliable than the ones of a decade ago, but when I first started out with PC’s and software, everyone knew about backups. These days I ask people about how they are safe guarding all their data that is ‘irreplaceable’ and they shrug their shoulders and look confused and mutter ‘it’s stored on the computer somewhere’.

I possibly am a little extreme about this sort of thing. I know exactly where my data is, and I have backups of my backups (well, certainly optical disc burns of the really irreplaceable stuff, photos of events past, my library of system administration scripts that I so painstaking have amassed over the years, archived email conversations that I like to look back on from time to time). But, given that anyone you ask will tell you their data is essential to their plives and completly irreplaceable, you would think they would invest a little time into researching how best to make sure it does not all end in tears later down the line.

Anyone can drive a car, the act of driving is not the hard part. The lessons and the reading, the written exam, the highway code and the actual driving test itself merely allow you to drive the car (simple) without posing a danger to yourself or to others (the more difficult part).

In the same way you are not allowed to drive a car without first passsing a test, maybe there should perhaps a mandatory training course that you must attend before being allowed to purchase a PC that covers the basics enough so that you can pull away from the curb without loosing your entire baby picture libarary and wedding day mpeg collection and winding up a teary eyed wreck at your local branch of PC World.