Jump to content

Multiple Install.wim/setup files, each in own folder in sources?


delicatepc

Recommended Posts

Hi,

Recently put simple guide to together on how to boot the Windows BOOTMGR from UBCD and specify multiple boot entries in BCD. More info here

http://www.msfn.org/board/index.php?showtopic=135148

I am now looking to add multiple installation sources. For example I have Vista X86 DVD and Vista X64 and Win7 X86 and Win7 X64 DVD. Each of these DVDs have three crucial files:

>BOOT.WIM (this is loaded into RAM and is the "installer")

>INSTALL.WIM (this is the installation image that seems to be hardcoded)

>SETUP.EXE (this is an executable to seems to be required in the sources folder)

I can rename and move the location of BOOT.WIM with no problems (just have to update entry in BCD). But I cannot seem to rename or specify or move a INSTALL.WIM.

Ideally the sources folder structure would look like this:

-SOURCES

-vista-re-x86.wim (this is just Vista Recovery Environment)

-win7-re-x86.wim (this is just Win7 Recovery Environment)

-WIN7X86

-win7x86-boot.wim

-win7x86-install.wim

-any extra needed files

-VISTAX86

-vistax86-boot.wim

-vistax86-install.wim

-any extra needed files

I should note that using imageX/WAIK is not really a good choice because:

1. I am not creating the installation images/sources

2. WAIK is a large overhead everytime needed to update/change image file

3. Combing images is just a rather messy approach to the problem imho.

4. 6 months down road when win7 hits RTM it means recreate all the images again.

Any one have an idea?

-dpc

Edited by delicatepc
Link to comment
Share on other sites

  • 2 weeks later...

Following up....

Basically its not possible the way I have enivisioned it.

Root problem is in way setup.exe/boot.wim look for install.wim and setup.exe. They will always look for it in SOURCES folder. This is hard coded in and will not change (maybe in win8).

Alternative method is to multiple partition (which is not bad idea for external usb hdd).

But for the sake of simplicity USB sticks with windows BOOTMGR will only support a single INSTALL.WIM (multiple boot.wim however).

If anyone has more to add feel free.

thank you,

dpc

Link to comment
Share on other sites

Sry about delayed reply.

Logically combining the images into one big one makes good sense when using the stock images.

However I am in environment where the images change very constantly (can be biweekly or monthly). I am authorized to deploy said images but combining them is manipulating the image which to a techie is no biggie but to the folks who sign my checks this would be a problem.

Dont get me wrong - we do have images that contain multiple images but those are not created by me (or my group).

The basic flaw in within setup.exe (that is located in boot.wim) - it looks for setup.exe and install.wim specifically in SOURCES folder and there is no easy way to change this without modifying boot.wim (to get access to the setup.exe within it).

Also its one thing to add a entry to BCD... its quite another to slipstream images (WAIK install, learning the specifics etc.). Quite a bit of overhead.

The only real compromise I have found is multiple partition and chainloading the other paritions. This solution still has several problems so I will not be using it.

dpc

Link to comment
Share on other sites

  • 4 weeks later...

Reviving slightly old thread....

Before jumping in just want to mention I know that I can chainload a second partition using syslinux. This is more of a question on how to add chainloading of second partition/bootmgr on second partition from within first partition BOOTMGR/BCD

I cannot seem to find this documented (or I may not be comprehending what I am reading) in the BCD white paper or the technet reference. I would really appreciate any help you can provide.

So scenario is a USB HDD with Win7 X86 (or any vista+ install) ISO extracted to partition 1 which is fat32 and is active (mbr boots this partition first). Partition 2 is a simple ntfs partition with Win7X64 ISO extracted to it.

So what I would want to do is one of two things:

A ) Add Entry to Partition 1 BCD file specifying BOOTMGR on partition 2

OR

B ) (this one makes easy sense to me) Add entry to Partition 1 BCD telling it to Load Partition 2 (partition 2 could be anything at that point couldn’t it?)

The commands that I would envision doing this are below but I don’t know how to fill the highlighted parts.

bcdedit /store %BCD-File% /create /d “Boot to Partition 2” (is there another parameter to go here like /application BOOTSECTOR or similar?)
# It creates entry in BCD file on partition 1 of USB HDD,
# gives description/name of entry as “Boot to Partition 2”,
# Automatically generates a GUID for entry
bcdedit /store %BCD-File% /set %GUID-of-created-entry% DEVICE ??????
# Sets the DEVICE parameter of entry we just created to ?????
#
bcdedit /store %BCD-File% /set %GUID-of-created-entry% OSDEVICE ??????
# Sets the OSDevice Parameter of entry we created to ?????
#
bcdedit /store %BCD-File% /displayorder %GUID-of-created-entry% /addlast
# Adds our entry as the to the end of the list.

Some online examples show “bcdedit /set {GUID} device partition=D:”. I would then theoretically need to do “bcdedit /set {GUID} PATH \BOOTMGR” and “bcdedit /set {GUID} /application BOOTSECTOR”?

Once again the goal would be to chainload the BOOTMGR from the second partition (or just chainload partition 2 period – option B above) from within the first BOOTMGR.

any ideas appreciated.

thanks,

dpc

Link to comment
Share on other sites

SEE HERE !!!

Suppose you'd like to have a dvd with Vista/Win7 setup files(installation disk) PLUS ERD Commander, Active Boot Disk, ESET SysRescue or any other custom made WinPE that you built, on a multiboot CD/DVD, so you could chose which one you'd like to boot.

How do you do it?

Answer: very easy if you know where to look

complete procedure...

use the default WinVista, WIN 7 or any WinPE dvd or any bootable wim.

copy the contents to the HDD

the structure would be

dvd1 | - Project Root
| - BOOT (CONTAINS THE BCD FILE TO BE EDITED)
| - EFI
| - SOURCES (CONTAINS THE PE .WIM FILES)
| - OTHER FILES

In the boot folder we need to run the command

bcdedit /store bcd /ENUM

This will give you the details of old entry in the boot loader.

You need to note the guid. In every case the default guid is {7619dcc8-fafe-11d9-b411-000476eba25f}

bcdedit /store bcd /enum

Windows Boot Manager
--------------------
identifier {bootmgr}
description Windows Boot Manager
locale en-US
inherit {globalsettings}
default {default}
displayorder {default}
toolsdisplayorder {memdiag}
timeout 30

Windows Boot Loader
-------------------
identifier {default}
device ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
path \windows\system32\boot\winload.exe
description Windows Setup
locale en-US
inherit {bootloadersettings}
osdevice ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
systemroot \windows
detecthal Yes
winpe Yes
ems Yes

First you'd like to see the existing boot entries in the BCD store.

bcdedit /store bcd /ENUM

*** note the old guid

Then you copy the default boot entry to a new entry in the bcd store, that has to be updated.

bcdedit /store bcd /copy {default} /d "Active Boot Disk"

*** new guid is given at this stage

Active Boot Disk is the description I'd like to use for my Active Boot Disk WinPE.

operation completed successfully.
{613fe2f0-2356-11de-bf6a-001e4cdc40b1}

***{613fe2f0-2356-11de-bf6a-001e4cdc40b1}=new guid

It can be different for you.

therefore my new guid is {613fe2f0-2356-11de-bf6a-001e4cdc40b1}

now

bcdedit /store bcd /set {newguid} DEVICE ramdisk=[boot]\sources\boot32.wim,{oldguid}

boot32.wim being the name I chose for the Active Boot wim file. You can rename it as you like, but you can not use spaces.

operation completed successfully.

next

bcdedit /store bcd /set {newguid} OSDEVICE ramdisk=[boot]\sources\boot32.wim,{oldguid}

*** boot32.wim is the file copied from the active boot disk (boot.wim renamed)

*** to check whether the bcd store has 2 ramdisks

bcdedit /store bcd /ENUM

Windows Boot Manager
--------------------
identifier {bootmgr}
description Windows Boot Manager
locale en-US
inherit {globalsettings}
default {default}
displayorder {default}
{613fe2f0-2356-11de-bf6a-001e4cdc40b1}
toolsdisplayorder {memdiag}
timeout 30

Windows Boot Loader
-------------------
identifier {default}
device ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
path \windows\system32\boot\winload.exe
description Windows Setup
locale en-US
inherit {bootloadersettings}
osdevice ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
systemroot \windows
detecthal Yes
winpe Yes
ems Yes


Windows Boot Loader
-------------------
identifier {613fe2f0-2356-11de-bf6a-001e4cdc40b1}
device ramdisk=[boot]\sources\boot32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
path \windows\system32\boot\winload.exe
description Active Boot Disk
locale en-US
inherit {bootloadersettings}
osdevice ramdisk=[boot]\sources\boot32.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
systemroot \windows
detecthal Yes
winpe Yes
ems Yes

like this you may add n number of vista pes... (i have tested 3 PEs + Windows Vista Setup) to the BCD Store. Just you have to keep the oldguid to same as {7619dcc8-fafe-11d9-b411-000476eba25f}

{7619dcc8-fafe-11d9-b411-000476eba25f}

will never change... that's the rule.

copy the boot.wim file in sources folder of active boot disk/ ghost pe/ erdcommander 6.0 to the sources folder in disk1 in the project. and rename it to desired. i renamed it to boot32.wim you may use any...

{default} is not a variable and need not be changed.

Next

This is a script that automates the above process:

Rem BCD (boot configuration data) editor for multiple vista pe

REM THIS IS THE ORIGINAL BCD FILE EXTRACTED FROM ANY VISTA WINPE / VISTA DVD (I USED VISTA INSTALLATION)
set BCD-File="c:\bcd 1\BCD"

REM SET THE NAME FOR THE VISTA PE HERE
set pename="Your PE Name"

REM SET THE NAME FOR THE WIM.FILE HERE WITH PATH
set filena=[boot]\sources\yourwimfile.wim

for /f "eol=r tokens=1-2" %%a in ('bcdedit /store %BCD-File% /ENUM all') do set rdo=%%b


for /f "tokens=1-7" %%a in ('Bcdedit /store %BCD-File% /copy {default} /d %pename%') do set guid1=%%g
bcdedit /store %BCD-File% /set %guid1:~0,38% DEVICE ramdisk=%filena%,%rdo%
bcdedit /store %BCD-File% /set %guid1:~0,38% OSDEVICE ramdisk=%filena%,%rdo%

bcdedit /store %BCD-File% /ENUM

Run it as many times as you like to add multiple pes after changing the variables - bcd-file, pename, filena

remember not to use any spaces in filena variable.

Edited by atolica
Link to comment
Share on other sites

do you want to have a multiboot dvd? different install.wim? no way

this is the only way.

NO I do not want a multiboot DVD - Looking multi-partition USB hdd/stick. If you had READ THE THREAD you would already know that several times.

So what I would want to do is one of two things:

A ) Add Entry to Partition 1 BCD file specifying BOOTMGR on partition 2

OR

B ) (this one makes easy sense to me) Add entry to Partition 1 BCD telling it to Load Partition 2 (partition 2 could be anything at that point couldn’t it?)

Simply want to tell BOOTMGR to chainload the second partition on a USB HDD at this point.

~

dpc

Link to comment
Share on other sites

Hi delicatepc

1st up; Interesting project. Very similar to mine;

16GB Corsair GT divided in 4 primary partitions:

a. uBOOT - FAT32 - 500MB: Contains Grub4Dos, ISO files for booting Acronis and others

b. uXP - NTFS - 1.5GB: Contains a custom driverpacked XP install set

c. uWin7 - NTFS - 5GB: Contains a merged 32bit and 64bit Win 7 Pro + Office 2007

d. uDATA - NTFS - 9GB: The only partition viewable from windows, for data only...

However; I have found that I can't install Win7 from the USB stick, unless it's on the FIRST partition! It really bugs me. But at the moment i'm testing different layouts for the pen drive.

Next try will be something like this;

a. uBOOT - NTFS - 4GB: Contains Grub4Dos, ISO files for booting Acronis and others, merged Win7 files

b. uXP - NTFS - 1.5GB: Contains a custom driverpacked XP install set

c. uAPPS - NTFS - 3.5GB: Contains Office 2007, AntiVirus and all the other cra* needed in a fresh install ;)

d. uDATA - NTFS - 9GB: The only partition viewable from windows, for data only...

Now to get back to your problem (FINALLY you think :)...

With Grub4Dos I believe you can load Vista from the 2nd partition (where I load XP) and thereby gain the multiple install source stick thingy... If you'd like, I can give it a try tonight?

Anyway, hope it get's you a little closer...

Greetz

JB

EDIT:

It works! :)

I now have a pendrive containing the following;

- Acronis True Image

- Acronis Disk Director

- Hiren's BootCD

- Active Boot Disk (via DOS)

- Active Boot Disk (Via Win PE 2.0)

- Windows XP installation

- Windows 7 Professional (both x86 and x64) installation

- Boot fra System HDD#1

- Boot fra System CD/DVD#1

- Direct edit commandline

- Reboot

- Shutdown

4 primary partitions on a 16GB Corsair Voyager GT!

GRUB4DOS might be your answer, delicatepc. It sure was for me! :thumbup

Greetz

/JB

Edited by jbolsen
Link to comment
Share on other sites

  • 3 months later...

@jbolsen: How to make a multiboot dvd containing what you listed above?

- Acronis True Image

- Acronis Disk Director

- Hiren's BootCD

- Active Boot Disk (via DOS)

- Active Boot Disk (Via Win PE 2.0)

- Windows XP installation

- Windows 7 Professional (both x86 and x64) installation

- Boot fra System HDD#1

- Boot fra System CD/DVD#1

- Direct edit commandline

- Reboot

- Shutdown

@atolica: salut, daca stii cum sa fac si io un dvd multiboot care sa contina pe langa cele de mai sus si niste softuri de la paragon? folosesc cdshell si nu-mi iesa neam ce incerc io. ms

Link to comment
Share on other sites

Hey Jbolsen, thanks for the heads up. I actually ended up doing this on a USB HDD and using the syslinux as a bootloader and chainloading partition 1, 2, 3, and so on.

But the problem is still the same: setup/boot.wim needs to reference the INSTALL.WIM from more than one location (or at least be dynamic). Unfortunately its hard coded to look for the install.wim in the sources folder and thats it. There is several work around (one of them is yours, another one is combining the install.wims into one big install.wim) but they dont address the root problem.

The reason the root problem is important is that usb sticks are not super friendly to partitioning (especially in windows).

But in any case would appreciate if you posted your config/grub files.

as for the reason you cant install win7 except off partition one is likely because win7 installer only mounts the first partition for data.

thanks,

dpc

Link to comment
Share on other sites

Hi jBolsen, I have been busting my brain trying to figure out something of that sort. Heres is my idea with is very similiar to that. I am trying to do this...:

ROOT

|-Win7(x86)(x64)Merged

|-Boot

|-Sources

|-etc..etc..etc..

|-WinVista(x86)(x64)Merged

|-Boot

|-Sources

|-etc..etc..etc..

Im trying to figure out to make like a boot manager where it will let me pick which folder to boot from, or to boot from an ISO or something.

I hope you understand what im saying.

Any thoughts or ideas, will be muchly appreciated. Thanks in advance.

Link to comment
Share on other sites

  • 6 years later...

I have something like this working, or at least very close. I have Windows 7, 8.1, and 10 in x64 and x86, as well as MS-Dart 6.5, a hand-modified Falcon4 UBCD, and AOMEI's PE Builder 1.5 booting from a single 32 gb flash drive. The "at least, very close" part, is that 7 & 8.1 installers use a generic winpe.wim in place of boot.wim. By default, this drops me into a command prompt. I haven't tested this next part yet, but if I did it correctly, I believe I've integrated an automatic installer for drivers from driverpacks.net and a multi-oem customizer tool. Note that I did not write or create any of these separate tools - I am only integrating them together.

 

Back to the topic at hand, and as I was saying, 7 and 8.1 installers drop me to a command prompt inside the RAM disk for winpe.wim. From there, I am able to change drive and directory and run the correct setup.exe for the system at hand.

 

I started out using Windows 10's Media Creation tool to create a bootable USB drive, and added more stuff from there.

 

I have no doubt I'm going to get a flood of more questions on this in the near future. I'm happy to help to the extent I'm able.

 

--Aaron

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