Full Story: How Windows 7 Messed Up My System and How Windows Home Server Saved the Day

I’ve had a number of people ask about the two posts I made to Twitter (and this blog) yesterday. So here’s the story.

I’d heard a lot of good things about the new Windows 7 Beta operating system. I’d read a number of posts about how easy it is to dual-boot a Windows 7 installation along side a Windows XP or Vista installation.

My computer has 2 Windows XP installations: one that I use for everyday computing and one that basically exists only for those rare occasions when the main installation won’t boot for whatever reason (I’ve used the second installation 2 or 3 times in the last 5 years. It’s handy to have around). I figured a Windows 7 installation would be just as useful a as second installation for recovery. So I decided to install Windows 7 on the hard disk partition that contained my second Windows XP installation.

So I started up the Windows 7 installation, found the partition that contained the second Windows XP installation, re-formatted it, and installed Windows 7. Piece of cake, worked like a charm. Poked around in Windows 7 for awhile, overall a pretty cool operating system. Then I started thinking about rebooting into Windows XP (my primary computing environment). Started looking around to check that Windows 7 had set itself up with an entry to boot “Previous Version of Windows” as all the blog posts had told me it would.

It hadn’t. In fact it wasn’t even aware that the hard drive containing my Windows XP installation even existed.

Then it hit me. My XP installation is on a RAID 0 volume. Windows 7 didn’t have the drivers, so it didn’t find the drive, didn’t see the existing XP installation, and didn’t set up dual-boot automatically. Fortunately Windows 7 was able to recognize the older RAID drivers, and I was able to get it to find the RAID volume. Now I just had to get the boot loader set up. Well, I can tell you one of the things about Windows 7 that isn’t that great the tool for managing the boot loader bcdedit.exe. I tried a couple of times to get a working boot record going, but ultimately had to give up.

How was I going to get back into my Windows XP installation, where ALL my files are located? Fortunately I have a Windows Home Server that backup all the PCs on my home network every night. I was able to pop the Restore CD into my PC, and rebooted into the recovery console. At first it didn’t find my network card, or my RAID volume, but all I had to do was put the network and RAID drivers on a USB drive and hit the “Scan” button. It takes a minute or two and scans the USB drive, finds the drivers and enabled the network card and RAID volume.

It then connects to the Windows Home Server, prompts you to pick which volumes you wish to restore and from which backup. I choose my D: drive (my second Windows XP installation) and let it do it’s thing. In about 20 minutes my D: drive was back to the state it was in at 2:30 am that morning. Boot loader and all.

So, in the end it wasn’t necessarily Windows 7 that messed things up. But it was Windows Home Server that saved me in the end.

In about 20 minutes.

My Current Thoughts on the OC Transpo Bus Strike

The union is doing what it has to do. They are being asked to give up certain benefits (i.e. the ability to control their scheduling). From the union’s perspective it’s a dangerous precedent if they start giving stuff up so they HAVE to hold their ground.

The problem I think is that the majority of Ottawa residents (myself included) believe that the drivers don’t deserve to have control of the scheduling (in part because, true or false, we hear that they abuse it). The residents who most want this strike settled at any cost are those who are suffering the most because of it. Therefore the union needs as many people as possible suffering, so that the strike gets settled at any cost, most likely in the union’s favour. That is why the union had to strike just before Christmas, in the dead of winter. Maximum pain = union’s best chances of getting/keeping what it wants.

The union and drivers are prepared to see this through, because we’ve heard them say that they banked up their overtime in the summer (presumably by abusing their scheduling privileges) so they can afford to keep fighting.

For highlights of their last contract, Google “oc transpo collective agreement” (should be the first result, a PDF).

Their starting salary is more than what mine would be if I was starting out today. They start earning 6 weeks of vacation 4 years before I will. The most senior drivers will get 7 weeks, which isn’t even possible for me. They have just as many paid holidays as I do.

I’m a federal civil servant working in the Information Technology (IT) field, for goodness sakes. I thought I had one of the cushiest jobs in the world, but apparently OC Transpo bus drivers do.

I am in my early 30s and don’t have a drivers license. I’ve lived in Ottawa all my life, and my reasoning has always been that I don’t need a license because we had an awesome bus system. I’ve defended the bus system.

I’m beginning to change my mind.

I’ll either be getting my drivers license soon, or leaving Ottawa.

Seriously.

Defining Access Strategy in FluentNHibernate

I am posting this because it took me a little while (longer than it should have) to figure out how to define the access strategy for an domain object’s fields or properties. The documentation for FluentNHibernate is still fairly basic, and Googling for the answer didn’t get me anywhere. In the end I figured it out from Visual Studio’s intellisense (which frankly is where I should have looked in the first place).

For all those like me who decide to Google first, here is the answer.

A number of the *Part classes in the FluentNHibernate.Mapping namespace implement the IAccessStrategy(Of ComponentPart(Of T)) interface. This interface defines one property, Access which returns an AccessStrategyBuilder(Of T) object. The AccessStrategyBuilder object has a number of methods used to define the access strategy:

  • AsCamelCaseField
  • AsField
  • AsLowerCaseField
  • AsPascalCaseField
  • AsProperty
  • AsReadOnlyPropertyThroughCamelCaseField
  • AsReadOnlyPropertyThroughLowerCaseField
  • AsReadOnlyPropertyThroughPascalCaseField

This information I found relatively quickly. What I was missing was how to specify that my camel case fields are prefixed with the underscore character. But all of the CamelCase, LowerCase and PascalCase variations of the methods listed above have an overload which accepts an instance of a Prefix object, of which there are 4 variations:

  • m
  • mUnderscore
  • None
  • Underscore

So in the end, my mapping is as follows:

WithTable("client")

Id(Function(c) c.ID, "id").WithUnsavedValue(0).GeneratedBy.Identity()

Map(Function(c) c.AccountName).TheColumnNameIs("account_name")
Map(Function(c) c.Company).TheColumnNameIs("company")
Map(Function(c) c.Created).TheColumnNameIs("created")
Map(Function(c) c.Updated).TheColumnNameIs("updated")
Map(Function(c) c.UseAdministrativeContactAsBillingContact).TheColumnNameIs("blg_is_adm")

Component(Of Client)(Function(c) c.AdministrativeContact, _
                     AddressOf MapAdministrativeContact).Access.AsCamelCaseField(Prefix.Underscore)
Component(Of Client)(Function(c) c.BillingContact, _
                     AddressOf MapBillingContact).Access.AsCamelCaseField(Prefix.Underscore)