July 2009


I am normally one of the first to jump aboard and start playing with a new OS. For some reason, however, I have been holding off on running Windows 7. I imagine a big part of it has to with the length of time it took me to get my Vista image right and the fear that I would forget something by reinstalling the OS (I don’t usually do upgrades). I did try the first release of Windows 7 on a VM, but the performance of the PC I used was just abysmal.

Just last weekend I decided to try something I had heard Scott Hansleman mention on show #458 on .Net Rocks. Apparently it is possible to boot off a VHD (virtual hard disk) using the Windows 7 boot loader. What Scott mentioned though is that it is possible to overlay the Windows Vista boot loader with that of Windows 7. There a few hurdles to jump before you can even begin installing, however, as this isn’t as simple as creating a VPC VHD file (which doesn’t natively work)

Note – you will not be able to place the VHD file on a disk that is encrypted by BitLocker or some other encryption sofware. So if you don’t have another partition you might want to look at running DiskPart to shrink the encrypted partition and create a new unencrypted one at least 10 GB long (although I recommend at least 30 GB).

Step 1) First, you have get a copy of the Windows 7 image by downloading it from Microsoft. The file comes in the form on an ISO image and you need a way to get the files out of it. You can either burn the image to a DVD or use a tool that allows you to mount the image onto the file system. I recommend burning the image to DVD, as you will need it later anyway.

Step 2) The next step is the most tedious. You need to locate the boot loader. There are two ways to do this. The “easiest” way is to install Windows 7 somewhere, like a VPC image, and copy the files from the installed copy. If you do this you can skip to step 4.

Step 3) If you are feeling a bit more adventurous you might try to download the Windows 7 AIK (which contains the ImageX command line tool) and the gImageX tool. These two tools will allow you to open the WIM file that holds the boot loader, boot.wim. The boot.wim file is located at \sources on the Windows 7 install disk. In order to use gImageX I recommend you create a new folder called ImageX for the exe. Then I recommend copying the following files from the \Program Files\Windows AIK\Tools\platform folder into the new folder, imagex.exe, wimgapi.dll, winmount.inf, winmount.sys, winmountinstall.exe and wimserv.exe. Once you have done that double click the gImageX.exe file and click the Mount tab. You will need to choose a folder for the mountpoint and use the boot.wim file as the source. Leave the image as “1” and click the Mount button.

Step 4) To get the Windows 7 boot loader files you will need to create a new folder and go to the root of the Windows 7 installation (or mountpoint if you are following the adventurous path). You need to copy the \Windows\Boot\PCAT\bootmgr and the \Windows\System32\bcdedit.exe files to the new folder.

Step 5) Modifying the Windows Vista boot loader while Vista is running proves to be a difficult task, so the files need to be placed in some accessible place on the Vista machine you plan to install Windows 7 on. Make note where you copied these files as it will be important later. If you have disk encryption (e.g. BitLocker) running you will need to turn it off at this point in order to make modifications to the boot loader.

Step 6) Now you need to place the Windows 7 installation DVD (I told you would need it later) into your Windows Vista PC and reboot. You may have to go into your BIOS settings to ensure your PC can boot from a CD ROM, but you should see the Windows 7 installer come up.

Step 7) Click the next button on the intro screen and then choose “Repair your computer”. Then choose “Restore your computer using a system image that you created earlier” and click Next.  Windows may or may not find an image, but either way you need to click Cancel until you see a “System Recovery Options” window. At this point you will want to choose “Command Prompt”.

Step 8) At this point you will need to locate the boot loader files you copied earlier, in step 5. You will need to copy them over the existing files on the Vista OS drive. The driver letters at this command prompt are possibly different than the ones you usually see in Windows Vista, so you may need to look for the drive that has a Windows directory in it by using the “cd” (change directory) and “dir” (directory listing) commands. You will want to copy the bootmgr file to the \Windows\Boot\PCAT\ folder and the bcdedit.exe file to the \Windows\System32\ folder.

Okay now the boot loader is in place so you just need to prep a VHD file and start the install…

Step 9) I recommend creating the vhd file in a new folder on the partition you want the file to be stored(remember it cannot be BitLocker encrypted) . You can do this by executing a “mkdir” (Make Directory) command and then navigating to that folder using “dir”.  Type the following command set into the command line:

diskpart
create vdisk file=YourDriveLetter\YourPath\win7.vhd maximum=30270 type=expandable
attach disk
exit
exit

Step 10) Close the “System Recovery Options” window by clicking the [X] (DO NOT click the shutdown or restart buttons). Click “Install Now” and then select the newly create disk which show as a disk with unallocated space.

Step 11) After Windows 7 installs you should see a new boot menu on load that allows you to run Windows 7 (off a VHD with full hardware support) and one for Windows Vista.

Don’t forget to turn disk encryption (e.g. BitLocker) back on in your Windows Vista OS if you temporarily disabled it.

Copyright © Scott P. Rudy 2009 All Rights Reserved
Advertisements

I have been using Vonage for several years now and they offer features like forwarding, voice mail transcribing and unlimited calling from within the US and to several countries for a competitive price. Yet there are a few features, like SMS forwarding, that have never been incorporated into the service. Tonight I finally received my invite to Google Voice and I think the marriage of the two makes for unified communications as it should be with no additional cost beyond my already present Vonage service.

Many companies license and run Microsoft Exchange Server and Microsoft Office Communication Server which have the ability to do everything Google Mail, Voice and Talk can. I am not sure if this is a bandwidth issue or just a general cost issue, but very often those companies turn off those features that would make lives for their employees so much easier. It amazes me that Google is able to provide these services to the general public, for free (provided you can live with the targeted ads)!
Many employees travel frequently and sometimes are in places where cell phone coverage just isn’t that good. Being able to add a forwarding number with a few clicks of a mouse is a convenience that needs to be there. Let us not forget the many folks who are now working from home and are “required” to provide their own home networks, phone lines and mobile devices out of pocket. Then add in the fact that many folks have endured multiple income, health benefit and retirement reductions in the past year. Any cheaper alternative to paid long distance is a welcome perk.

Okay, so where I am going with all this. It has been well known that Google “uses” the content in email to render targeted ads. I can only imagine they will be doing something similar with voicemail transcriptions. The one concern that must be realized is that Google Voice will take over as your voice mail provider when you use their number. Anyone can realize that there “could” be potential security implications here if you have insider information being spouted out onto your voicemail. However, when employees have to pay for their own communication networks do corporations have the right to govern the activity? I am very curious to see how this technology will disrupt the status quo of communications in the corporate world.

Copyright © Scott P. Rudy 2009 All Rights Reserved

I am currently involved in a project that uses ASP.NET. The project is on its second implementation. During the first implementation the environment was controlled by the project team and they chose to turn on persistent sessions for the load balancers. This allowed the system to store session data in memory for the application.

Now the project is being rolled out for a new client where the environment is no longer controlled by the team. The client has specified that a central session server must be used so that the load balancers can be used without persistant sessions, as a recommended best practice by the vendor, F5 Networks.

I was tasked to assess the readiness of the product to be placed in this environment. After changing the web.config file to point to the new session server I immediately started seeing problems with pages not loading correctly. The problem was I couldn’t debug the issue because the .Net Framework was doing the work and I didn’t have source code or PDB files for the libraries. I guessed the issue dealt with serialization since objects that cannot be serialized will not go across the wire to the session server. So I took the first page the application hits and placed the following code into the Page_Load event handler (wrapped by a try…catch, of course):

IFormatter formatter = new BinaryFormatter();
using (System.IO.Stream stream = new System.IO.FileStream(
    "C:\\Users\\rudyscot\\desktop\\userstate.bin",
    System.IO.FileMode.Create, System.IO.FileAccess.Write,
    System.IO.FileShare.None))
{
    formatter.Serialize(stream, Session);
    stream.Flush();
    stream.Close();
}

Any issues with the serialization will throw an exception, so I was able to see what the issues were by looking at the Message property of the caught Exception. All of the issues turned out to be what I was expecting. They were all classes not marked with a Serialization attribute. Unfortunately, one of the objects turned out to be a .Net framework object though, so code changes needed to occur to move the needed properties of that control to an object that could be serialized.

Copyright © Scott P. Rudy 2009 All Rights Reserved