Wednesday 2 March 2011

Transferring Windows 7 installation to new hardware

I purchased a new computer, and needed to transfer the Windows 7 installation from the old laptop to the new. I didn't want to bother reinstalling all the applications, although having done this once I'm not sure it was quicker overall!

However, it was a good dry run for my disaster recovery scenario. I always backup my main laptop as a system image, but never thought to see what would happen if I had to restore this to a different computer in the event of the laptop being stolen.

Here's how I did it:

1. On the old computer, created a System Image backup using Windows Backup (to a network folder)
2. Created a Windows recovery disk
3. Use the recovery disk on the new computer to restore the backup.
4. And... the system wouldn't boot.

The System Repair function then ran, trying to repair the installation, but ended up reporting that no problems it could fix were found.

The system appeared to be blue-screening, but I couldn't see the message as it restarted too quickly to see!

Using F8, I was able to select the option for "Disable Automatic Restart", and see that the problem was STOP 0000007B - INACCESSIBLE_BOOT_DEVICE.

After some research, I came across this thread:
http://www.minasi.com/forum/topic.asp?TOPIC_ID=31980

The problem was caused by Windows loading the wrong disk driver.
When Windows 7 boots, it loads all drivers that are listed in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ with a Start value of 0

If the driver for your hard disk isn't in this list, then it cannot access your disk to boot from it, and error 7B is the result.

The hard disk driver names are as follows:

Aliide
Amdide
Atapi
Cmdide
iaStorV
intelide
msahci
pciide
viaide

The Start value should either be 0 (load at boot time) or 3 (don't load at boot time, or indeed ever?)

In my case, I had to install a second copy of Windows onto the new computer, to find out what the correct value of the Start parameter was for each of these. With hindsight I would have written down these values before scrubbing the old install.

Now I had these values, I was able to edit the registry in the restored installation, and alter them to match the second copy.

To do this:

In System Repair, choose the Advanced option.
Go to the Command Prompt.
Run REGEDIT
Click on HKEY_LOCAL_MACHINE
Choose Load Hive from the menu
Load the SYSTEM hive from c:\windows\system32\config (or wherever your failing Windows installation is)
Change the Start values from 0 to 3 or vice versa to match the working installation.
Exit REGEDIT

Reboot.

In my case, I had to set INTELIDE to 3 and MSAHCI to 0, once I did this, the system booted correctly.

Friday 22 May 2009

Flat Rate VAT Calculator

If you are registered with the Government's Flat Rate VAT Scheme, you'll find that though they make it very easy to calculate how much VAT you owe (a percentage of your gross turnover), actually filling in your VAT return is a pain.

You have to calculate an "imaginary purchase amount", which is how much you would have had to have spent on VAT-able purchases to be able to reclaim an equivalent amount of VAT to reduce your VAT bill to the figure you worked out in the first place (phew!)

So what they give with one hand they take away with another.

However, I have made a spreadsheet to make the process simple. I hope you "find it useful".

Flat Rate VAT Calculator.xls