Jump to content

PE2005 in WIM format working with Vista bootloader


Albuquerque

Recommended Posts

Yeah yeah, I'm a n00b to your site, but I don't think I qualify as a n00b to WindowsPE. So here's what I've done up to this point, and I think I know the one last step to get it 100% working.

First, I'm using a customized Windows PE 2005 image (Win2k3 SP1) from the real Microsoft Enterprise Agreement package. Not hard, we all know how to do this. I'm building it in "CD" mode, meaning the base folder is I386 and not MININT.

Then, I copied WININIT.EXE and WINLOAD.EXE from the Vista \Windows\System32 folder into the I386\System32 folder on my PE 2005 image. Don't forget this step!

Next, I used XIMAGE to grab my PE image development folder, so that I have the WINBOM.INI, all those WIN51 files and the I386 folder in the root of my WIM. Maximum compression is actually the default capture method, so no real need to specify that at the command line. My previous WinPE images have been from SDI images, so my development folders are named PE_SDI(x). Example:

ximage /capture C:\PE_SDI2 winpe2k5.wim "20060215"

I use a date as my description (20060215); it's a component of how I do BootCD version checking in my company (so I can network-invaliate old CD's that have been superceded). You can use whatever. Then you will need to make that WIM bootable by specifying ximage /boot winpe2k5.wim 1. Obviously your WIM might be differently named than mine.

Next, I ripped the bootsector off my Vista 5112 x86/32 DVD. I think I used WinImage to do it; can't 100% remember. It wasn't hard, there's a ton of free software that can do it for you. Just grab the first four sectors at offset x07c0 just like any other bootable optical media, you should get a 2kb file in return.

Then, I created a new folder structure to hold my Vista PE files. I named mine C:\PE_Vista to hold with my previous "naming standards" hehe... In that folder, I have the following files and folders:

Bootmgr (from the Vista DVD)

boot.ini (we'll customize this in a minute)

Sources (a folder)

Boot (a folder)

Drop your WIM file into the Sources folder, and drop Boot.SDI into your new Boot folder from the Vista DVD Boot folder. You do not need NTLDR or NTDETECT in there!

Edit your boot.ini to look like the following:

[boot loader]
timeout=0
default=ramdisk(0)\I386
[operating systems]
ramdisk(0)\I386="Windows Preinstallation Environment" /noguiboot /fastdetect /minint /usenewloader /rdpath=multi(0)disk(0)cdrom(0)\sources\winpe2k5.wim /RDSDIHDRPATH=multi(0)disk(0)cdrom(0)\boot\boot.sdi

Yes, you DO want to "usenewloader", hence the reason you dropped in the WINLOAD and WININIT files. To actually build your CD, you can use MKISOFS, Roxio or OSCDIMG to create your ISO file basically like any other PE image you've done before. Just make sure you're using the Vista bootimage that you grabbed off the DVD versus your normal PE one.

So, here's the problem: This doesn't 100% work.

The reason? Boot it, and you'll see that it cannot find I386\System32\Config\System -- it's referring to the system hive file for your registry. Ok, so maybe you tell yourself you can just rename setupreg.hiv to system, move it to the Config folder and get around this issue? Sure, and then watch it bomb with a license violation because the product descriptor doesn't exist in a PE system registry hive

The real reason it doesn't work is the Vista bootloader isn't passing the "minint" switch to the underlying OS. I am almost positive this is linked to (and can be fixed by) creative use of BCDEDIT in the later builds of Vista. Unfortunately, I'm stuck with Vista 5112 for various political reasons in my company, and don't have direct (legal) access to 5270.

So the challenge? Someone needs to create a boot file using BCDEDIT (not a Boot.ini, that's all gone now) that acknowledges this boot image as a MiniNT OS and passes the proper switch. It can't be that hard; I'd do it myself except I don't have access to the proper OS. Someone want to take that last step for us all? As I understand it, BCDEDIT will place (or update) a file in the \Boot folder once you're done editing. This should be able to fix the switch issue, in theory...

Edited by Albuquerque
Link to comment
Share on other sites


Have you tried looking at the Vista WIM, there are 2 images there, one for hte PE that is used for boot and one for the actual OS, the file you are looking for may already be available for you in the Vista PE wim, i know i was able to extract the PE WIM and create a bootable PE from that image, taking later files from 6270 may not be backwards compatible with 5112, depends on what was changed between the 2 verions, but i will look to see what i can find

Link to comment
Share on other sites

Doesn't work; BCDEDIT works in GUIDs for the "destination" operating system. The GUID for Vista (and the associated Vista PE) are different than the GUID for Server 2003 (and the associated 2k3 PE). I'll need someone who can actually manipulate BCDEDIT to create / manipulate this file and get both the appropriate GUID and default OS switches put in.

It likely needs to have this file put into a \Boot folder inside the WIM rather than put into the raw Boot folder on the ISO. I really wish I had access to 5270 so I could just make this work and post it 100% for you guys :(

Link to comment
Share on other sites

What build is the XImage you are using? If it's not the same as the version of the loader you are using, this would be quite expected. I also don't believe that error is occurring for the reason you think it is.

To answer your first question: The bootloader I ripped from the DVD, the BOOTMGR file and XIMAGE are all from the 5112 build. I know, because I personally ripped them out of the 3-pack of DVD's that Microsoft sent me in the last two months. I can build WIM'ed PE images of Vista all day without issue.

To answer your second speculation: I'm convinced the "destination" OS is not receiving the MININT switch like it should. Hope you like the long drawn-out explanation, because I'm going to give it to you to ensure you understand exactly what I'm talking about.

My first several tests with bootable WIM's came out the same way that everyone else's did: "NTDETECT failed". After some playing, I then upgraded to the next error: "This machine is no longer supported" and verbiage about not having an ACPI-enabled BIOS. A bit more research on failed boot sectors after "upgrading" with Vista gave me the idea to try WINLOAD and WININIT. Now I get the error about being unable to find the system registry hive (cannot find I386\SYSTEM32\CONFIG\SYSTEM).

Here's where we discover what's going wrong: MiniNT installations don't keep a system registry file there, because they basically in the "Setup state" forever. But maybe you discount that theory, because maybe it's something to do with the new bootloader? Fine. We make a copy of setupreg.hiv (the system registry hive), move it to the Config folder, and rename it appropriately. We reboot our WIM file, and we get another error: License Violation.

Wanna know why? Because the product ID is missing from the system registry hive. Why is this important? Because an OS starting in MiniNT mode doesn't look for (or require) a product ID in the system registry. Oops. Our operating system isn't running in MiniNT mode.

The newer versions of VISTA provide the BCDEDIT tool which has extended support and functionality for other operating systems and passing of command line switches. This is why I'm posting this thread -- to hopefully find someone who wants to spend an hour of their time tinkering with BCDEDIT to see if we can finally get this answered.

In a seperate subject but along this same line of thought, it turns out that I'm finally getting my own copy of Build 5270 afterall. It's still gonna be a few days before it's here though...

Link to comment
Share on other sites

There's something missing in your process then. The problem you are seeing is that your loader isn't able to see into the WIM at all. The next step in the boot process is loading setupreg.hiv. By moving it out, you've just made the boot process get one step farther - the registry is loaded, but then the kernel barfs - most likely because the next component that the kernel is looking to load can't be found... I'd be VERY surprised if it is anything else. Really.

Link to comment
Share on other sites

There's something missing in your process then. The problem you are seeing is that your loader isn't able to see into the WIM at all. The next step in the boot process is loading setupreg.hiv. By moving it out, you've just made the boot process get one step farther - the registry is loaded, but then the kernel barfs - most likely because the next component that the kernel is looking to load can't be found... I'd be VERY surprised if it is anything else. Really.

Nope, that's not it. We can 100% validate the WIM is being read, because we're able to satisfy the "I need to find a SYSTEM file in the Config directory" when we do the copy-and-rename function. If it couldn't read, then it would still complain about the file being missing.

Actually, if you think about it, that's not even right. If it couldn't read the WIM file, then where are the "NTLDR missing" and/or "NTDETECT failed" error messages? If you go look at my ISO file creation steps, take notice that NTLDR / SETUPLDR.BIN and NTDETECT are not on the raw ISO file -- they are contained only within the WIM. You also forget that adding WINLOAD.EXE and WININIT.EXE made a noteable difference to the behavior of the "destination OS" in my testing, whicih completely invalidates your suggestion that the WIM cannot be read.

It's most definitely reading the WIM; I say it's still not getting the MININT flag. Next theory?

Edited by Albuquerque
Link to comment
Share on other sites

The WIM has to be read at several levels..

The first issue you saw is a generic registry read failure. That's why copying setupreg.hiv out made it make it farther in the boot process. If you remove setupreg.hiv from a standard WinPE CD layout and boot - you'll get the same error. If the filter isn't loading, it can't see in the WIM. Even if the first loader sees into it, that doesn't guarantee the second filter has started.

You don't need to give me broad elaborate answers... just the basics. I co-invented the WIM-boot technology - and though it has changed somewhat since I left Microsoft, the underpinnings have not - and the errors you are getting are pretty much the standard ones we worked through as we built it.

Link to comment
Share on other sites

albuquerque,

you may not even have to worry much longer, if you can get into the Vista beta, the new version has been released along with a WAIK with the new PE 2.0 (or it is suppose to be) this should allow you to do what you are looking for without creating it ad-hoc

WINPE 2.0

if you are interested on reading up on the new PE, Since you have a MS EA you should be able to get the PE beta, it has all the nessacry tools that you are looking for to create a PE based on the WIM format

@getwired,

Very cool technology thanks for helping to bring it to us!!!

Edited by fizban2
Link to comment
Share on other sites

Fizban2: The PE 2.0 ODK isn't out yet; it was delayed and does not yet have a release date (as of this last Friday when I checked with our Microsoft TAM). PE 2.0 is cool; but I'm going to stick with the "known good" PE 1.6 (2005) until Vista is really 100% final. That still doesn't stop me from working with the compressed WIM format to get my current PE discs booting faster.

GetWired2: Aha, I think I know where you're going. Got me an idea... Thanks I think :)

Edited by Albuquerque
Link to comment
Share on other sites

guess PE 2.0 got released today after all...

Sweet! Time go to download it; maybe the answer will be in there... Thanks for the heads up!

Edit: It's not on the MS Connect website; where did you see it?

Also, I believe I've found the problem that GetWired2 was suggesting, but I'm running into a problem now with PE2005 complaining that specific SYS files are corrupt. I'm starting to get this whole "reading at different levels" concept, and I think I've fixed one layer and then run straight into another broken layer.

I think...

Edited by Albuquerque
Link to comment
Share on other sites

Sweet! Time go to download it; maybe the answer will be in there... Thanks for the heads up!

Edit: It's not on the MS Connect website; where did you see it?

gaah my bad, i totally read something wrong on the connect site :blushing: sorry

Link to comment
Share on other sites

With Win Vista Beta 1 I got as far as a blue screen inside WinPE 2005 before I gave up.

But I was hacking the hive to get past the MINIT issue.

The stop error I got was:

STOP: 0x0000007E (0xC0000005, 0xF741D387, 0xF789AA08, 0xF789A704)

setupdd.sys - Address F741D387 base at F73E7000, DateStamp 42435c58

Link to comment
Share on other sites

I'm not going the MININT route; I'm going the I386 route as to avoid having to fight with registry entries. Maybe I should go the other way? Dunno... You're getting a very similar error to what I ran into.

Just today I finished downloading the 5308 ISO file; I'm trying again with the newest files from this release. I think my failures are coming from Winload.exe and/or Wininit.exe at this point, as it looks like these two replace the NTDetect.com when launching "older" operating systems with the new bootloader. The other issue is getting the WIM filter driver (fltmgr + wimfsf + fbwf) loaded as early as possible in the boot sequence as either a bus extender or boot bus extender.

I'm hoping the 5308 file versions of WinInit / WinLoad and the WIM filter driver will have better support for the older OSes. I may also gain some additional help by way of the BCDEDIT utilty.

I don't want to give up on this; I'll keep everyone posted.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...