Deploy a WinPE 2.0 image using PXE and the WAIK#
This post is a follow-up to my previous post on Installing Vista on your Toshiba M200. It does not stand on its own, so please go read that post first to get some background. I've received more hits and questions about that post than any other. Unfortunately, I am neither a Vista, WinPE, PXE, WAIK, nor BCDEDIT expert. I copied the commands from the Microsoft documentation, then did a bunch of trial-and-error troubleshooting because of the errors in that documentation, and was lucky enough to get it to work. I documented the corrections I made in my article so that others could overcome the problems, and skip the trial-and-error step. But apparently, my instructions weren't much better, people didn't follow them close enough, or some other environmental issue is interfering. Since I cannot possibly give one-on-one support for everyone struggling through this process, I figured a second stab at documenting my steps might be helpful. This time, instead of documenting where to alter the Microsoft instructions, I just document each step exactly as I performed them - mostly copied verbatim from the WAIK User's Guide. The most commonly reported error people are seeing is:
File: \boot\BCD
Status: 0xc0000022
Info: An error occured while attempting to read the boot configuration data

That means people had trouble with the BCDEDIT steps, which is not surprising, since that is the part of the documentation with the most mistakes.

So here are the command-line commands as I entered them, to create a working PXE boot with a valid BCD file. My instructions involve a technician computer running WinXP, which also serves as my TFTP server using tftpd32.exe. I also use VirtualPC on the technician computer to run WinPE 2.0 (see the previous article on how to create this VirtualPC). Step 1 and Step 2 correspond the the steps in the WAIK User's Guide article mentioned in the previous post.

Step 1 - Run these commands from the XP technician computer. My TFTP server is installed at c:\apps\tftpboot. Make sure you substitute the appropriate path for your environment.

Click Start, point to Programs, point to Windows AIK, and then click Windows PE Tools Command Prompt

Enter the following commands at the command prompt. Each bulleted item is a single command and should be typed on one line (even if it wraps to a new line in your web browser).

  • copype x86  c:\winpe_x86
  • imagex /mountrw c:\winpe_x86\winpe.wim 1 c:\winpe_x86\mount

Your command prompt should now have been changed to c:\winpe_x86

  • md c:\apps\tftpboot\boot
  • copy c:\winpe_x86\mount\Windows\Boot\PXE\*.* c:\Apps\tftpboot\boot
  • copy "c:\Program Files\Windows AIK\Tools\PETools\x86\boot\boot.sdi" c:\apps\tftpboot\boot
  • copy c:\winpe_x86\winpe.wim c:\Apps\tftpboot\boot

Step 2 - Run these commands from your Vista / WinPE 2.0 VirtualPC computer. After booting WinPE 2.0, you will automatically be presented with a command prompt. If runnning on Vista, open a command prompt.

  • bcdedit -createstore c:\BCD
  • bcdedit -store c:\BCD -create {ramdiskoptions} /d "Ramdisk options"
  • bcdedit -store c:\BCD -set {ramdiskoptions} ramdisksdidevice  boot
  • bcdedit -store c:\BCD -set {ramdiskoptions} ramdisksdipath  \boot\boot.sdi
  • bcdedit -store c:\BCD -create /d "MyWinPE Boot Image" /application osloader

This last command will respond with a message like:
"The entry {02836f40-9ea0-11db-af23-0003ffc3f7f5} was successfully created."

The GUID WILL BE DIFFERENT FOR YOU. The GUID is the long series of numbers, letters, and dashes enclosed in braces {}. Do not copy the GUID used in my commands below. You must substitute the GUID returned by the previous command.
The following commands use MY GUID. Make sure you change it to yours.

  • bcdedit -store c:\BCD -set {02836f40-9ea0-11db-af23-0003ffc3f7f5} systemroot \Windows
  • bcdedit -store c:\BCD -set {02836f40-9ea0-11db-af23-0003ffc3f7f5} detecthal Yes

In the previous command, the setting is DETECTHAL in all lowercase. It is not DETECTHA1 - numeral one at the end.

  • bcdedit -store c:\BCD -set {02836f40-9ea0-11db-af23-0003ffc3f7f5} winpe Yes
  • bcdedit -store c:\BCD -set {02836f40-9ea0-11db-af23-0003ffc3f7f5} osdevice ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
  • bcdedit -store c:\BCD -set {02836f40-9ea0-11db-af23-0003ffc3f7f5} device ramdisk=[boot]\Boot\WinPE.wim,{ramdiskoptions}
  • bcdedit -store c:\BCD -create {bootmgr} /d "Windows VISTA BootManager"
  • bcdedit -store c:\BCD -set {bootmgr} timeout 30
  • bcdedit -store c:\BCD -set {bootmgr} displayorder {02836f40-9ea0-11db-af23-0003ffc3f7f5}

Step 3 - Now I will copy the  files created on my WinPE 2.0 VirtualPC to my TFTP server (my technician computer). These steps may be different, depending on your setup.
Run the following commands from the Vista/WinPE 2.0 computer. Substitute the values in ALL CAPS with values for your environment.
TFTPCOMPUTER is the name of your computer running the tftp server.
SHARE is the name of a shared folder on your tftp server.
VALIDUSER is the name of a user on the TFTPCOMPUTER that has write access to SHARE.

net use y: \\TFTPCOMPUTER\SHARE
when prompted for a username, I enter: TFTPCOMPUTER\VALIDUSER
When prompted for a password, I enter the password for VALIDUSER

When the command completes, I now have the Y: drive mapped to my server (technician computer). I run the following command from the WinPE 2.0 VirtualPC:
copy c:\BCD y:\tftpboot\boot

(My share maps to the parent folder - c:\apps - of my tftp server software, which is installed at c:\apps\tftpboot)

I then started tftpd32.exe from c:\apps\tftpboot on my technician/tftp server. I went to the "DHCP server" tab and changed the "Boot file" to: boot\pxeboot.com

I then started the tablet, hit F12, selected network boot, then pressed F12 again to confirm boot from the network. Windows PE booted on the tablet.

Hope this helps.
Sunday, January 07, 2007 3:38:20 PM (Central Standard Time, UTC-06:00) #    Comments [36]  | 

 

Installing Vista on your Toshiba M200#

I wanted to install Windows Vista on my Toshiba M200 TabletPC. However, I have no optical or floppy drive, making it difficult to install a new OS the usual way (boot from CD or install boot disk). These instructions should apply to anyone that has a computer without an optical drive. You will need a second computer running Windows to act as your "technician computer". This is the machine where you will do most of the work. Throughout this guide I will refer to the two computers you are working with as the "technician computer" and the "target computer". The two computers must be on the same network.

The Easy Way

If you meet all of the following requirements, the process is much simpler:

  • Your target computer (in my case, the M200) is already running an older version of Windows
  • You do not need to re-partition or re-format your hard drive. You are okay with letting Vista just create a new Windows folder (renaming your current Windows folder to Windows.old), and keeping the rest of your hard drive in tact.

If that fits your situation, follow these instructions:

  1. If you have a Vista DVD, and a DVD drive on your technician computer, put the DVD in the drive. If you have an .ISO image of the Vista DVD, mount the .ISO using a program like VirtualCD or Nero ImageDrive.
  2. Use Windows Explorer to share the drive with your network (right-click, Sharing and Security, Share this drive).
  3. Boot into the existing Windows on the target computer. Map a drive to the share on the technician computer (Windows Explorer, Tools menu, Map Network Drive). Map drive Y: to \\othercomputer\sharename
  4. On the target computer, run setup.exe from the network drive (Y:\setup.exe).

The Vista installation will begin. The only limitation is that you cannot re-format the hard drive on the target computer. It says you need to boot from the installation media if you want to change the target hard drive. Since we don't have a CD\DVD drive, things get more complicated. If you are like me and wanted to start from a clean slate - and have a lot more time to spare ;) - read on. Otherwise, enjoy your new Vista computer.

The Hard Way

If you insist on reformatting your hard drive, you will need to boot the target computer using network PXE.

What you will need

Setup your PXE server

Setting up a PXE server using Windows XP (and probably other flavors of Windows - I only tried XP) is surprisingly simple. Just follow the instructions (up through step 13) from PXE Booting your M200 to DOS using a Windows Server. Before proceeding with the Vista install, I highly recommend following all of the steps on that page to boot your computer to DOS. This will verify that you can successfully deliver a PXE boot image to your target computer. Also, I advise you to use the msnet bootdisk image as mentioned in the article so that you can verify connectivity to the rest of your network. You will want to make sure that you can connect to a share on your technician computer from your target computer (currently running DOS). One part I stumbled on is that DOS does not let you provide a username\password when connecting to a share with "NET USE". You need to use the "Logon" feature when the network is first configured at boot. Use a valid username\password that exists on the technician computer. Now when you map a share with NET USE, it will pass those credentials and grant you access.

UPDATE: Some TFTPD32 users are reporting that they need to make sure the "PXE compatibility" option is selected to get the process to work. Thanks to Jonathan Payan for the suggestion. It worked successfully for me without enabling that option, but if you are having trouble, it is worth trying.

Unfortunately, you cannot run the Vista install from DOS. If that were the case, you would simply have to share a folder (or drive) on your technician computer containing the Vista install, map a drive to it from the target computer, and run setup.exe. Instead, invoking Vista's setup.exe will give you an error message that it cannot run from DOS.

Running Windows PE 2.0

The solution is to boot your target computer into Windows PE 2.0, which is the Vista equivalent of a DOS boot disk (with MUCH more capabilities). You cannot download Windows PE 2.0 (that I know of), so you need to create your own PE image using the Windows Automated Installation Kit (WAIK). Download the image at that link, rename the .img file to .iso, and either mount it using VirtualCD, some other ISO disk mounter, or burn it to a CD. Once you can read the disk image, run the setup to install WAIK on your technician computer.

Unfortunately, one of the steps to create a version of Windows PE 2.0 that can be booted from the network must be performed on a computer already running Windows Vista (or PE 2.0). If you have access to such a machine, you can skip ahead to "Creating a Windows PE 2.0 PXE Installation". Otherwise, use the following steps to get a minimalist Windows PE 2.0 up and running:

  1. Download and install Microsoft Virtual PC 2004. Create a new virtual machine with 512MB RAM. The hard drive size does not matter, as it will not be used.
  2. On your technician computer (with WAIK installed), run the "Windows PE Tools Command Prompt" from your start menu.
  3. Enter the following commands:
copype x86 c:\winpe
oscdimg -n -bc:\winpe\etfsboot.com c:\winpe\ISO c:\winpe\winpe.iso

You now have a bootable Windows PE 2.0 CD ISO image. Start your new virtual machine, choose "Capture ISO image" from the CD menu, and select the c:\winpe\winpe.iso that you just created. It will boot into Windows PE 2.0, which you can use to run BCEDIT in Step 2 of the next section.

Creating a Windows PE 2.0 PXE Installation

UPDATE: Apparently this mix between the Microsoft documentation and my documentation has confused a number of people, and they are ending up with invalid BCD files. I have written a new post that explicitly shows the commands I entered. Hopefully this will help clarify which steps people are doing incorrectly. After following the steps in Deploy a WinPE 2.0 image using PXE and the WAIK, you can jump back here and continue with the steps in "Running the Install".

Open the "Windows Automated Installation Kit User's Guide" help file that has been added to your start menu. Find the article "Walkthrough: Deploy an Image by using PXE" (switch to the Index tab, type PXE, and select the first article). Follow each of the steps in that article, with the following modifications/clarifications:

Step 1 - 4: You do not need to map a drive to your TFPT directory, since it is on your local system (it is the tftpboot folder created in step 2 of the M200 article mentioned above). Any time the WAIK article refers to Y:\, just substitute your tftpboot folder.

Step 1 - 5: The first command (cd \temp\Windows\Boot\PXE) seems to be an extraneous typo. Ignore it. Just proceed with the command to copy the files from the boot\pxe folder.

Step 2 - *: These are the steps that you need to run from your other Vista computer, or the Windows PE Virtual Machine. Not being familiar with the BCDEDIT syntax, these instructions confused me a bit. When I read the commands with braces in them (ex: {ramdiskoptions}), I thought I needed to substitute my appropriate values. Of course, not knowing what I was doing, I had no idea what values to substitute, so was a little stumped. It finally dawned on me that they weren't telling me to substitute my own values - they wanted me to literally type those characters: {ramdiskoptions}. Apparently, in BCDedit, you create nodes with names specified with braces.

Step 2 - 3: I skipped this step, as it is optional, and I wont be attaching a debugger during boot.

Step 2 - 4: Now, I just told you that when you see braces, you should enter it literally and not substitute a different value. Except for this step ;). For these commands, wherever you see {guid1}, you should substitute the guid (with surrounding braces) that was returned from the first command in 2-4. The command prompt copy/paste feature comes in really handy here (I wouldn't recommend hand typing the guid repeatedly - if you get it wrong, who knows what will happen).

Step 2 - 5: If you skipped the optional step 2-3 (as I did), you can ignore the "/inherit {dbgsettings}" at the end of the first line. Also, the last line has a typo - they forgot to include the name of the node you are editing. It should look like this:

Bcdedit -store c:\BCD -set {bootmgr} displayorder {guid1} (where {guid1} should be replaced with your own guid, as previously mentioned)

Step 2 - 6: You need to copy the BCD file you just created to the tftpboot\boot folder on your technician computer. One way is to share the tftpboot\boot folder, give write permissions to a user, map a drive to that share from your Vista/PE virtual machine, and copy the BCD file to the mapped drive.

Step 2 - 7: You do not need WDSNBP.COM. Instead, you can have your PXE server provide PXEBOOT.COM. Start tftpd32.exe and click on the DHCP tab. Change the "Boot file" from "pxelinux.0" (assuming you followed the instructions to boot to DOS) to "boot\pxeboot.com" (assuming you followed the instructions to copy the Vista PXE files to a boot subfolder).

Running the Install

Finally, boot your target computer using PXE. Now, instead of downloading and running the DOS boot disk, it should download and run pxeboot.com. Press F12 when prompted to boot from the network. Your target computer should now boot into Windows PE.

1) If you haven't yet, you need to create a share on your technician computer that contains the Vista installation media. You can copy the files from a DVD to local folder and share the folder, or just share your DVD drive like I did.

2) From the target computer (running Windows PE), map a drive to your new share:

NET USE y: \\servername\sharename

When prompted, provide a username\password that is valid on the technician computer.

3) Run Y:\setup.exe to begin the Vista installation. You can safely turn off your PXE server (tftpd32.exe).

Improving the M200 Vista Experience

When my Vista installation completed on my M200, it only had a standard VGA driver. I downloaded and installed the NVIDIA Windows XP driver for the M200 from the Toshiba support site to get back to the tablet's native resolution.

UPDATE: Thanks to a comment from DrTigerlilly, I now have working screen rotation on my M200. The trick is to install some packages intended for the M400. Go to the Toshiba Vista support page, click on Portege M400, then download and install the following 2 packages:

  • Utility: driver_toshiba_value_added_package_v1.0.3.zip
  • Buttons: driver_tabletpc_extension_v1.0.0.1.zip

 

Saturday, December 02, 2006 11:36:37 AM (Central Standard Time, UTC-06:00) #    Comments [55]  | 

 

All content © 2012, josh
About this site
Send mail to the author(s) Contact me
Feed your aggregator (RSS 2.0)
Joshua Flanagan
I am a software developer focused on continuous improvement in the .NET community
Los Techies

On this page
Archives
Rest of the world

Acknowledgements

Powered by: newtelligence dasBlog 2.1.8209.14743

Special thanks to LosTechies.com

Site theme based on the essence design by Jelle Druyts

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.