Monday, October 08, 2007

Windows PE 2.0 Free For Everyone (Almost)

There are lots of ways to work on a Windows system "off-line."

By "off-line" I mean without booting the primary OS that is installed on the system.

The Strange but Dependable

I have used many a Linux "Live-CD" to edit/delete files and work with partition-management. However, my primary reason for using a "Live-CD" is usually to boot an otherwise un-bootable Windows system, mount the drive(s), then recover the user data to either a network share via FTP or (rarely) a USB device.

For many of these such disks, check out The Live CD List.

The following assorted items in particular might be interesting to look at.

Then came into my life...

BartPE and PE Builder

Bart PE allows you to create an XP SP2 Windows PE (Preinstallation Environment) boot disk.

You must have an original Windows XP or Windows Server 2003 installation/setup cd. The Restore disk that often ship with most systems won't cut it. That is the only real caveat. No disk(s), no BartPE. This is due to licensing issues with Microsoft. Read Bart's link there for the details.

That said, if you have the goods and the time, you can quickly build and burn a base BartPE disk in about an hour or less. You can also slipstream SP2 if you have an early release version.

BartPE is very slick, and with a bit of work, you can add other applications (plugins) to the compilation before mastering, such as applications, drivers, etc. It is really cool and the more time you spend with it, the more you can load on the disk and get to run.

See the trick/benefit here is you can boot a "dead" system in most cases with the BartPE boot disk and get a familiar Windows XP type environment to do your recovery work in. So if Linux scares you, this might be a great answer.

Screen shots

The web is awash with great articles (not that Bart's own site isn't helpful enough already) with guides and tips and plugins to explain and enhance BartPE. So I won't add to that soup.

I do have a "clever" thing I do in building my own custom BartPE disks, but that will be another post.

So if you want to create one of the coolest recovery disks out there, stop by and play with BartPE (assuming you have the right source media first).

Windows PE 2.0 (Vista Baby!)

With Vista the whole Windows PE thing changed.

Windows PE 2.0 for Windows Vista Overview - Microsoft

Microsoft Windows Pre-installation Environment (Windows PE) 2.0 is a bootable tool from Microsoft that provides operating system features for installation, troubleshooting, and recovery. Windows PE is not a general-purpose operating system. Instead, it is designed to be used for three specific tasks:

  • Installing Windows Vista. Windows PE runs every time you install Windows Vista. The graphical tools that collect configuration information during the setup phase are running within Windows PE. Additionally, information technology (IT) departments can customize and extend Windows PE to meet their unique deployment needs.

  • Troubleshooting. Windows PE is also useful for both automatic and manual troubleshooting. For example, if Windows Vista fails to start because of a corrupted system file, Windows PE can automatically start and launch the Windows Recovery Environment. You can also manually start Windows PE to use built-in or custom troubleshooting and diagnostic tools.

  • Recovery. Original Equipment Manufacturers (OEMs) and Independent Software Vendors (ISVs) can use Windows PE to build customized, automated solutions for recovering and rebuilding computers running Windows Vista. For example, users could start their computers from Windows PE recovery CDs or recovery partitions to automatically reformat their hard disks and re-install Windows Vista with the original drivers, settings, and applications.

What OS is it based on at the core?


(Yes, Vista baby!)

So who can get this new toy?

(Almost) Anyone.

Do I need a Vista installation disk? - Not really, but it is helpful.

Do I even need to have Vista? - Nope.

Am I limited with how many I can run at one time or create? - Nope.

See? Isn't this cool!

Getting the PE 2.0 ISO Built

First you need to get the Windows Automated Installation Kit (Windows AIK).

Go download it for free from Microsoft.

(For more TechNet information on the WAIK click here.)

It can be installed on any of the following systems: Windows Server 2003 SP1; Windows XP SP2, and Windows Vista.

Note: The installation application says it must be an XP Professional version, but I just installed it and ran it on my Windows XP SP2 Home system just fine with no complaints at all.

Once downloaded, you have an IMG file which you then have two options to use.

1) Burn it to disk using a disk-burning application, or

2) Mount it as a virtual cd/disk image using a virtual disk application like the freeware SlySoft Virtual CloneDrive.

Run the installer and get it loaded up.

ITsVISTA has a great HOW-TO guide on this whole process with useful screen shots:

Installing Windows AIK without a Disc is Free and Easy - ITsVISTA

Next comes actually creating the boot-disk.

Again, it's not a difficult process. Actually it is much easier than making a BartPE disk!

I recommend reading these two posts for the process:

Toss DOS, Install Vista with Free WinPE - ITsVISTA. (Pay attention to the step about copying the ImageX executable in step 3. If you are following his steps, you want to use the following command he left out: copy "c:\program files\Windows AIK\Tools\x86\imagex.exe" c:\winpe_x86\iso\ all on one line just as it shows in the command prompt window right under step 3.

His steps are so easy to follow and I've done many just this way.

For a bit more explanation about what you are doing, you might also read this one from APC Magazine: Windows PE 2.0: a tiny version of Windows for system maintenance.

Once built, burn the ISO file you created to cd and play away.

I would recommend loading it in a Microsoft Virtual PC 2007 session to verify it works before burning it and to get used to the command-prompt like base-environment.

It does have some limitations:

Because Windows PE is designed to be as lightweight, powerful, and flexible as possible, it has the following limitations:

  • The computer must have a minimum of 256 MB of RAM.

  • Windows PE doesn’t fit on floppy disks, but you can write a Windows PE image to a bootable CD.

  • Windows PE requires a Video Electronics Standards Association (VESA)-compatible display device and will use the highest screen resolution it can determine is supported. If Windows PE can’t detect video settings, it uses a resolution of 640 × 480 pixels.

  • Windows PE supports Distributed File System (DFS) name resolution only to stand-alone DFS roots.

  • You can’t access files or folders on a computer running Windows PE from another computer. In other words, the Server service is not available within Windows PE.

  • Windows PE supports both IPv4 and IPv6, but it does not support other protocols, such as Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX).

  • Drive letter assignments aren’t persistent between sessions. After you restart Windows PE, the drive letter assignments will be in the default order.

  • Windows PE doesn’t support the .NET Framework.

  • Because Windows on Windows (WOW) is not supported, 16-bit applications won’t run in 32-bit versions of Windows PE, and 32-bit applications won’t run in 64-bit versions of Windows PE.

  • To prevent its use as a general-purpose operating system, Windows PE automatically restarts after 24 hours from the initial bootstrap.

  • Additionally, Windows PE includes only a subset of the Windows Vista Win32 application programming interfaces (APIs), including I/O (disk and network) and core Win32 APIs. Applications that require any of the following Win32 APIs will not run in Windows PE: access control, NetShow Theater Administration, OpenGL, power options, printing and print spooler, still image, tape backup, terminal services, user profile, Windows station and desktop, Windows multimedia, and the Windows shell.

I have seen mention elsewhere that it can now run up to 72 hours before requiring reboot, but cannot confirm that myself. I cannot imagine running it that long in such a marathon session. If it is taking you over 72 hours without rebooting to do a rescue/ really have bigger problems! ; )

Cool Thing #1- Add more Applications

Once you get familiar with making the base PE 2.0 disk, you can start to add in some of your favorite "portable" Windows 32-bit applications to the disk, pre-ISO build. Then you can run many of them via the command-line and they will then execute and be displayed in all their GUI goodness.

It does take a fair bit of experimentation and comfort with the command-line environment to get started with this, as well as knowing some tricks with PE 2.0 to get the network connections started.

As I get more time and experience, I will pass these tips and commands on to you.

Cool Thing #2 - Make a USB version

You can make a bootable USB version of PE 2.0.


Check out both of these helpful posts and decide which you can follow the easiest.

Creating a bootable WinPE 2.0 CD and/or USB Flash Drive -

Creating A Bootable WinPE 2.0 USB Key - Josh's Windows Weblog

Cool Thing #3 - Make a VistaPE GUI version

VistaPE - Home

VistaPE - All the specifics.

Screenshots and Download links.

Now, I haven't had the time yet to play around with this building toy, so I can't say how easy it is to use and modify. I suspect there will be a bit more work that BartPE's similar program for XP. However, it looks pretty amazing and would be great for folks who just don't like the command prompt work for the base builds.

When time allows and I have done some hands on work with this building utility, I will do a new post on my experiences.

Bart Lagerweij (of BartPE fame) hasn't publicly stated for the record if he has a BartPE 2.0 version in development or nearing release. I would suspect so, but considering the work and investment it has taken to make BartPE for XP so wonderful, it may be a while before we see a BartPE 2.0 and BartPE 2.0 Builder just yet.

So the faithful remain patient and hopeful in the meantime.

Vista SP1 Recovery Disk

Long Zheng goes on to note that one of the features in Vista SP1 will be the creation of a recovery disk. While no doubt using the PE 2.0 framework under the hood, this special disk should be easier for average users to create and use in a pinch, without having the command prompt GUI to scare them away (but likely without the ability to add custom applications/software to the disk as well.).

A Vista Recovery Disk will be a welcome tool to many a system administrator's toolbox, but I suspect that Win PE 2.0 will remain popular with the IT crowds.

(Note: If you want to make your own version early, keep reading...(or just click here) it is based on the WAIK PE creation we have already covered....)

Windows RE (Recovery Environment) versus Windows PE (Preinstallation Environment)

From what I can tell, Windows RE and Windows PE are not quite the same thing. Windows RE is what will become the aforementioned Vista Recovery Disk in Vista SP1.

Introducing Windows Recovery Environment (Windows RE)

The Windows Recovery Environment (aka Windows RE) team would use this blog to share information, tricks and tips about Windows RE with support professionals and end-users of Windows. We would also like to use this blog to get feedback from the community.

So what is Windows RE?

Windows Recovery Environment (Windows RE) is a recovery platform based on Windows Preinstallation Environment (Windows PE). Windows RE provides two main functionalities:

1. Automatic diagnosis and repair of boot problems using a tool called Startup Repair.

2. A centralized platform for advanced recovery tools.

We will explain more about these two functions in upcoming posts.

Windows RE is new for Windows Vista and completely replaces the recovery console in Windows XP. You should be able to perform most tasks of recovery console from Windows RE.

I found this information on the blog Windows RE Notes that has lots of great details on Windows RE.

For the Hard-Core

Here are some additional links I have found on the PE 2.0 subject that readers might find helpful resources as well:

Pe 2.0! Full Building Instructions! - The CD Forum

HOW TO: inject drivers into Microsoft's free OS, Windows PE 2.0 - APC Magazine

You cannot install Windows XP successfully after you use Windows Vista or Windows PE 2.0 to create partitions on a hard disk - Microsoft KB931760

Windows Vista: Getting Ready for Windows PE 2.0 - TechNet Magazine, November 2006

Windows Preinstallation Environment Overview - Windows Hardware Developer Central

I hope all this link collection I have done becomes a useful resource to someone.

Have fun building!


1 comment:

Anonymous said...

Hi Claus,

Your site is great! Thank you for all useful info i found here.

I wanted to point out i was not able to find imagex.exe anywhere after i booted from WinPE Live CD for the first time. I guess it is all about command "copy "c:\program files\Windows AIK\Tools\x86\imagex.exe" c:\winpe_x86\iso\".

The solution was to re-create WinPE CD using commands to include ImageX to WinPE by modifying boot.wim by mounting it and copying imagex.exe to some location (e. g. \system32). Detailed commands (/mount..., /unmount...) to perform these actions are mentioned on the site(s) you provided links to in this (or some of your other) article.

Anyway, thanks again and keep up a good work!