Creating a Bootable VHD using Windows 7

November 22, 2009 johnblanton Leave a comment

This tutorial was created using Windows 7 Ultimate X64. If you’re using 32bit/X86 Windows 7 Ultimate or Enterprise, the command line commands are still valid, save for where you need to look for imagex.exe. That will be explained shortly.

First off, let me explain what a VHD is. A VHD, or virtual hard disk in this case, is a file that works within the operating system as if it were a native magnetic hard disk. They’re used for true virtualization, using software like VMware Workstation or VirtualBox. Put more simply, it’s a file container. For the purposes of this tutorial, however , the VHD that you create will allow you to boot into it as if it were an actual hard disk. Pretty cool eh? So let’s get this started.

Native VHD Boot using Windows 7 only works using either the Ultimate or Enterprise SKU’s

First things first, you’ll need to download and install Windows Automated Installation Kit. You can download it from the following link. http://www.microsoft.com/downloads/details.aspx?FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34&displaylang=en .

It’s an ISO or disk image format. It’s close to 2GB’s in size, so you’ll either need to burn it to dvd, or use a program such as Magic Disc, which works in both X86 and X64 Windows 7. It’s a virtual optical drive program that makes Windows think a physical optical drive is installed where there isn’t one, basically. You can use that to mount the Windows 7 Automated Installation Kit ISO, copy the files to your hard drive and install the Windows 7 AIK from there.

Also, after the installation is complete, make sure that you copy imagex.exe from the W.A.I.K folder to C:\windows\system32. This file will either be located in C:\Program Files\Windows AIK\Tools\amd64 folder if you’re using 64bit Win7 and in x86 folder in the same directory if you’re using 32bit Win7. This will help keep commands used later in this tutorial to a more manageable length.

Next you’ll need to copy install.wim from your Win7 installation dvd. That’s located in X:\GRMCULXFRER_EN_DVD\sources. In 32bit/x86 Windows 7 install.wim will be located in the same location on your installation dvd. (replace X:\ with the drive letter you need) It will also be helpful if you create a subfolder on the root of the hard drive and use it to store your VHD file and install.wim file for the purposes of this tutorial. When all this is complete, you won’t be able to boot to your VHD file if you move it to another folder, so wherever you create it on your hard disk, it will need to stay there. When you’re done with it, you can delete it.

Type cmd in start menu search right click shortcut and choose Run as Administrator

at command prompt type diskpart then enter

DISKPART> create vdisk file=(put your path where you want your vhd to be located here such as d:\vhd\win7vhdboot.vhd for example)maximum=25000 (this will set your vhd to a fixed size of 25GB) type=fixed (this will not allow your vhd file to exceed 25GB’s in size.)

A driver labelled “Microsoft VHD HBA” will install as part of the vhd creation process. After the vhd is created make sure it’s located where you designated using the “create vdisk file=” command.

DISKPART> sel vdisk file=(use the path from the previous command that you used to create the vdisk)

DISKPART> attach vdisk

DISKPART> list disk (At this point, you should see a list of all your drives currently installed in your system. The VHD you just created will be listed as the HIGHEST number in that list.)

DISKPART> create part primary (this sets a single partition using the full size of the vhd)

DISKPART> sel part 1 (selects the partition you just created)

DISKPART> active (sets the partition you just selected as the active partition)

DISKPART> format fs=ntfs quick (quick formatting is ok to use since we’re basically formatting a file container and not an actual hard drive)

DISKPART> assign (at this point you should get an autoplay window should you still have autoplay enabled. If not, then check Computer in Windows Explorer to ensure that the VHD was mounted and a drive letter assigned to it.)

We’re finished with diskpart now onto ImageX!

C:\Windows\system32> imagex /info (the path to your install.wim file goes here) you’ll need to get the index nbr for either Win7 Ultimate or Enterprise since those are the only 2 versions of Win7 native vhd boot will work)

C:\Windows\system32> imagex /apply (path to install.wim goes here) /check (this validates your install.wim) 4 (this is the index # for Win7 Ultimate on my install dvd so double check and make sure you select the correct index nbr by running the previous command again if needed) G:\ (or whatever letter your vhd was assigned in the creation process)

Look in Computer in Windows Explorer to ensure that the imagex application was successful. You should see the following folders….

PerfLogs

Program Files

Users

Windows

Don’t worry about C:\Program Files (x86), all that will be setup when you boot your VHD for the 1st time.

C:\Windows\system32> diskpart

DISKPART> sel vdisk file=(path to vhd file goes here)

DISKPART> detach vdisk (You’ll need to detach the vdisk before you can boot to it)

DISKPART> exit

C:\Windows\system32> bcdedit

This is a listing of all current entries for your bootloader. Extreme care needs to be taken at this point and all instructions need to be followed to the letter. If you happen to make a mistake, I hope you’ve got your system recovery cd/dvd handy because you’ll need it. You should see one entry with the identifier of {current} and {bootmgr}, the {bootmgr} section is information for the actual bootloader, there won’t be any need to mess with that but you’ll need to copy {current} with the following command….

C:\Windows\system32> bcdedit /copy {current} /d “your description of choice goes here”

C:\Windows system32> bcdedit (you have to run bcdedit again to get the GUID for your copied bootloader entry..you’ll need it now.

C:\Windows\system32> bcdedit /set (this is where the GUID item marked as identifier goes from the 3rd entry in the list) device vhd=[C:]\(path to vhd goes here..if you need to change the [C:] to whatever drive letter you have your vhd file residing on)

C:\Windows\system32> bcdedit /set (identifer goes here) osdevice vhd=(path to vhd goes here)

C:\Windows\system32> bcdedit /set (identifier goes here) detecthal on

C:\Windows\system32 bcdedit /set (identifier goes here) description “Win7 VHD Boot” (or whatever you’d like to enter here)

Ok you’re all done. Only 2 caveats, you won’t be able to use either Bitlocker on the VHD or the Hibernate power function. These are the only 2 limitations to using the VHD boot scenario. It’s not best for mobile computers (i.e laptops). It is safe to directly boot into it. However, if you’re wanting to capture the OS in the VHD file for use in production machines, you’ll first need to sysprep and generalize the VHD file to prep it for image capture. The how-to’s for that are located at the following link.

http://technet.microsoft.com/en-us/library/cc748933(WS.10).aspx

This tutorial is for informational purposes only, if you do not follow these instructions to the letter and your system won’t boot into Windows, I’m not responsible.

Categories: blog posts

PC Hardware Moment of The Day for 11-08-2009

November 8, 2009 johnblanton Leave a comment

I’ve been reading a lot of reviews on AMD’s new Phenom II X4 965 Black Edition. It’s 3.4Ghz and quad core. It also has an unlocked multiplier. (makes it easier to overclock) It costs 200$ us, however if you want a comparable cpu from Intel, look to spend upwards of 800$ more! That’s right over a grand at most retailers!! The cpu’s that the X4 965 is being compared to is the Core i7 from Intel mostly. The i7 is a quad core cpu with a feature called HyperTheading. It makes Windows think it’s running on an 8 core cpu even though it’s only a quad core cpu. All the reviews I’ve read on the AMD X4 965 BE, the Core i7’s included in the review are being run without disabling HyperThreading in bios, so in a sense while it’s good to show what the X4 965 BE can do against the competition in a head to head comparison, the reviews are invalid because without disabling hyperthreading all the benchmark results are and will always be skewed in Intel’s favor. Yes it’s true that the Core i7 uses triple channel DDR3, and AMD is still using dual channel. Where AMD comes out ahead is that even with an AM3 socket cpu from AMD on a AM2+ motherboard, you can use either DDR2 or DDR3. So you’re not necessarily stuck having to buy new ram just to upgrade your cpu. (not to mention a cpu upgrade is cheaper that way!) Now, the EU is still going after Intel on charges of bribery and collusion in keeping AMD out of competiting markets. So much for thinking Intel would actually stand on the performance of their products as AMD has from the start. It also doesn’t help that there aren’t any closed (non open source) benchmarks to keep Intel (and AMD to keep this fair) from “optimizing” their products, because the public, by and large, equate high benchmark scores to real world performance and that couldn’t be further from the truth. Benchmarks should be used to test system stability only.

Categories: blog posts Tags: , , , ,

How to use RSS for Windows 7 Themes

October 23, 2009 johnblanton 1 comment

I’ve been running Windows 7 Ultimate for about a week now. I received my copy in my Windows 7 Party Pack. I must say I’m even more impressed with the new operating system from Microsoft, then I was during the beta and RC days. However I was wondering if it was possible to use pictures in an RSS feed as theme/desktop background wallpaper. As it turns out it is possible and here’s how you do it.

[[Theme]
DisplayName=Bing 

[Slideshow]
Interval=1800000
Shuffle=1
RssFeed=http://feeds.feedburner.com/bingimages (or insert any valid rss feed with picture attachments here)

[Control Panel\Desktop]
TileWallpaper=0
WallpaperStyle=0
Pattern= 

[Control Panel\Cursors]
AppStarting=%SystemRoot%\cursors\aero_working.ani
Arrow=%SystemRoot%\cursors\aero_arrow.cur
Crosshair=
Hand=%SystemRoot%\cursors\aero_link.cur
Help=%SystemRoot%\cursors\aero_helpsel.cur
IBeam=
No=%SystemRoot%\cursors\aero_unavail.cur
NWPen=%SystemRoot%\cursors\aero_pen.cur
SizeAll=%SystemRoot%\cursors\aero_move.cur
SizeNESW=%SystemRoot%\cursors\aero_nesw.cur
SizeNS=%SystemRoot%\cursors\aero_ns.cur
SizeNWSE=%SystemRoot%\cursors\aero_nwse.cur
SizeWE=%SystemRoot%\cursors\aero_ew.cur
UpArrow=%SystemRoot%\cursors\aero_up.cur
Wait=%SystemRoot%\cursors\aero_busy.ani
DefaultValue=Windows Aero
Link= 

[VisualStyles]
Path=%SystemRoot%\resources\themes\Aero\Aero.msstyles
ColorStyle=NormalColor
Size=NormalSize
ColorizationColor=0X6B74B8FC
Transparency=1 

[MasterThemeSelector]
MTSM=DABJDKT

Copy and paste the above into a text document, then save it as “Bing.theme”. Open it and select “Download all attachments” and enjoy. :)

Categories: blog posts

iTunes 9

September 9, 2009 johnblanton Leave a comment

Today during Steve Jobs’ keynote address, iTunes 9 was officially released. The browser window can be positioned in either it’s traditional spot above your track list, or on the left side. I joked on twitter about how this makes all my multi album playlists obsolete. A lot of people with very large libraries, might not find it useful and use the search field instead. I’ve never had issue with it since I started search in iTunes a few versions ago. The iTunes Store has been revamped and the look is much cleaner and much easier to navigate. While I personally never had a problem finding music or video to purchase in the iTunes Store, the new layout makes it even easier. Song previews are played via a play button you’ll see when you mouseover a track. You also have the option to view the iTunes Store in the full program window, which allows the user to get the most out of the new layout. It is a bit harder to find the weekly free tracks, but it’s easy to understand that. Also, in iTunes 9, you get iTunes LP which are albums with artwork, and iTunes Extras. This particular feature gives you DVD style extras and I can’t wait to check that out. All in all, I really like the new version of iTunes, with it’s new value add features such as iTunes LP and iTunes Extras. It’s definitely a good thing to see Apple giving it’s customers more reasons to hang around.

Categories: blog posts Tags: , ,

Why I want to start a business…

September 4, 2009 johnblanton Leave a comment

I’ve been repairing and building computers for the better part of 10 years. It’s become a worthwhile hobby and lots of fun, albeit expensive. Starting all the way back from Windows 95 and all the way up to Vista. I’ve dealt with it all. These days, I see so many people without work, hungry families looking for a handout. Now I have no problems helping someone, but a hand-up is and will always be better then a handout. I want to be able to share what I’ve learned over the years so I can train others and help them to be self sufficient. I want to be able to turn my hobby into a lucrative living for myself, fanily and eventually employees. There is no point in going into business if you don’t want to make any money for yourself. What’s so wrong with making money and being successful? People say that money is the root of all evil, well I think that’s being taken too literally. What’s so wrong with the succesful entrepreneur giving good paying jobs to help people be their own? Nothing. I already have a Twitter account setup for customer service and pre sales info… http://www.twitter.com/wolfsbane_pc. I won’t charge a single cent to answer a question sent in to the aforementioned twitter account.  Then again how could I? All in all, Wolfsbane Computing is going to be where you want to go. There is a lot I have left to do before I get this endeavor off the ground, but I’m really excited with what I want to bring to the computer OEM industry and to my hometown of Memphis Tennessee. You can follow me on twitter at http://www.twitter.com/john_blanton. Please direct all tech questions to http://www.twitter.com/wolfsbane_pc. Thanks and I hope to build your next pc for you soon.