Jump to content

SOLVED! Dual Boot WinPE and Windows 7


randalldale

Recommended Posts

Hi Guys,

Just wondering if anyone has any experience in creating dual boot systems using WinPE and Windows 7?

My thoughts, I currently run a HDD install from four partitions for a Windows 7 install. At this time I create the partitions using diskpart as follows:

Select disk 0

Clean

create part pri size=200

format quick fs=ntfs label=System

create part pri size=20000

format quick fs=ntfs label=Windows

assign letter=s

create part pri size=300

format quick fs=fat32 label=WinPE

create part pri size=18000

format quick fs=ntfs label=image

assign letter=r

select part 3

active

exit

When the system boots winpe on partition 3 is active boot partition and installs the OS from partition 4. Once completed I now delete partitions 3 and 4 and set partition 1 to active and then run the BCDBOOT.EXE s:\windows and reboot.

With this latest request my thoughts are to instead install from a hidden partition ID=27 and then keep it and create a dual boot system using the BCDEdit.exe...

Select disk 0

clean

create part pri size=20000 id=27

format quick fs=ntfs label=Recovery

assign letter=R

create part pri size=200

format quick fs=ntfs label=System

create part pri

format quick fs=ntfs label=Windows

assign letter=S

select part 1

active

exit

Now I do the same install but the partition is a recovery partition and I now only need to figure out how to create the BCDEdit.exe store to add my WinPE install as an option and set the time for 3 - 5 seconds for post. That way a user can choose to rebuild the PC whenever they choose or whenever support needs to as it is shown as to opions in the boot loader: "Recover Hard Drive" or "Windows 7" and Windows 7 is the default.

Has anyone had any experience with BCDEdit.exe and creating dual boot entries?

Part of it is -> bcdedit -create /d "Recover Hard Drive" /application OSLOADER

But I'm not sure how to grab the GUID so that I can paste it in a file or what the rest is needed????

Any help would be appreciated.

Thanks,

Randall

Edited by randalldale
Link to comment
Share on other sites


Ok Guys,

Here is the fix:

1. create your partitions as follows using diskpart:

select disk 0

clean

create partition primary size=20000 id=27 (you decide what you need I need 20GB, id=27 means hidden)

format quick fs=ntfs label=Recovery

assign letter=R

active

create partition primary size=200

format quick fs=ntfs label=System

create partiton primary

format quick fs=ntfs label=Windows

assign letter=s

exit

This makes up your diskpart.txt file to call.

Now take your BOOT.WIM and apply it to the first partition.

imagex /apply d:\sources\boot.wim 1 r:

Your system will now boot to WinPE under the R: drive.

You can now install Windows 7 to the S: partition or reboot and boot from the install DVD and choose the larger HDD partition to install to.

Once installation is complete you can no longer boot into WinPE in the hidden partition. You will now make the updates to the BCDedit.exe as follows.

Now edit the bcd store to add the winpe boot menu

Bcdedit /create /d Winpe /application osloader

The above command returns a GUID that you use in the next commands:

Bcdedit /set <GUID> osdevice partition=d:

Bcdedit /set <GUID> device partition=d:

Bcdedit /set <GUID> path \windows\system32\winload.exe

Bcdedit /set <GUID> systemroot \windows

Bcdedit /set <GUID> winpe yes

Bcdedit /set <GUID> detecthal yes

Bcdedit /displayorder <GUID> /addlast

Also you will need to copy your winload.exe from the install to the winpe partition.

open a cmd prompt and type copy c:\windows\system32\winload.exe d:\windows\system32

It will ask to over write choose Yes

You can now edit your msconfig file under boot to shorten or lengthen the time I change mine from 30 seconds to 3 so that my end users don't try to run the recovery by accident.

To run msconfig go to the start and type msconfig then choose the boot tab to make your changes.

That pretty much covers it... If I made any errors I appologize as I'm heading off hunting for a week and will fix any and all errors upon my return.

Randall

Link to comment
Share on other sites

  • 2 years later...

Hi Randall,

I am hoping you are still around. I am trying to use your method to restore a .wim image of a POS machine. The machine only has one drive and I used your method...sort of. Here's what I did.

Used diskpart to create three partitions, as you did. Put PE on the first partition along with a copy of the image I wanted to restore.

At this step "Your system will now boot to WinPE under the R: drive.", I used this command to apply:

imagex /apply R:\mybackup.wim 1 E: /check /verify

(When I booted, the R: drive was loaded into X: and the remaining drives were C, D, E with C corresponding to R, D to the System partition and E to the Windows)

I got lost here:

You can now install Windows 7 to the S: partition or reboot and boot from the install DVD and choose the larger HDD partition to install to.

Once installation is complete you can no longer boot into WinPE in the hidden partition. You will now make the updates to the BCDedit.exe as follows.

I think I am supposed to do the bcdedit commands BECAUSE my machine won't boot to WinPE again. What happened was, I finished applying the image and then rebooted and it went right back to WinPE. I then used diskpart to mark to Windows partition as active and rebooted and got an error that Windows couldn't find the system files and needed to be reinstalled.

Do you have any experience with restoring images? The image I have is supposed to be POSReady XP. It is for a very specific machine (A Radiant P1220) that ended up needing a hard disk replaced.

Today I am going to REACTIVATE the WinPE partition in hopes to correct the error with the bcdedit commands you have listed. I am confused by some of your drive lettering though.

Bcdedit /create /d Winpe /application osloader

The above command returns a GUID that you use in the next commands:

Bcdedit /set <GUID> osdevice partition=d:
Bcdedit /set <GUID> device partition=d:
Bcdedit /set <GUID> path \windows\system32\winload.exe
Bcdedit /set <GUID> systemroot \windows
Bcdedit /set <GUID> winpe yes
Bcdedit /set <GUID> detecthal yes
Bcdedit /displayorder <GUID> /addlast

Also you will need to copy your winload.exe from the install to the winpe partition.

open a cmd prompt and type copy c:\windows\system32\winload.exe d:\windows\system32

Which is D: and Which is C: ?? Am I applying the bcedit commands to the Windows partition and then copying winload.exe from the WinPE partition to the Windows partition? Do I have that right?

Link to comment
Share on other sites

Ok - I got through all of this and it failed. I fumbled through some parts that were missing:

Bcdedit /create /d Winpe /application osloader

This gave me errors and told me that I didn't have a BCD store, missing files, etc. etc. I assumed that through all of this the WinPE Drive should remain active. In fact the Windows Drive should be activated to send the command:

bootsect.exe /nt60 c:

(I used this as EVERY issue of bcdedit I used, threw back an error of one kind or another)

I was then able to issue the above command along with the list setting up the menu. It failed on the last item (/display order {GUID} /addlast)

I went ahead and rebooted. When I did, I was given an install error saying that there were issues with my boot manager and problems with the file \boot\bcd

Any Help would be appreciated.

Link to comment
Share on other sites

  • 4 weeks later...

your problem is changing the active partition. When booting, bootloader needs to know on which partition the bcd store exists. You had initially set up a partition as active and created a BCD store, then you later change your active partition, and the system is unable to find the bcd store to load a system.

If you are using a dedicated partition for BCD store (the reserved, "system" partition), then keep that partition as the active one at all times! You can always use a win7 dvd to boot into winpe, in case you have problems boting up the system. You cana lso use bcdedit to edit the existing bcd store on a partition.

Making one partition active at one time then another partition active on other times, you will only create a mess of confusion unless you know what you are doing.

Personally, I use grub4dos as bootloader, becase it gives me flexibility to direct a system to boot from specific partitions. I also create for each Windows installation on different primary partitions, a dedicated bcd store on the respective partition using bcdedit command. Then I use grub4dos to boot using the bootmgr and bcd store on the relevant partition to boot into the respective windows installation (on the relevant partition).

C:\ Windows 7

D:\ Windows 8

E:\WINPE

Install grub4dos on the HD0. Create grub menu (menu.lst located on c:\grub) as follows:

title win 7 (on hd0,0)

root (hd0,0)

makeactive
chainloader (hd0,0)/bootmgr
boot

title win 8 (on hd0,1)

root (hd0,1)

makeactive
chainloader (hd0,1)/bootmgr
boot

title Winpe (on hd0,2)

root (hd0,2)

makeactive
chainloader (hd0,3)/bootmgr
boot

Ensure that relevant partition is set active, and install the relevant OS to the partition! You will end up with the 3 partitoons, 3 OS's, and each partition containing the BCD store for the respective OS. Then you install Grub4DOS, and make the menu.lst file, and when the system is booted you will be presented with a menu to select the OS to boot into! When you select the OS to boot, the corresponding partition is set active, and the system boots into the selected OS (using the bootmgr and bcd store stored on the corresponding partition!)

If you check out following links for info:

Windows PE Walktrhoughs (covers various ways of Winpe boot from CD/UFD/HD/etc.)- http://technet.microsoft.com/en-us/library/dd799278%28v=ws.10%29.aspx

Scenario 3: Performing an Advanced Deployment of Native Boot VHDs- http://technet.microsoft.com/en-us/library/gg318055%28v=ws.10%29.aspx Although this covers a case of winpe partition, and a second partition containing 2 VHDs (win7 and win 2008 R2) for a triple boot system, you can adapt/change the ideas and come up with a general case of 3-partition, triple-boot system, instead of using virtual HDs! It is very informative!

kindly,

Dai

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...