Installing windows 7 inside a VHD


 

To install Windows 7 inside a VHD you need at least 20GB free disk space. For now the installation is only supported on internal disks, so no external USB drives yet. In the following procedure we are going to install Windows 7 inside a 20GB VHD which we create in the directory c:\vhd. If you have an existing fixed size VHD (for example one created with Hyper-V Manager) you can use that one and skip step 05.

01 boot from Windows 7 DVD or USB
02 Shift-F10 for a command prompt
03 dir C: (of D: E: etc.) to see where your VHD-directory has gone
04 diskpart
05 create vdisk file=c:\vhd\win7.vhd type=fixed maximum=20000
06 select vdisk file=c:\vhd\win7.vhd
07 attach vdisk
08 exit
09 setup
10 install Windows 7 on the new 20GB Unallocated Space (ignore the warning)

After the installation there will be a new boot entry created where the system default will boot from. Start a command prompt with Administrator credentials and type bcdedit /v to see the newly created entry:

As you can see the two entries ‘device’ and ‘osdevice’ don’t reference a partition (e.g. with Windows Vista), but a physical file somewhere on your computer. The funny thing is when you are booted inside this installation you can look for this file with Windows Explorer; this is somewhat strange to understand when looking at it. Something else that changes is the location of the pagefile; it can’t exist within a VHD so Windows will automatically select another location for it.

Create differencing VHD

A differencing VHD is a disk that only saves the differences compared to his parent. This way you can quickly and easily test something without modifying your current installation. Currently Microsoft only supports placing both the parent and the differencing disk on the same volume, but this might change in the future. Parent disks are only used for read only operations while differencing disks perform more write operations, I can imagine placing them on separate disk subsystems optimized for read or write operations.

You can only create a differencing VHD when the parent you want to create a differencing disk from is not in use at that moment (so you can’t be booted inside your parent VHD). Following procedure again makes use of the boot functionality of the Windows 7 DVD, but you can also use a separate Windows Server 2008 installation and use Hyper-V Manager from there to create a differencing VHD. You don’t have to specify a size; this is specified by the parent.

01 boot from Windows 7 DVD or USB
02 Shift-F10 for a command prompt
03 dir C: (or D: E: etc.) to see where your VHD-directory has gone
04 diskpart
05 create vdisk file=c:\vhd\win7-diff.vhd parent=c:\vhd\win7.vhd
06 exit

99 No need to reboot right now, you can continue the next procedure at step 03

Now a differencing VHD is created with the previous Windows 7 installation as parent. The initial size of the differencing VHD will be very small, but this will grow during usage. When booted from within this differencing VHD and looking at it from within Windows Explorer you will see it’s size is the same as that from the parent. When you look at the VHD from another Operating System you will the normal size again.

Create additional boot entry

To be able to boot from previous differencing VHD you have to add an additional boot entry. You can do this from within a working Window 7 installation or again after booting from the Windows 7 DVD. The following steps can be done immediately after creating the differencing VHD.

01 boot from Windows 7 DVD or USB
02 Shift-F10 for a command prompt
03 bcdedit /v
04 bcdedit /copy {identifier-of-Windows7} /d “Windows 7 diff”
05 bcdedit /v
06 bcdedit /set {identifier-of-Windows7-diff} device vhd=[locate]\VHD\Win7-diff.vhd
07 bcdedit /set {identifier-of-Windows7-diff} osdevice vhd=[locate]\VHD\Win7-diff.vhd
08 bcdedit /v

In step 03 you have to look for the entry of Windows 7, you can Copy and Paste this identifier and use it in step 04. In step 04 the entry “Windows 7” will be copied to a new entry named “Windows 7 diff”. In step 05 you have to look for the new entry “Windows 7 diff” and Copy & Paste the identifier in step 06 and 07. In step 06 and 07 the correct parameters for ‘device’ and ‘osdevice’ will be filled in. Check the newly created “Windows 7 diff” entry with bcdedit /v

Take care of above notation, because there are some inconsistencies with the entry that is used for a normal VHD. With a normal VHD ‘device’ uses the notation device file= and with a differencing VHD we have to use device vhd=. With a normal VHD a drive letter is used, with a differencing VHD the word locate is used. A drive letter should have worked here also, but I did not manage to get that to work.

I don’t know if above inconsistencies are in fact well over thought choices by Microsoft, but I have the feeling that this is because of using beta software. With bcdedit /? /formats you get a little more information but it doesn’t give an explanation about the difference between the formats. I tried many other combinations but above screenshot is the only one found 100% working.

Merge differencing VHD

If you tried something out in a differencing VHD and you are satisfied with the result then you can merge this information in the parent VHD. You might have created a long differencing VHD chain, you can specify the depth to which you want to merge.

01 boot from Windows 7 DVD or USB
02 Shift-F10 for a command prompt
03 dir C: (or D: E: etc.) to see where your VHD-directory has gone
04 diskpart
05 select vdisk file=c:\vhd\win7-diff.vhd depth=2
06 merge vdisk depth=1
07 exit

In step 05 you have to select the differencing VHD with a depth greater than or equal to the depth of step 06. In this example we merge one level back.

Delete above experiments

Are you ready testing and do you want to get rid of the obsolete boot entries? Start a command prompt with Administrator credentials and delete them with bcdedit /delete {identifier-of-entry-to-be-deleted} Delete the physical VHD file(s) from your hard drive and everything is gone without leaving a trace.



Install windows 7 from USB stick


If you wish to install Windows 7 from a USB stick, here is how its done:

Insert your USB stick in the computer
Start a CMD promtp

write

  1. Diskpart
  2. List disk (your USB stick is probably disk 1)
  3. Select disk 1
  4. clean
  5. create partition primary
  6. active
  7. format fs=fat32 quick
  8. assign (assigns a drive letter to the disk, so you can complete step 9)
  9. Now copy all content from your windows 7 DVD to the USB stick, and you are ready to boot from the stick

Easy…



Now Microsoft Certified


Take screenshot of your HTC Magic


Before you start, make sure you have the latest Android SDK on your computer, you can get it here

Extract the SDK files to a local folder

On your Magic enable USB debugging, go to: Menu -> Settings -> Applications -> Development -> USB Debugging

ok here we go:

  1. Connect your magic to your computer with USB
  2. If this is the first time you connect your phone to your computer, install the USB drivers from SDK (./tools/usb_driver/x86/)
  3. Go to the SDK tools folder, start ddms.bat (Dalvig Debug Monitor)
  4. In the Debug program, select your phone and go to: Device -> Screen capture(or just press ctrl+s) and select Save

ddms

Click save

magicss



missing Hal.dll error after deploying windows XP with WDS


if you get the following error when booting after deploying Windows XP with Windows Deployment Service:

Windows don’t boot because the file <Root Windows>\system32\hal.dll is missing

Please re-install a copy file.

Your problem is probably that windows is trying to boot from the wrong partition, there is two solutions to this problem, either you change the boot.ini in the WDS image to fit the computer, or you change the number of partitions on the computer to fit the WDS image.

ex. some new Dell computers comes with a hidden 40Mb partition that the computer is seeing as multi(0)disk(0)rdisk(0)partition(1), and that is what its trying to boot from, so you can change the boot.ini in the WDS .wim image to multi(0)disk(0)rdisk(0)partition(2) or whatever partition number that fits your setup, and now your computer should boot up without getting hal.dll error

Or you can make your target computers number of partitions fit the source computer, that would work aswell.

 

If you chose to edit the boot.ini in you WDS image, here is how its done: (make sure you have windows AIK installed)

  • Export your Install Image from Windows Deployment Service to ex. F:\Distribution\Operating Systems\BuildName\installimage.wim
  • Mount your image with Imagex ( default path c:\program files\windows AIK\tools\x86\)from a DOS prompt:  imagex /mountrw F:\Distribution\Operating Systems\BuildName\installimage.wim 1 C:\Mounted-Images
  • now you can browse your image and edit your files in the folder C:\Mounted-Images
  • When you are done, close and save the image again:  imagex /unmount /commit c:\Mounted-Images
  • Import the edited image to WDS again, and try to Deploy to your target computer again.

 

 



Exchange 2007 winmail.dat problem


When you send an e-mail from Outlook 2007 through a Exchange 2007 server, you are by default sending in Rich Text format, witch is a microsoft format that some mail servers (Lotus Notes) don’t understand. The result is that any attachments to your mail is gone and replaced with a winmail.dat file instead.

The solution is to make Exchange NOT send in Rich text format, here is how it’s done:

  • Open Exchange Management Console
  • Expand Organization Configuration
  • Hub Transport
  • Edit the default properties
  • Under Exchange Rich-text format, select Never use.

Problem solved….



3Connect update


If you get this error when trying to start your 3Connect “Fatal error, Wilog.exe will terminate”, it means that the program is installed but you need to install an update to 3Connect

Get the update from 3 here: https://tre.dms-hosted.birdstep.com/tre

Link to 3 support http://privat.3.dk/Kundeservice/Hjalp-til-mobilt-bredband/Fejlsoegning/3Connect/



hostel.is


If you are going to Iceland, and are looking for hostels I can recommend Hostel.is they have a Car-rental packages which is very much cheaper than renting a car one place and booking hostels another place.We got a nice brand new Mazda 5 with automatic gearbox, and a lot of room for all our bags, we picked it up at Keflavik airport at around 2.00am (in the middle of the night) and got our hostel vouchers at the same counter, all in all we are very satisfied with hostel.is, and can recommend using them if you want a cheap holiday in Iceland.



Fotos from Iceland August 2008